From fcad79967eedf9c3ced2d7a18fbe8ec13f8bded9 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 26 Jan 2026 15:42:18 +0100 Subject: [PATCH 01/46] SCPN1-10095 --- RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl | 4 ++-- RFXtoRP_HsrCarrierApt_CarrierArrived.ftl | 8 ++++---- RFXtoRP_HsrCarrierApt_CarrierDeparted.ftl | 8 ++++---- RFXtoRP_HsrCarrierApt_LoadingCompleted.ftl | 8 ++++---- RFXtoRP_HsrCarrierApt_LoadingStarted.ftl | 8 ++++---- RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl | 8 ++++---- RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl | 4 ++-- RFXtoRP_HsrCarrierApt_UnloadingCompleted.ftl | 8 ++++---- RFXtoRP_HsrCarrierApt_UnloadingStarted.ftl | 8 ++++---- RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl | 4 ++-- RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl | 6 +++--- 11 files changed, 37 insertions(+), 37 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl b/RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl index a9aa061..795d001 100644 --- a/RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl +++ b/RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl @@ -7,9 +7,9 @@ "ID": { <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + "RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> - "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> diff --git a/RFXtoRP_HsrCarrierApt_CarrierArrived.ftl b/RFXtoRP_HsrCarrierApt_CarrierArrived.ftl index 1cd5974..7284ee7 100644 --- a/RFXtoRP_HsrCarrierApt_CarrierArrived.ftl +++ b/RFXtoRP_HsrCarrierApt_CarrierArrived.ftl @@ -7,15 +7,15 @@ "ID": { <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + "RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}", + "RefID": "${carrier_apt.appointment_reference?json_string}", <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", "RefDate": { diff --git a/RFXtoRP_HsrCarrierApt_CarrierDeparted.ftl b/RFXtoRP_HsrCarrierApt_CarrierDeparted.ftl index 1cd5974..7284ee7 100644 --- a/RFXtoRP_HsrCarrierApt_CarrierDeparted.ftl +++ b/RFXtoRP_HsrCarrierApt_CarrierDeparted.ftl @@ -7,15 +7,15 @@ "ID": { <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + "RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}", + "RefID": "${carrier_apt.appointment_reference?json_string}", <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", "RefDate": { diff --git a/RFXtoRP_HsrCarrierApt_LoadingCompleted.ftl b/RFXtoRP_HsrCarrierApt_LoadingCompleted.ftl index 1cd5974..7284ee7 100644 --- a/RFXtoRP_HsrCarrierApt_LoadingCompleted.ftl +++ b/RFXtoRP_HsrCarrierApt_LoadingCompleted.ftl @@ -7,15 +7,15 @@ "ID": { <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + "RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}", + "RefID": "${carrier_apt.appointment_reference?json_string}", <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", "RefDate": { diff --git a/RFXtoRP_HsrCarrierApt_LoadingStarted.ftl b/RFXtoRP_HsrCarrierApt_LoadingStarted.ftl index 1cd5974..7284ee7 100644 --- a/RFXtoRP_HsrCarrierApt_LoadingStarted.ftl +++ b/RFXtoRP_HsrCarrierApt_LoadingStarted.ftl @@ -7,15 +7,15 @@ "ID": { <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + "RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}", + "RefID": "${carrier_apt.appointment_reference?json_string}", <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", "RefDate": { diff --git a/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl index bfd3049..657f4c3 100644 --- a/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl @@ -3,15 +3,15 @@ { <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + "RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}", + "RefID": "${carrier_apt.appointment_reference?json_string}", <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", "Header": { diff --git a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl index 63a606f..5244fc7 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl @@ -6,9 +6,9 @@ "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + "AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> diff --git a/RFXtoRP_HsrCarrierApt_UnloadingCompleted.ftl b/RFXtoRP_HsrCarrierApt_UnloadingCompleted.ftl index 6c93825..5ac8b1c 100644 --- a/RFXtoRP_HsrCarrierApt_UnloadingCompleted.ftl +++ b/RFXtoRP_HsrCarrierApt_UnloadingCompleted.ftl @@ -7,15 +7,15 @@ "ID": { <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + "RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}", + "RefID": "${carrier_apt.appointment_reference?json_string}", <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", "RefDate": { diff --git a/RFXtoRP_HsrCarrierApt_UnloadingStarted.ftl b/RFXtoRP_HsrCarrierApt_UnloadingStarted.ftl index 1cd5974..7284ee7 100644 --- a/RFXtoRP_HsrCarrierApt_UnloadingStarted.ftl +++ b/RFXtoRP_HsrCarrierApt_UnloadingStarted.ftl @@ -7,15 +7,15 @@ "ID": { <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + "RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}", + "RefID": "${carrier_apt.appointment_reference?json_string}", <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", "RefDate": { diff --git a/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl index dad33e2..61c4f3f 100644 --- a/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl @@ -7,9 +7,9 @@ }, <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + "AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> diff --git a/RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl b/RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl index bd89dee..945d8b9 100644 --- a/RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl @@ -6,9 +6,9 @@ }, <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + "AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> @@ -75,7 +75,7 @@ "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" <#else> <#stop "Appointment type not supported" > - + }] From 3b36b44aea330cc72d509a8fdabd57c7d0246c41 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 26 Jan 2026 16:56:28 +0100 Subject: [PATCH 02/46] SCPN1-10095 --- RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl index 657f4c3..c4033a6 100644 --- a/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl @@ -3,15 +3,15 @@ { <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", + "AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> - "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#else> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "RefID": "${carrier_apt.appointment_reference?json_string}", + "AppointmentID": "${carrier_apt.appointment_reference?json_string}", <#else> - "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", "Header": { From 99357483f9f2659559562a69df5130db13ed7958 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 30 Jan 2026 16:14:40 +0100 Subject: [PATCH 03/46] SCPN1-10100 --- RFXtoRP_HsrCarrierApt.ftl | 12 +----- ...t_AppointmentCarrierInformationUpdated.ftl | 9 ++++ ...ntCarrierInformationUpdatedToConfigure.ftl | 42 +++++++++++++++++++ ...rierApt_AppointmentCustomFieldsUpdated.ftl | 10 ++++- ..._AppointmentMetadataUpdatedToConfigure.ftl | 8 ++-- ...HsrCarrierApt_SiteForceBookAppointment.ftl | 8 ++++ RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl | 40 +++++++++--------- RPtoRFX_AppointmentEvent.ftl | 28 ++++++++++--- RPtoRFX_CarrierAppointmentDataUpdated.ftl | 21 ++++++++++ ...arrierAppointmentReasonUpdatedByNumber.ftl | 38 +++++++++++++++++ ...X_CarrierAppointmentReasonUpdatedByRef.ftl | 39 +++++++++++++++++ ...lotOrCarrierInformationUpdatedByNumber.ftl | 9 ++-- ...ntSlotOrCarrierInformationUpdatedByRef.ftl | 7 ++-- 13 files changed, 221 insertions(+), 50 deletions(-) create mode 100644 RFXtoRP_HsrCarrierApt_AppointmentCarrierInformationUpdated.ftl create mode 100644 RFXtoRP_HsrCarrierApt_AppointmentCarrierInformationUpdatedToConfigure.ftl create mode 100644 RPtoRFX_CarrierAppointmentDataUpdated.ftl create mode 100644 RPtoRFX_CarrierAppointmentReasonUpdatedByNumber.ftl create mode 100644 RPtoRFX_CarrierAppointmentReasonUpdatedByRef.ftl rename RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl => RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl (89%) rename RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl => RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl (92%) diff --git a/RFXtoRP_HsrCarrierApt.ftl b/RFXtoRP_HsrCarrierApt.ftl index d96a39e..7f8fe5f 100644 --- a/RFXtoRP_HsrCarrierApt.ftl +++ b/RFXtoRP_HsrCarrierApt.ftl @@ -37,6 +37,7 @@ <#include "RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl"> }, <#include "RFXtoRP_HsrCarrierApt_AppointmentMetadataUpdated.ftl"> + <#include "RFXtoRP_HsrCarrierApt_AppointmentCarrierInformationUpdated.ftl"> <#if carrier_apt.status?? && (carrier_apt.status.status_code=="999" || carrier_apt.status.status_code=="040" || carrier_apt.status.status_code=="030")> [ { @@ -107,7 +108,6 @@ } ] <#else> - <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0) && ((carrier_apt.unloading_appointment =="true" && carrier_apt.load_appointment =="false") || (carrier_apt.unloading_appointment =="false" && carrier_apt.load_appointment =="true"))> [ { <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteWMSUpdateAppointment> @@ -116,16 +116,6 @@ <#include "RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl"> } ] - <#else> - [ - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteForceRescheduleAppointment> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl"> - } - ] - diff --git a/RFXtoRP_HsrCarrierApt_AppointmentCarrierInformationUpdated.ftl b/RFXtoRP_HsrCarrierApt_AppointmentCarrierInformationUpdated.ftl new file mode 100644 index 0000000..9ae2079 --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_AppointmentCarrierInformationUpdated.ftl @@ -0,0 +1,9 @@ + <#-- A décommenter si besoin de les utiliser--> + <#-- Uncomment if you need to use them--> + <#--{ + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierInformationUpdated> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_AppointmentCarrierInformationUpdatedToConfigure.ftl"> + }, +--> \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_AppointmentCarrierInformationUpdatedToConfigure.ftl b/RFXtoRP_HsrCarrierApt_AppointmentCarrierInformationUpdatedToConfigure.ftl new file mode 100644 index 0000000..b74a5e4 --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_AppointmentCarrierInformationUpdatedToConfigure.ftl @@ -0,0 +1,42 @@ +<#-- + [ + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + "RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", + <#else> + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + + <#else> + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + "RefID": "${carrier_apt.appointment_reference?json_string}", + <#else> + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + + + } + "Payload": { + "ActorID": "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", + <#--To configure--> +<#-- "CarrierInformation": [ + { + "Key": "string", + "Value": { + "Bool": "true / false", + "Float": 3.1415, + "Int": 42, + "String": "Hello World !", + "Timestamp": { + "AuthorTimeZone": "Europe/Paris", + "DateTime": "2023-01-01T00:00:00Z" + } + } + ] + } +} +] +--> \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl b/RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl index 795d001..0fbed91 100644 --- a/RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl +++ b/RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl @@ -42,7 +42,15 @@ { "Key": "carrier", "Value": "${carrier_apt.planned_carrier?json_string}" - } + }, + { + "Key": "loading", + "Value": "${carrier_apt.load_appointment?json_string}" + }, + { + "Key": "unloading", + "Value": "${carrier_apt.unloading_appointment?json_string}" + } ] }, "Payload":{ diff --git a/RFXtoRP_HsrCarrierApt_AppointmentMetadataUpdatedToConfigure.ftl b/RFXtoRP_HsrCarrierApt_AppointmentMetadataUpdatedToConfigure.ftl index 5ef3e72..e7bdd97 100644 --- a/RFXtoRP_HsrCarrierApt_AppointmentMetadataUpdatedToConfigure.ftl +++ b/RFXtoRP_HsrCarrierApt_AppointmentMetadataUpdatedToConfigure.ftl @@ -7,15 +7,15 @@ "ID": { <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}" + "RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}" <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}" + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}" <#else> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}" + "RefID": "${carrier_apt.appointment_reference?json_string}" <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}" + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}" }, diff --git a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl index 5244fc7..349ea78 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl @@ -75,6 +75,14 @@ { "Key": "carrier", "Value": "${carrier_apt.planned_carrier?json_string}" + }, + { + "Key": "loading", + "Value": "${carrier_apt.load_appointment?json_string}" + }, + { + "Key": "unloading", + "Value": "${carrier_apt.unloading_appointment?json_string}" } ], <#include "RFXtoRP_HsrCarrierApt_SegmentationSelections.ftl">, diff --git a/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl index 61c4f3f..6db8491 100644 --- a/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl @@ -77,46 +77,46 @@ { "Key": "carrier", "Value": "${carrier_apt.planned_carrier?json_string}" + }, + { + "Key": "loading", + "Value": "${carrier_apt.load_appointment?json_string}" + }, + { + "Key": "unloading", + "Value": "${carrier_apt.unloading_appointment?json_string}" } ], - <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0)> + <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0) && ((carrier_apt.unloading_appointment =="true" && carrier_apt.load_appointment =="false") || (carrier_apt.unloading_appointment =="false" && carrier_apt.load_appointment =="true"))> "Commissions": [ <#list carrier_apt.physical_receipt_list?filter(l ->l??) as physical_receipt> { "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", <#if physical_receipt.physical_receipt_reference?? && physical_receipt.physical_receipt_reference!=""> "OrderID": "${physical_receipt.physical_receipt_reference?json_string}", - "ExecutionflowID": "${physical_receipt.physical_receipt_reference?trim?json_string}", <#else> - "OrderID": "${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": "${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}", + "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> - "Commissions": [ - { - "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", - "ProjectID": "${projectRP}", - <#include "RFXtoRP_HsrCarrierApt_Quantities.ftl"> - } - ], - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> - "Reason": "UNLOADING AND LOADING / ${carrier_apt.appointment_designation?json_string}", <#else> - <#if carrier_apt.appointment_designation?? && carrier_apt.appointment_designation!=""> - "Reason": "${carrier_apt.appointment_designation?json_string}", + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> + "Reason": "UNLOADING AND LOADING / ${carrier_apt.appointment_designation?json_string}", <#else> - <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "Reason": "${carrier_apt.appointment_reference?json_string}", + <#if carrier_apt.appointment_designation?? && carrier_apt.appointment_designation!=""> + "Reason": "${carrier_apt.appointment_designation?json_string}", <#else> - "Reason": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + "Reason": "${carrier_apt.appointment_reference?json_string}", + <#else> + "Reason": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + - "Slots": [{ <#-- calcul de de la durée en fonction des start et end time--> "DurationInSeconds": "${duration}", diff --git a/RPtoRFX_AppointmentEvent.ftl b/RPtoRFX_AppointmentEvent.ftl index 69ea68f..741cf96 100644 --- a/RPtoRFX_AppointmentEvent.ftl +++ b/RPtoRFX_AppointmentEvent.ftl @@ -27,7 +27,7 @@ <#case "CommissionsUpdated"> <#assign appointment = eventRP.data /> [ <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING"> - <#if eventRP.addedCommissions?? && eventRP.addedCommissions!=""> + <#if eventRP.addedCommissions?? && eventRP.addedCommissions!=""> <#if eventRP.appointmentCustomFields?has_content> { <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_number> @@ -47,7 +47,7 @@ <#if eventRP.removedCommissions?? && eventRP.removedCommissions!=""> <#if eventRP.addedCommissions?? && eventRP.addedCommissions!=""> , - + <#if eventRP.appointmentCustomFields?has_content> { @@ -66,12 +66,28 @@ <#else> - <#stop "Unsupported Appointment Type for Commissions Update"> + <#if eventRP.appointmentCustomFields?has_content> + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_number> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentReasonUpdatedByNumber.ftl"> + } + <#else> + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_ref> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentReasonUpdatedByRef.ftl"> + } + ] <#break> -<#-- *********************************************** Action = SlotUpdated ******************** --> +<#-- *********************************************** Action = SlotUpdated or CarrierInformationUpdated ******************** --> <#case "SlotUpdated"> + <#case "CarrierInformationUpdated"> + <#case "ReasonUpdated"> <#assign appointment = eventRP.data /> [ <#if eventRP.appointmentCustomFields?has_content> @@ -79,14 +95,14 @@ <#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_number> "apiRestReflexID" : "${apiRestReflexID}", "datas" : - <#include "RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl"> + <#include "RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl"> } <#else> { <#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_ref> "apiRestReflexID" : "${apiRestReflexID}", "datas" : - <#include "RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl"> + <#include "RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl"> } ] diff --git a/RPtoRFX_CarrierAppointmentDataUpdated.ftl b/RPtoRFX_CarrierAppointmentDataUpdated.ftl new file mode 100644 index 0000000..93b4aa7 --- /dev/null +++ b/RPtoRFX_CarrierAppointmentDataUpdated.ftl @@ -0,0 +1,21 @@ +<#-- 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 + <#if appointment.CarrierInformation??> + <#assign CarrierInformation_Map = JsonUtil.sequenceToMap(appointment.CarrierInformation, "Key", "Value") /> + <#if CarrierInformation_Map["Immatriculation"]??> + <#assign registration_number1 = CarrierInformation_Map["Immatriculation"].String!""/> + "registration_number":"${registration_number1}", + <#else> + "registration_number":"no plate number", + + + + If your SK is : + Boolean : .Bool + Float : .Float + Timestamp : .Timestamp.DateTime or .Timestamp.AuthorTimeZone + Int : .Int + String : .String +--> \ No newline at end of file diff --git a/RPtoRFX_CarrierAppointmentReasonUpdatedByNumber.ftl b/RPtoRFX_CarrierAppointmentReasonUpdatedByNumber.ftl new file mode 100644 index 0000000..7a57906 --- /dev/null +++ b/RPtoRFX_CarrierAppointmentReasonUpdatedByNumber.ftl @@ -0,0 +1,38 @@ +{ + "id" : {"refid" : "${eventRP.refid?json_string}","actorID":"${RPtoRFXprefixDepot(eventRP.actor)}"}, + "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":"${eventRP.appointmentCustomFields.year?json_string}", + "appointment_number":"${eventRP.appointmentCustomFields.number?json_string}" + }, + "payload" : + { + "unloading_appointment" : "${eventRP.appointmentCustomFields.unloading?json_string}", + "load_appointment" : "${eventRP.appointmentCustomFields.loading?json_string}", + <#switch appointment.AppointmentType> + <#case "APPOINTMENT_TYPE_LOADING"> + <#if appointment.TimeZone?? && appointment.TimeZone!=""> + "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)}", + <#else> + "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,time_zone_rfx),time_zone_rfx)}", + "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}", + + <#break> + <#case "APPOINTMENT_TYPE_UNLOADING"> + <#if appointment.TimeZone?? && appointment.TimeZone!=""> + "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)}", + <#else> + "planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,time_zone_rfx),time_zone_rfx)}", + "planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}", + + <#break> + <#default> + <#stop "appointment.AppointmentType not implemented" > + + "appointment_designation":"${(appointment.Reason!"")!?json_string}" + } + } diff --git a/RPtoRFX_CarrierAppointmentReasonUpdatedByRef.ftl b/RPtoRFX_CarrierAppointmentReasonUpdatedByRef.ftl new file mode 100644 index 0000000..00595f4 --- /dev/null +++ b/RPtoRFX_CarrierAppointmentReasonUpdatedByRef.ftl @@ -0,0 +1,39 @@ +{ + "id" : {"refid" : "${eventRP.refid?json_string}","actorID":"${RPtoRFXprefixDepot(eventRP.actor)}"}, + "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", + <#if appointment.TimeZone?? && appointment.TimeZone!=""> + "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)}", + <#else> + "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,time_zone_rfx),time_zone_rfx)}", + "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}", + + <#break> + <#case "APPOINTMENT_TYPE_UNLOADING"> + "unloading_appointment" : "true", + "load_appointment" : "false", + <#if appointment.TimeZone?? && appointment.TimeZone!=""> + "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)}", + <#else> + "planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,time_zone_rfx),time_zone_rfx)}", + "planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}", + + <#break> + <#default> + <#stop "appointment.AppointmentType not implemented" > + + "appointment_designation":"${(appointment.Reason!"")!?json_string}" + } + } diff --git a/RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl similarity index 89% rename from RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl rename to RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl index cc16421..a7d6ad5 100644 --- a/RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl @@ -9,10 +9,11 @@ }, "payload" : { - <#switch appointment.AppointmentType> + <#include "RPtoRFX_CarrierAppointmentDataUpdated.ftl"> + "unloading_appointment" : "${eventRP.appointmentCustomFields.unloading?json_string}", + "load_appointment" : "${eventRP.appointmentCustomFields.loading?json_string}", + <#switch appointment.AppointmentType> <#case "APPOINTMENT_TYPE_LOADING"> - "unloading_appointment" : "false", - "load_appointment" : "true", <#if appointment.TimeZone?? && appointment.TimeZone!=""> "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)}", @@ -22,8 +23,6 @@ <#break> <#case "APPOINTMENT_TYPE_UNLOADING"> - "unloading_appointment" : "true", - "load_appointment" : "false", <#if appointment.TimeZone?? && appointment.TimeZone!=""> "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)}", diff --git a/RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl similarity index 92% rename from RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl rename to RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl index 84ad5eb..5af02ee 100644 --- a/RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl +++ b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl @@ -8,9 +8,10 @@ }, "payload" : { + <#include "RPtoRFX_CarrierAppointmentDataUpdated.ftl"> <#switch appointment.AppointmentType> <#case "APPOINTMENT_TYPE_LOADING"> - "unloading_appointment" : "false", + "unloading_appointment" : "false", "load_appointment" : "true", <#if appointment.TimeZone?? && appointment.TimeZone!=""> "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", @@ -21,8 +22,8 @@ <#break> <#case "APPOINTMENT_TYPE_UNLOADING"> - "unloading_appointment" : "true", - "load_appointment" : "false", + "unloading_appointment" : "true", + "load_appointment" : "false", <#if appointment.TimeZone?? && appointment.TimeZone!=""> "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)}", From dc28a7be8af549668900e6f9ed6a8b05aa86c2b2 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 2 Feb 2026 11:25:53 +0100 Subject: [PATCH 04/46] SCPN1-10100 --- ...RP_HsrCarrierApt_UpdateSlotAppointment.ftl | 84 ------------------- 1 file changed, 84 deletions(-) delete mode 100644 RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl diff --git a/RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl b/RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl deleted file mode 100644 index 945d8b9..0000000 --- a/RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl +++ /dev/null @@ -1,84 +0,0 @@ -[ - { - <#assign creation_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) /> - "Header":{ - "ProjectID": "${projectRP}" - }, - <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> - <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", - <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", - - <#else> - <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}", - <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", - - - "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" > - - <#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"> - <#if carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-") || carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") > - <#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend is not initialized" > - - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING> - <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) /> - <#if (duration <= 0)> - <#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend are not valid" > - - <#else> - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN> - <#assign duration = 0 /> <#-- à confirmer --> - - - - "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"> - <#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> - <#stop "Appointment type not supported" > - - - - }] - - } -] \ No newline at end of file From d507003c2b4c7137d304a0fbd3a158d18582f8dc Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 4 Feb 2026 08:58:03 +0100 Subject: [PATCH 05/46] SCPN1-10100 --- RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl index 6db8491..d07685e 100644 --- a/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl @@ -94,10 +94,11 @@ "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}", + "ExecutionflowID":"${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}", + "OrderID": "${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": "${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}", - "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>, From c9cba04714f546bb92c0114456524e65d952012e Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Fri, 13 Feb 2026 09:49:18 +0000 Subject: [PATCH 06/46] Merge branch 'SCPN1-9965-tiny-url-appointment' into 'develop' SCPN1-9965 Closes SCPN1-9965 See merge request r-d-technique/tiers/reflex-wms-connector!242 (cherry picked from commit 8974632c2226aed93769d792ab3a2171cb3073c9) --- RPtoRFX_CarrierAppointmentCreated.ftl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/RPtoRFX_CarrierAppointmentCreated.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl index 7c34845..8383d44 100644 --- a/RPtoRFX_CarrierAppointmentCreated.ftl +++ b/RPtoRFX_CarrierAppointmentCreated.ftl @@ -1,4 +1,10 @@ { + <#assign appointmentPathURL = JsonUtil.getAppointmentPathURL(eventRP.site,eventRP.refid)> + <#assign payLoad = '{ "Header": {"ProjectID": "${projectRP!""}"},,"IsOnce": false,"IsPublic": true,"TimeToLive": "0","URL": "${appointmentPathURL}"}' /> + <#assign projectGetTinyURL = QueryApiReflexPlatformID.ProjectGetTinyURL> + <#assign response = QueryApiReflexPlatformCall.call(projectGetTinyURL,payLoad) /> + <#assign tinyURL = JsonUtil.jsonToMap(response)> + "id" : {"refid" : "${eventRP.refid?json_string}","actorID":"${RPtoRFXprefixDepot(eventRP.actor)}"}, "route" : "rest/public/v1/physical_depots/{physical_depot_code}/carrier_appointments", "method" : "POST", @@ -7,6 +13,16 @@ }, "payload" : { + <#if tinyURL?? && tinyURL.TinyURL?? > + "comment_list": [ + { + "line_number": 1, + "group_code": "SCN", + "text": "${tinyURL.TinyURL.URL?json_string}" + } + ], + + "appointment_reference": "${eventRP.refid?json_string}", <#switch appointment.AppointmentType> <#case "APPOINTMENT_TYPE_LOADING"> From 7c4c7ea3957fce0e8d643a463f77b4cb888e8df9 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Fri, 13 Feb 2026 10:58:13 +0100 Subject: [PATCH 07/46] SCPN1-9965 --- RPtoRFX_CarrierAppointmentCreated.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RPtoRFX_CarrierAppointmentCreated.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl index 8383d44..7a0c309 100644 --- a/RPtoRFX_CarrierAppointmentCreated.ftl +++ b/RPtoRFX_CarrierAppointmentCreated.ftl @@ -1,6 +1,6 @@ { <#assign appointmentPathURL = JsonUtil.getAppointmentPathURL(eventRP.site,eventRP.refid)> - <#assign payLoad = '{ "Header": {"ProjectID": "${projectRP!""}"},,"IsOnce": false,"IsPublic": true,"TimeToLive": "0","URL": "${appointmentPathURL}"}' /> + <#assign payLoad = '{ "Header": {"ProjectID": "${projectRP!""}"},"IsOnce": false,"IsPublic": true,"TimeToLive": "0","URL": "${appointmentPathURL}"}' /> <#assign projectGetTinyURL = QueryApiReflexPlatformID.ProjectGetTinyURL> <#assign response = QueryApiReflexPlatformCall.call(projectGetTinyURL,payLoad) /> <#assign tinyURL = JsonUtil.jsonToMap(response)> From 2c9d3109b71686b4d517e5dc334a65d04ccab0a4 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Mon, 16 Feb 2026 11:48:56 +0100 Subject: [PATCH 08/46] SCPN1-9965 (cherry picked from commit e24e537650f4f24e4118a52109d52dd8a954fc1b) --- RPtoRFX_CarrierAppointmentCreated.ftl | 16 ---------------- RPtoRFX_CarrierAppointmentDefaultData.ftl | 22 +++++++++++++++++++++- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentCreated.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl index 7a0c309..7c34845 100644 --- a/RPtoRFX_CarrierAppointmentCreated.ftl +++ b/RPtoRFX_CarrierAppointmentCreated.ftl @@ -1,10 +1,4 @@ { - <#assign appointmentPathURL = JsonUtil.getAppointmentPathURL(eventRP.site,eventRP.refid)> - <#assign payLoad = '{ "Header": {"ProjectID": "${projectRP!""}"},"IsOnce": false,"IsPublic": true,"TimeToLive": "0","URL": "${appointmentPathURL}"}' /> - <#assign projectGetTinyURL = QueryApiReflexPlatformID.ProjectGetTinyURL> - <#assign response = QueryApiReflexPlatformCall.call(projectGetTinyURL,payLoad) /> - <#assign tinyURL = JsonUtil.jsonToMap(response)> - "id" : {"refid" : "${eventRP.refid?json_string}","actorID":"${RPtoRFXprefixDepot(eventRP.actor)}"}, "route" : "rest/public/v1/physical_depots/{physical_depot_code}/carrier_appointments", "method" : "POST", @@ -13,16 +7,6 @@ }, "payload" : { - <#if tinyURL?? && tinyURL.TinyURL?? > - "comment_list": [ - { - "line_number": 1, - "group_code": "SCN", - "text": "${tinyURL.TinyURL.URL?json_string}" - } - ], - - "appointment_reference": "${eventRP.refid?json_string}", <#switch appointment.AppointmentType> <#case "APPOINTMENT_TYPE_LOADING"> diff --git a/RPtoRFX_CarrierAppointmentDefaultData.ftl b/RPtoRFX_CarrierAppointmentDefaultData.ftl index 93b4aa7..f4a57b4 100644 --- a/RPtoRFX_CarrierAppointmentDefaultData.ftl +++ b/RPtoRFX_CarrierAppointmentDefaultData.ftl @@ -18,4 +18,24 @@ Timestamp : .Timestamp.DateTime or .Timestamp.AuthorTimeZone Int : .Int String : .String ---> \ No newline at end of file +--> + +<#-- Note : you can send url path of appointment to WMS, using this below code --> + +<#-- + <#assign appointmentPathURL = JsonUtil.getAppointmentPathURL(eventRP.site,eventRP.refid)> + <#assign payLoad = '{ "Header": {"ProjectID": "${projectRP!""}"},"IsOnce": false,"IsPublic": true,"TimeToLive": "0","URL": "${appointmentPathURL}"}' /> + <#assign projectGetTinyURL = QueryApiReflexPlatformID.ProjectGetTinyURL> + <#assign response = QueryApiReflexPlatformCall.call(projectGetTinyURL,payLoad) /> + <#assign tinyURL = JsonUtil.jsonToMap(response)> + + <#if tinyURL?? && tinyURL.TinyURL?? > + "comment_list": [ + { + "line_number": 1, + "group_code": "SCN", + "text": "${tinyURL.TinyURL.URL?json_string}" + } + ], + +--> \ No newline at end of file From df8f126c13a5116b52f92d89cfa30b5abbd1e3a3 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 16 Feb 2026 17:12:02 +0100 Subject: [PATCH 09/46] SCPN1-10244 --- ...pointmentCarrierInformationUpdatedToConfigure.ftl | 12 ++++++------ ...rierApt_AppointmentMetadataUpdatedToConfigure.ftl | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt_AppointmentCarrierInformationUpdatedToConfigure.ftl b/RFXtoRP_HsrCarrierApt_AppointmentCarrierInformationUpdatedToConfigure.ftl index b74a5e4..39cf8d2 100644 --- a/RFXtoRP_HsrCarrierApt_AppointmentCarrierInformationUpdatedToConfigure.ftl +++ b/RFXtoRP_HsrCarrierApt_AppointmentCarrierInformationUpdatedToConfigure.ftl @@ -7,20 +7,20 @@ "ID": { <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", + "RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}" <#else> - "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}" <#else> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "RefID": "${carrier_apt.appointment_reference?json_string}", + "RefID": "${carrier_apt.appointment_reference?json_string}" <#else> - "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}" - } + }, "Payload": { - "ActorID": "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", <#--To configure--> <#-- "CarrierInformation": [ { diff --git a/RFXtoRP_HsrCarrierApt_AppointmentMetadataUpdatedToConfigure.ftl b/RFXtoRP_HsrCarrierApt_AppointmentMetadataUpdatedToConfigure.ftl index e7bdd97..4f2bec9 100644 --- a/RFXtoRP_HsrCarrierApt_AppointmentMetadataUpdatedToConfigure.ftl +++ b/RFXtoRP_HsrCarrierApt_AppointmentMetadataUpdatedToConfigure.ftl @@ -20,7 +20,7 @@ }, "Payload": { - "ActorID": "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", <#--To configure--> <#-- "MetaData": [ { From f1dc82cdf0b98222eebb8a2596ed07242f034503 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Fri, 20 Feb 2026 13:52:18 +0100 Subject: [PATCH 10/46] SCPN1-10276 --- RPtoRFX_AppointmentEvent.ftl | 133 +++++++++++++++++++++-------------- 1 file changed, 79 insertions(+), 54 deletions(-) diff --git a/RPtoRFX_AppointmentEvent.ftl b/RPtoRFX_AppointmentEvent.ftl index 741cf96..d7e5248 100644 --- a/RPtoRFX_AppointmentEvent.ftl +++ b/RPtoRFX_AppointmentEvent.ftl @@ -24,72 +24,95 @@ ] <#break> <#-- *********************************************** Action = CommissionsUpdated ******************** --> - <#case "CommissionsUpdated"> + <#case "Updated"> + <#assign AddComma = false /> <#assign appointment = eventRP.data /> - [ <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING"> - <#if eventRP.addedCommissions?? && eventRP.addedCommissions!=""> - <#if eventRP.appointmentCustomFields?has_content> - { - <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_number> - "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl"> - } - <#else> - { - <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_ref> - "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl"> - } - - - <#if eventRP.removedCommissions?? && eventRP.removedCommissions!=""> - <#if eventRP.addedCommissions?? && eventRP.addedCommissions!=""> - , - - - <#if eventRP.appointmentCustomFields?has_content> - { - <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_dissociations_by_number> - "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl"> - } - <#else> - { - <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_dissociations_by_ref> - "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl"> - } - - - <#else> + [ + <#if eventRP.commissionsUpdated> + <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING" && eventRP.addedUnloadCommissions?? && eventRP.addedCaddedUnloadCommissionsommissions!=""> <#if eventRP.appointmentCustomFields?has_content> { - <#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_number> + <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_number> "apiRestReflexID" : "${apiRestReflexID}", "datas" : - <#include "RPtoRFX_CarrierAppointmentReasonUpdatedByNumber.ftl"> + <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl"> } <#else> { - <#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_ref> + <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_ref> "apiRestReflexID" : "${apiRestReflexID}", "datas" : - <#include "RPtoRFX_CarrierAppointmentReasonUpdatedByRef.ftl"> + <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl"> } + <#assign AddComma = true /> + + <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING" && eventRP.removedUnloadCommissions?? && eventRP.removedCaddedUnloadCommissionsommissions!=""> + <#if AddComma == true> + , + + + <#if eventRP.appointmentCustomFields?has_content> + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_dissociations_by_number> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl"> + } + <#else> + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_dissociations_by_ref> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl"> + } + + <#assign AddComma = true /> + + <#if appointment.AppointmentType == "APPOINTMENT_TYPE_LOADING" && eventRP.addedloadCommissions?? && eventRP.addedCaddedloadCommissionsommissions!=""> + <#if eventRP.appointmentCustomFields?has_content> + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_number> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl"> + } + <#else> + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_ref> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl"> + } + + <#assign AddComma = true /> + + <#if appointment.AppointmentType == "APPOINTMENT_TYPE_LOADING" && eventRP.removedloadCommissions?? && eventRP.removedCaddedloadCommissionsommissions!=""> + <#if AddComma == true> + , + + <#if eventRP.appointmentCustomFields?has_content> + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_dissociations_by_number> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl"> + } + <#else> + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_dissociations_by_ref> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl"> + } + + <#assign AddComma = true /> + + + <#if eventRP.reasonUpdated || eventRP.slotUpdated || eventRP.carrierInformationUpdated> + <#if AddComma == true> + , - ] - <#break> -<#-- *********************************************** Action = SlotUpdated or CarrierInformationUpdated ******************** --> - <#case "SlotUpdated"> - <#case "CarrierInformationUpdated"> - <#case "ReasonUpdated"> - <#assign appointment = eventRP.data /> - [ <#if eventRP.appointmentCustomFields?has_content> { <#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_number> @@ -105,7 +128,9 @@ <#include "RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl"> } - ] + <#assign AddComma = true /> + + ] <#break> <#-- *********************************************** Action = SlotUpdated ******************** --> <#case "Canceled"> From c0d58766d21a604ba4fff3c5f6f536c828dc57ae Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 24 Feb 2026 11:37:11 +0100 Subject: [PATCH 11/46] SCPN1-10294 --- RFXtoRP_HsaItm_ItemCreated.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RFXtoRP_HsaItm_ItemCreated.ftl b/RFXtoRP_HsaItm_ItemCreated.ftl index 4433f6e..ecfee3d 100644 --- a/RFXtoRP_HsaItm_ItemCreated.ftl +++ b/RFXtoRP_HsaItm_ItemCreated.ftl @@ -24,9 +24,9 @@ <#include "RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl"> <#-- Item Photo URI could be added here --> - <#if item.url?? && item.url!=""> + <#if item.saved_picture_path?? && item.saved_picture_path!=""> , - "PhotoURI": "${item.url?json_string}" + "PhotoURI": "${item.saved_picture_path?json_string}" <#-- Loop for the Logistical Variants - LV --> From b4314fb6b1484aebef423b407180c92d462fc75c Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 24 Feb 2026 15:04:19 +0100 Subject: [PATCH 12/46] SCPN1-10294 --- 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 ecfee3d..e7cb4bc 100644 --- a/RFXtoRP_HsaItm_ItemCreated.ftl +++ b/RFXtoRP_HsaItm_ItemCreated.ftl @@ -24,7 +24,7 @@ <#include "RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl"> <#-- Item Photo URI could be added here --> - <#if item.saved_picture_path?? && item.saved_picture_path!=""> + <#if item.saved_picture_path?? && item.saved_picture_path!="" && item.saved_picture_path?starts_with("http") == true> , "PhotoURI": "${item.saved_picture_path?json_string}" From b61d45d1aa97c0d9dce9fbb6935be7e0e59dd78d Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 25 Feb 2026 11:05:10 +0100 Subject: [PATCH 13/46] SCPN1-10294 --- RFXtoRP_HsaItm_ItemCreated.ftl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/RFXtoRP_HsaItm_ItemCreated.ftl b/RFXtoRP_HsaItm_ItemCreated.ftl index e7cb4bc..a6ad061 100644 --- a/RFXtoRP_HsaItm_ItemCreated.ftl +++ b/RFXtoRP_HsaItm_ItemCreated.ftl @@ -25,8 +25,13 @@ <#-- Item Photo URI could be added here --> <#if item.saved_picture_path?? && item.saved_picture_path!="" && item.saved_picture_path?starts_with("http") == true> - , + , "PhotoURI": "${item.saved_picture_path?json_string}" + <#else> + <#if item.url?? && item.url!="" && item.url?starts_with("http") == true> + , + "PhotoURI": "${item.url?json_string}" + <#-- Loop for the Logistical Variants - LV --> From 5eb415bfd38fa0f812c07e1cc0b606e04bfaea3f Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Wed, 25 Feb 2026 18:47:58 +0100 Subject: [PATCH 14/46] SCPN1-10253SCPN1-8260SCPN1-10253 --- RFXtoRP_HsrCarrierApt.ftl | 21 +- ...HsrCarrierApt_BookingCancelAppointment.ftl | 58 ++++++ ...CarrierApt_BookingForceBookAppointment.ftl | 183 ++++++++++++++++++ ...CarrierApt_BookingWMSUpdateAppointment.ftl | 164 ++++++++++++++++ RFXtoRP_HsrCarrierApt_ProjectQuantities.ftl | 5 + RFXtoRP_HsrCarrierApt_TotalQuantities.ftl | 5 + RPtoRFX_AppointmentEvent.ftl | 42 +--- RPtoRFX_CarrierAppointmentCreated.ftl | 46 ++--- ...mentPhysicalReceiptAssociationByNumber.ftl | 8 +- ...intmentPhysicalReceiptAssociationByRef.ftl | 8 +- ...entPhysicalReceiptDissociationByNumber.ftl | 8 +- ...ntmentPhysicalReceiptDissociationByRef.ftl | 8 +- 12 files changed, 479 insertions(+), 77 deletions(-) create mode 100644 RFXtoRP_HsrCarrierApt_BookingCancelAppointment.ftl create mode 100644 RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl create mode 100644 RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl create mode 100644 RFXtoRP_HsrCarrierApt_ProjectQuantities.ftl create mode 100644 RFXtoRP_HsrCarrierApt_TotalQuantities.ftl diff --git a/RFXtoRP_HsrCarrierApt.ftl b/RFXtoRP_HsrCarrierApt.ftl index 7f8fe5f..9106a94 100644 --- a/RFXtoRP_HsrCarrierApt.ftl +++ b/RFXtoRP_HsrCarrierApt.ftl @@ -7,8 +7,9 @@ <#include "ReflexUtils.ftl"> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> -<#assign projectRP = project> -<#assign organisationRP = organisation> +<#assign projectRP = project> +<#assign organisationRP = organisation> +<#assign partnerApplicationRP = partnerApplication> <#assign aDateTime = .now> @@ -20,10 +21,10 @@ <#-- *********************************************** Action = CREATE or UPDATE ******************** --> [ { - <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteForceBookAppointment> + <#assign apiReflexPlatformID = ApiReflexPlatformID.BookingForceBookAppointment> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : - <#include "RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl"> + <#include "RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl"> } ] <#break> @@ -41,10 +42,10 @@ <#if carrier_apt.status?? && (carrier_apt.status.status_code=="999" || carrier_apt.status.status_code=="040" || carrier_apt.status.status_code=="030")> [ { - <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteCancelAppointment> + <#assign apiReflexPlatformID = ApiReflexPlatformID.BookingCancelAppointment> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : - <#include "RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl"> + <#include "RFXtoRP_HsrCarrierApt_BookingCancelAppointment.ftl"> } ] <#else> @@ -110,10 +111,10 @@ <#else> [ { - <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteWMSUpdateAppointment> + <#assign apiReflexPlatformID = ApiReflexPlatformID.BookingWMSUpdateAppointment> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : - <#include "RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl"> + <#include "RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl"> } ] @@ -130,10 +131,10 @@ [ <#-- Ajout des lignes--> { - <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteCancelAppointment> + <#assign apiReflexPlatformID = ApiReflexPlatformID.BookingCancelAppointment> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : - <#include "RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl"> + <#include "RFXtoRP_HsrCarrierApt_BookingCancelAppointment.ftl"> } ] <#break> diff --git a/RFXtoRP_HsrCarrierApt_BookingCancelAppointment.ftl b/RFXtoRP_HsrCarrierApt_BookingCancelAppointment.ftl new file mode 100644 index 0000000..f86f788 --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_BookingCancelAppointment.ftl @@ -0,0 +1,58 @@ +<#assign update_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) /> +[ + { + "ID":{ + <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + "RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", + <#else> + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + + <#else> + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + "RefID": "${carrier_apt.appointment_reference?json_string}", + <#else> + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + + + "RefDate": { + "DateTime": "${update_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + }, + "CustomFields": [ + { + "Key": "depot", + "Value": "${carrier_apt.physical_depot?json_string}" + }, + { + "Key": "year", + "Value": "${carrier_apt.year_number?json_string}" + }, + { + "Key": "number", + "Value": "${carrier_apt.appointment_number?json_string}" + }, + { + "Key": "reference", + "Value": "${carrier_apt.appointment_reference?json_string}" + }, + { + "Key": "carrier", + "Value": "${carrier_apt.planned_carrier?json_string}" + }, + { + "Key": "loading", + "Value": "${carrier_apt.load_appointment?json_string}" + }, + { + "Key": "unloading", + "Value": "${carrier_apt.unloading_appointment?json_string}" + } + ] + + }, + "Header": { + "ProjectID": "${projectRP}:${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" + } + } +] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl new file mode 100644 index 0000000..5ef9252 --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl @@ -0,0 +1,183 @@ +[ + <#assign creation_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) /> + { + "Header":{ + "ProjectID": "${projectRP}:${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" + }, + "ID":{ + "RefDate": { + "DateTime": "${creation_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + }, + <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + "RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", + <#else> + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + + <#else> + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + "RefID": "${carrier_apt.appointment_reference?json_string}", + <#else> + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + + + "CustomFields": [ + { + "Key": "depot", + "Value": "${carrier_apt.physical_depot?json_string}" + }, + { + "Key": "year", + "Value": "${carrier_apt.year_number?json_string}" + }, + { + "Key": "number", + "Value": "${carrier_apt.appointment_number?json_string}" + }, + { + "Key": "reference", + "Value": "${carrier_apt.appointment_reference?json_string}" + }, + { + "Key": "carrier", + "Value": "${carrier_apt.planned_carrier?json_string}" + }, + { + "Key": "loading", + "Value": "${carrier_apt.load_appointment?json_string}" + }, + { + "Key": "unloading", + "Value": "${carrier_apt.unloading_appointment?json_string}" + } + ] + }, + "Payload": { + "TimeZone":"${time_zone_rfx}", + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> + <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") || carrier_apt.planned_unloading_end_datetime?starts_with("00") || carrier_apt.planned_unloading_end_datetime?contains("-00-")> + <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend is not initialized" > + + <#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"> + <#if carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-") || carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") > + <#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend is not initialized" > + + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING> + <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) /> + <#if (duration <= 0)> + <#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend are not valid" > + + <#else> + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN> + <#assign duration = 0 /> + + + + "AppointmentType": "${appointmentType}", + "Emails": ["${carrier_apt.creation_user_email?json_string}"], + + <#include "RFXtoRP_HsrCarrierApt_SegmentationSelections.ftl">, + <#include "RFXtoRP_HsrCarrierApt_CarrierInformation.ftl">, + <#include "RFXtoRP_HsrCarrierApt_MetadataAppointment.ftl">, + <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0)> + "Unloading" : + { + "Projects" : [{ + "Commissions": [ + <#list carrier_apt.physical_receipt_list?filter(l ->l??) as physical_receipt> + { + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", + <#if physical_receipt.physical_receipt_reference?? && physical_receipt.physical_receipt_reference!=""> + "OrderID": "${physical_receipt.physical_receipt_reference?json_string}", + <#else> + "OrderID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year}${physical_receipt.receipt_number}", + + "ExecutionflowID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year?json_string}${physical_receipt.receipt_number?json_string}", + "ProjectID": "${projectRP}", + "PartnerAppID": "${partnerApplicationRP}", + "OrganisationID": "${organisationRP}", + <#include "RFXtoRP_HsrCarrierApt_Quantities.ftl"> + }<#sep>, + + ], + "ProjectID" : "${projectRP}", + <#include "RFXtoRP_HsrCarrierApt_ProjectQuantities.ftl"> + }], + <#include "RFXtoRP_HsrCarrierApt_TotalQuantities.ftl"> + }, + <#else> + "Loading" : + { + "Projects" : [{ + "Commissions": [{ + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", + "ProjectID": "${projectRP}", + "PartnerAppID": "${partnerApplicationRP}", + "OrganisationID": "${organisationRP}", + <#include "RFXtoRP_HsrCarrierApt_Quantities.ftl"> + }], + "ProjectID" : "${projectRP}:${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", + <#include "RFXtoRP_HsrCarrierApt_ProjectQuantities.ftl"> + }], + <#include "RFXtoRP_HsrCarrierApt_TotalQuantities.ftl"> + }, + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> + "Reason": "UNLOADING AND LOADING / ${carrier_apt.appointment_designation?json_string}", + <#else> + <#if carrier_apt.appointment_designation?? && carrier_apt.appointment_designation!=""> + "Reason": "${carrier_apt.appointment_designation?json_string}", + <#else> + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + "Reason": "${carrier_apt.appointment_reference?json_string}", + <#else> + "Reason": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + + + + + "Slot": { + <#-- calcul de de la durée en fonction des start et end time--> + "DurationInSeconds": "${duration}", + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false" > + <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-")> + <#stop "planned_unloading_start_datetime field of appointmend is not initialized" > + + "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"> + <#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> + <#stop "Appointment type not supported" > + + + + } + } + } +] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl new file mode 100644 index 0000000..7085a3e --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl @@ -0,0 +1,164 @@ +[ + { + <#assign update_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) /> + + "Header":{ + "ProjectID": "${projectRP}:${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" + }, + "ID":{ + "RefDate": { + "DateTime": "${update_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + }, + <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + "RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", + <#else> + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + + <#else> + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + "RefID": "${carrier_apt.appointment_reference?json_string}", + <#else> + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + + + "CustomFields": [ + { + "Key": "depot", + "Value": "${carrier_apt.physical_depot?json_string}" + }, + { + "Key": "year", + "Value": "${carrier_apt.year_number?json_string}" + }, + { + "Key": "number", + "Value": "${carrier_apt.appointment_number?json_string}" + }, + { + "Key": "reference", + "Value": "${carrier_apt.appointment_reference?json_string}" + }, + { + "Key": "carrier", + "Value": "${carrier_apt.planned_carrier?json_string}" + }, + { + "Key": "loading", + "Value": "${carrier_apt.load_appointment?json_string}" + }, + { + "Key": "unloading", + "Value": "${carrier_apt.unloading_appointment?json_string}" + } + ] + }, + "Payload": { + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> + <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") || carrier_apt.planned_unloading_end_datetime?starts_with("00") || carrier_apt.planned_unloading_end_datetime?contains("-00-")> + <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend is not initialized" > + + <#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"> + <#if carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-") || carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") > + <#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend is not initialized" > + + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING> + <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) /> + <#if (duration <= 0)> + <#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend are not valid" > + + <#else> + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN> + <#assign duration = 0 /> + + + + "TimeZone":"${time_zone_rfx}", + <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0) && ((carrier_apt.unloading_appointment =="true" && carrier_apt.load_appointment =="false") || (carrier_apt.unloading_appointment =="false" && carrier_apt.load_appointment =="true"))> + "Unloading" : + { + "Projects" : [ + { + "Commissions": [ + <#list carrier_apt.physical_receipt_list?filter(l ->l??) as physical_receipt> + { + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", + <#if physical_receipt.physical_receipt_reference?? && physical_receipt.physical_receipt_reference!=""> + "OrderID": "${physical_receipt.physical_receipt_reference?json_string}", + <#else> + "OrderID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year}${physical_receipt.receipt_number}", + + "ExecutionflowID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year?json_string}${physical_receipt.receipt_number?json_string}", + "ProjectID": "${projectRP}", + "PartnerAppID": "${partnerApplicationRP}", + "OrganisationID": "${organisationRP}", + <#include "RFXtoRP_HsrCarrierApt_Quantities.ftl"> + }<#sep>, + + ], + "ProjectID" : "${projectRP}", + <#include "RFXtoRP_HsrCarrierApt_ProjectQuantities.ftl"> + }], + <#include "RFXtoRP_HsrCarrierApt_TotalQuantities.ftl"> + }, + <#else> + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> + "Reason": "UNLOADING AND LOADING / ${carrier_apt.appointment_designation?json_string}", + <#else> + <#if carrier_apt.appointment_designation?? && carrier_apt.appointment_designation!=""> + "Reason": "${carrier_apt.appointment_designation?json_string}", + <#else> + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + "Reason": "${carrier_apt.appointment_reference?json_string}", + <#else> + "Reason": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + + + + + "Slot": { + <#-- calcul de de la durée en fonction des start et end time--> + "DurationInSeconds": "${duration}", + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false" > + <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-")> + <#stop "planned_unloading_start_datetime field of appointmend is not initialized" > + + "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"> + <#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> + <#stop "Appointment type not supported" > + + + + } + } + } +] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_ProjectQuantities.ftl b/RFXtoRP_HsrCarrierApt_ProjectQuantities.ftl new file mode 100644 index 0000000..6c84c6f --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_ProjectQuantities.ftl @@ -0,0 +1,5 @@ +"ProjectQuantities": [ + + ] + + diff --git a/RFXtoRP_HsrCarrierApt_TotalQuantities.ftl b/RFXtoRP_HsrCarrierApt_TotalQuantities.ftl new file mode 100644 index 0000000..61bfaac --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_TotalQuantities.ftl @@ -0,0 +1,5 @@ +"TotalQuantities": [ + + ] + + diff --git a/RPtoRFX_AppointmentEvent.ftl b/RPtoRFX_AppointmentEvent.ftl index d7e5248..384e680 100644 --- a/RPtoRFX_AppointmentEvent.ftl +++ b/RPtoRFX_AppointmentEvent.ftl @@ -69,46 +69,8 @@ <#assign AddComma = true /> - <#if appointment.AppointmentType == "APPOINTMENT_TYPE_LOADING" && eventRP.addedloadCommissions?? && eventRP.addedCaddedloadCommissionsommissions!=""> - <#if eventRP.appointmentCustomFields?has_content> - { - <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_number> - "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl"> - } - <#else> - { - <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_ref> - "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl"> - } - - <#assign AddComma = true /> - - <#if appointment.AppointmentType == "APPOINTMENT_TYPE_LOADING" && eventRP.removedloadCommissions?? && eventRP.removedCaddedloadCommissionsommissions!=""> - <#if AddComma == true> - , - - <#if eventRP.appointmentCustomFields?has_content> - { - <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_dissociations_by_number> - "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl"> - } - <#else> - { - <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_dissociations_by_ref> - "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl"> - } - - <#assign AddComma = true /> - - + +<#-- *********************************************** Action = reasonUpdated or slotUpdated ******************** --> <#if eventRP.reasonUpdated || eventRP.slotUpdated || eventRP.carrierInformationUpdated> <#if AddComma == true> , diff --git a/RPtoRFX_CarrierAppointmentCreated.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl index 7c34845..8c0b2f5 100644 --- a/RPtoRFX_CarrierAppointmentCreated.ftl +++ b/RPtoRFX_CarrierAppointmentCreated.ftl @@ -35,31 +35,31 @@ <#stop "appointment.AppointmentType not implemented" > <#include "RPtoRFX_CarrierAppointmentDefaultData.ftl"> - <#if appointment.Commissions??> - <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING"> - <#if appointment.Commissions[0].OrderID?? && appointment.Commissions[0].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}" + <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING" > + <#if appointment.Unloading?? && appointment.Unloading.Projects?? && appointment.Unloading.Projects[0]?? && + appointment.Unloading.Projects[0].Commissions?? && + appointment.Unloading.Projects[0].Commissions[0]?? && + appointment.Unloading.Projects[0].Commissions[0].OrderID?? && + appointment.Unloading.Projects[0].Commissions[0].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}", - + } + <#sep>, + + ], <#else> - <#if appointment.AppointmentType == "APPOINTMENT_TYPE_LOADING"> - <#if appointment.AppointmentType == "APPOINTMENT_TYPE_LOADING"> - "appointment_designation":"${(appointment.Reason!"")?json_string}", - - + "appointment_designation":"${(appointment.Reason!"")!?json_string}", + + <#else> + <#if appointment.AppointmentType == "APPOINTMENT_TYPE_LOADING"> + "appointment_designation":"${(appointment.Reason!"")?json_string}", "constant_appointment": "false" diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl index 39f9177..da1299f 100644 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl @@ -10,8 +10,14 @@ "payload" : { <#assign executionflowCustomFields = eventRP.executionflowCustomFields > + <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING"> + <#assign addedCommissions = eventRP.addedUnloadCommissions /> + <#else> + <#assign addedCommissions = eventRP.addedLoadCommissions /> + + "physical_receipt_list": [ - <#list eventRP.addedCommissions as addedCommission> + <#list addedCommissions as addedCommission> { "receipt_activity": "${executionflowCustomFields[addedCommission.ExecutionflowID].activity_code?json_string}", "originator_code": "${executionflowCustomFields[addedCommission.ExecutionflowID].originator_code?json_string}", diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl index 333c8a0..60e2655 100644 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl @@ -9,8 +9,14 @@ "payload" : { <#assign executionflowCustomFields = eventRP.executionflowCustomFields > + <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING"> + <#assign addedCommissions = eventRP.addedUnloadCommissions /> + <#else> + <#assign addedCommissions = eventRP.addedLoadCommissions /> + + "physical_receipt_list": [ - <#list eventRP.addedCommissions as addedCommission> + <#list addedCommissions as addedCommission> { "receipt_activity": "${executionflowCustomFields[addedCommission.ExecutionflowID].activity_code?json_string}", "originator_code": "${executionflowCustomFields[addedCommission.ExecutionflowID].originator_code?json_string}", diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl index 2a3e93c..7f09d94 100644 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl @@ -10,8 +10,14 @@ "payload" : { <#assign executionflowCustomFields = eventRP.executionflowCustomFields > + <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING"> + <#assign removedCommissions = eventRP.removedUnloadCommissions /> + <#else> + <#assign removedCommissions = eventRP.removedLoadCommissions /> + + "physical_receipt_list": [ - <#list eventRP.removedCommissions as removedCommission> + <#list removedCommissions as removedCommission> { "receipt_activity": "${executionflowCustomFields[removedCommission.ExecutionflowID].activity_code?json_string}", "originator_code": "${executionflowCustomFields[removedCommission.ExecutionflowID].originator_code?json_string}", diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl index 2cc8e4c..6f9691e 100644 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl @@ -9,8 +9,14 @@ "payload" : { <#assign executionflowCustomFields = eventRP.executionflowCustomFields > + <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING"> + <#assign removedCommissions = eventRP.removedUnloadCommissions /> + <#else> + <#assign removedCommissions = eventRP.removedLoadCommissions /> + + "physical_receipt_list": [ - <#list eventRP.removedCommissions as removedCommission> + <#list removedCommissions as removedCommission> { "receipt_activity": "${executionflowCustomFields[removedCommission.ExecutionflowID].activity_code?json_string}", "originator_code": "${executionflowCustomFields[removedCommission.ExecutionflowID].originator_code?json_string}", From 490355cab397083bac878f2096dd75caa2189f5d Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Thu, 26 Feb 2026 15:15:11 +0100 Subject: [PATCH 15/46] SCPN1-10253 --- ...CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl | 2 +- ...FX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl | 2 +- ...arrierAppointmentPhysicalReceiptDissociationByNumber.ftl | 2 +- ...X_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl | 2 +- ...erAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl | 6 ++++++ 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl index da1299f..5677a75 100644 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl @@ -17,7 +17,7 @@ "physical_receipt_list": [ - <#list addedCommissions as addedCommission> + <#list addedCommissions?filter(l -> l.ExecutionflowID??) as addedCommission> { "receipt_activity": "${executionflowCustomFields[addedCommission.ExecutionflowID].activity_code?json_string}", "originator_code": "${executionflowCustomFields[addedCommission.ExecutionflowID].originator_code?json_string}", diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl index 60e2655..d19ea66 100644 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl @@ -16,7 +16,7 @@ "physical_receipt_list": [ - <#list addedCommissions as addedCommission> + <#list addedCommissions?filter(l -> l.ExecutionflowID??) as addedCommission> { "receipt_activity": "${executionflowCustomFields[addedCommission.ExecutionflowID].activity_code?json_string}", "originator_code": "${executionflowCustomFields[addedCommission.ExecutionflowID].originator_code?json_string}", diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl index 7f09d94..f3f2b2b 100644 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl @@ -17,7 +17,7 @@ "physical_receipt_list": [ - <#list removedCommissions as removedCommission> + <#list removedCommissions?filter(l -> l.ExecutionflowID??) as removedCommission> { "receipt_activity": "${executionflowCustomFields[removedCommission.ExecutionflowID].activity_code?json_string}", "originator_code": "${executionflowCustomFields[removedCommission.ExecutionflowID].originator_code?json_string}", diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl index 6f9691e..85a66dc 100644 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl @@ -16,7 +16,7 @@ "physical_receipt_list": [ - <#list removedCommissions as removedCommission> + <#list removedCommissions?filter(l -> l.ExecutionflowID??) as removedCommission> { "receipt_activity": "${executionflowCustomFields[removedCommission.ExecutionflowID].activity_code?json_string}", "originator_code": "${executionflowCustomFields[removedCommission.ExecutionflowID].originator_code?json_string}", diff --git a/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl index a7d6ad5..74eee06 100644 --- a/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl @@ -13,7 +13,10 @@ "unloading_appointment" : "${eventRP.appointmentCustomFields.unloading?json_string}", "load_appointment" : "${eventRP.appointmentCustomFields.loading?json_string}", <#switch appointment.AppointmentType> + <#switch appointment.AppointmentType> <#case "APPOINTMENT_TYPE_LOADING"> + "unloading_appointment" : "false", + "load_appointment" : "true", <#if appointment.TimeZone?? && appointment.TimeZone!=""> "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)}", @@ -24,6 +27,9 @@ <#break> <#case "APPOINTMENT_TYPE_UNLOADING"> <#if appointment.TimeZone?? && appointment.TimeZone!=""> + "unloading_appointment" : "true", + "load_appointment" : "false", + <#if appointment.TimeZone?? && appointment.TimeZone!=""> "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)}", <#else> From 44c9ee7c0c0ba557e0840d7e18186aca1a6b1872 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Thu, 26 Feb 2026 15:48:51 +0100 Subject: [PATCH 16/46] SCPN1-10253 --- ...AppointmentSlotOrCarrierInformationUpdatedByNumber.ftl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl index 74eee06..784d148 100644 --- a/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl @@ -12,11 +12,12 @@ <#include "RPtoRFX_CarrierAppointmentDataUpdated.ftl"> "unloading_appointment" : "${eventRP.appointmentCustomFields.unloading?json_string}", "load_appointment" : "${eventRP.appointmentCustomFields.loading?json_string}", +<<<<<<< HEAD <#switch appointment.AppointmentType> +======= +>>>>>>> b1577d1 (SCPN1-10253) <#switch appointment.AppointmentType> <#case "APPOINTMENT_TYPE_LOADING"> - "unloading_appointment" : "false", - "load_appointment" : "true", <#if appointment.TimeZone?? && appointment.TimeZone!=""> "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)}", @@ -26,9 +27,12 @@ <#break> <#case "APPOINTMENT_TYPE_UNLOADING"> +<<<<<<< HEAD <#if appointment.TimeZone?? && appointment.TimeZone!=""> "unloading_appointment" : "true", "load_appointment" : "false", +======= +>>>>>>> b1577d1 (SCPN1-10253) <#if appointment.TimeZone?? && appointment.TimeZone!=""> "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)}", From 3c4bb8951620b930f24bebf78a312bbb952ddb89 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Fri, 27 Feb 2026 09:45:31 +0100 Subject: [PATCH 17/46] SCPN1-10253 --- ...RP_HsrCarrierApt_SiteCancelAppointment.ftl | 22 --- ...HsrCarrierApt_SiteForceBookAppointment.ftl | 158 ------------------ RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl | 150 ----------------- 3 files changed, 330 deletions(-) delete mode 100644 RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl delete mode 100644 RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl delete mode 100644 RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl diff --git a/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl deleted file mode 100644 index c4033a6..0000000 --- a/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl +++ /dev/null @@ -1,22 +0,0 @@ -<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) /> -[ - { - <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> - <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", - <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", - - <#else> - <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}", - <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", - - - "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 deleted file mode 100644 index 349ea78..0000000 --- a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl +++ /dev/null @@ -1,158 +0,0 @@ -[ - { - "Header":{ - "ProjectID": "${projectRP}" - }, - "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", - <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> - <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", - <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", - - <#else> - <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}", - <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", - - - "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_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"> - <#if carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-") || carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") > - <#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend is not initialized" > - - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING> - <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) /> - <#if (duration <= 0)> - <#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend are not valid" > - - <#else> - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN> - <#assign duration = 0 /> - - - - "AppointmentType": "${appointmentType}", - "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}" - }, - { - "Key": "loading", - "Value": "${carrier_apt.load_appointment?json_string}" - }, - { - "Key": "unloading", - "Value": "${carrier_apt.unloading_appointment?json_string}" - } - ], - <#include "RFXtoRP_HsrCarrierApt_SegmentationSelections.ftl">, - <#include "RFXtoRP_HsrCarrierApt_CarrierInformation.ftl">, - <#include "RFXtoRP_HsrCarrierApt_MetadataAppointment.ftl">, - <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0)> - "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}", - "ExecutionflowID": "${physical_receipt.physical_receipt_reference?trim?json_string}", - <#else> - "OrderID": "${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": "${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}", - <#include "RFXtoRP_HsrCarrierApt_Quantities.ftl"> - }<#sep>, - - ], - <#else> - "Commissions": [ - { - "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", - "ProjectID": "${projectRP}", - <#include "RFXtoRP_HsrCarrierApt_Quantities.ftl"> - } - ], - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> - "Reason": "UNLOADING AND LOADING / ${carrier_apt.appointment_designation?json_string}", - <#else> - <#if carrier_apt.appointment_designation?? && carrier_apt.appointment_designation!=""> - "Reason": "${carrier_apt.appointment_designation?json_string}", - <#else> - <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "Reason": "${carrier_apt.appointment_reference?json_string}", - <#else> - "Reason": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", - - - - - - "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"> - <#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> - <#stop "Appointment type not supported" > - - - - }] - } -] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl deleted file mode 100644 index d07685e..0000000 --- a/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl +++ /dev/null @@ -1,150 +0,0 @@ -[ - { - <#assign creation_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) /> - - "Header":{ - "ProjectID": "${projectRP}" - }, - <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> - <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", - <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", - - <#else> - <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}", - <#else> - "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", - - - <#if 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"> - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> - <#if carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-") || carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") > - <#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend is not initialized" > - - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING> - <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) /> - <#if (duration <= 0)> - <#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend are not valid" > - - <#else> - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN> - <#assign duration = 0 /> <#-- à confirmer --> - - - - - "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", - "TimeZone":"${time_zone_rfx}", - "CustomFields": [ - { - "Key": "depot", - "Value": "${carrier_apt.physical_depot?json_string}" - }, - { - "Key": "year", - "Value": "${carrier_apt.year_number?json_string}" - }, - { - "Key": "number", - "Value": "${carrier_apt.appointment_number?json_string}" - }, - { - "Key": "reference", - "Value": "${carrier_apt.appointment_reference?json_string}" - }, - { - "Key": "carrier", - "Value": "${carrier_apt.planned_carrier?json_string}" - }, - { - "Key": "loading", - "Value": "${carrier_apt.load_appointment?json_string}" - }, - { - "Key": "unloading", - "Value": "${carrier_apt.unloading_appointment?json_string}" - } - ], - <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0) && ((carrier_apt.unloading_appointment =="true" && carrier_apt.load_appointment =="false") || (carrier_apt.unloading_appointment =="false" && carrier_apt.load_appointment =="true"))> - "Commissions": [ - <#list carrier_apt.physical_receipt_list?filter(l ->l??) as physical_receipt> - { - "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", - <#if physical_receipt.physical_receipt_reference?? && physical_receipt.physical_receipt_reference!=""> - "OrderID": "${physical_receipt.physical_receipt_reference?json_string}", - "ExecutionflowID":"${physical_receipt.physical_receipt_reference?json_string}", - <#else> - "OrderID": "${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": "${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> - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> - "Reason": "UNLOADING AND LOADING / ${carrier_apt.appointment_designation?json_string}", - <#else> - <#if carrier_apt.appointment_designation?? && carrier_apt.appointment_designation!=""> - "Reason": "${carrier_apt.appointment_designation?json_string}", - <#else> - <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "Reason": "${carrier_apt.appointment_reference?json_string}", - <#else> - "Reason": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", - - - - - "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"> - <#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> - <#stop "Appointment type not supported" > - - - - }] - - } -] \ No newline at end of file From 4136118604de321fbe8348a37def27efeef29b09 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Fri, 27 Feb 2026 10:08:04 +0100 Subject: [PATCH 18/46] SCPN1-10253 --- RPtoRFX_AppointmentEvent.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RPtoRFX_AppointmentEvent.ftl b/RPtoRFX_AppointmentEvent.ftl index 384e680..57a0906 100644 --- a/RPtoRFX_AppointmentEvent.ftl +++ b/RPtoRFX_AppointmentEvent.ftl @@ -29,7 +29,7 @@ <#assign appointment = eventRP.data /> [ <#if eventRP.commissionsUpdated> - <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING" && eventRP.addedUnloadCommissions?? && eventRP.addedCaddedUnloadCommissionsommissions!=""> + <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING" && eventRP.addedUnloadCommissions?? && eventRP.addedUnloadCommissions !=""> <#if eventRP.appointmentCustomFields?has_content> { <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_number> @@ -47,7 +47,7 @@ <#assign AddComma = true /> - <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING" && eventRP.removedUnloadCommissions?? && eventRP.removedCaddedUnloadCommissionsommissions!=""> + <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING" && eventRP.removedUnloadCommissions?? && eventRP.removedUnloadCommissions!=""> <#if AddComma == true> , From 9dd1998c981c35e391b025544d080df8087178a0 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Fri, 27 Feb 2026 10:22:13 +0100 Subject: [PATCH 19/46] SCPN1-10253 --- ...ointmentSlotOrCarrierInformationUpdatedByNumber.ftl | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl index 784d148..e009cc6 100644 --- a/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl @@ -12,10 +12,6 @@ <#include "RPtoRFX_CarrierAppointmentDataUpdated.ftl"> "unloading_appointment" : "${eventRP.appointmentCustomFields.unloading?json_string}", "load_appointment" : "${eventRP.appointmentCustomFields.loading?json_string}", -<<<<<<< HEAD - <#switch appointment.AppointmentType> -======= ->>>>>>> b1577d1 (SCPN1-10253) <#switch appointment.AppointmentType> <#case "APPOINTMENT_TYPE_LOADING"> <#if appointment.TimeZone?? && appointment.TimeZone!=""> @@ -27,12 +23,6 @@ <#break> <#case "APPOINTMENT_TYPE_UNLOADING"> -<<<<<<< HEAD - <#if appointment.TimeZone?? && appointment.TimeZone!=""> - "unloading_appointment" : "true", - "load_appointment" : "false", -======= ->>>>>>> b1577d1 (SCPN1-10253) <#if appointment.TimeZone?? && appointment.TimeZone!=""> "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)}", From 29522ebda7ef8fd0fb7a96c83084d9d67995a793 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Fri, 27 Feb 2026 11:10:59 +0100 Subject: [PATCH 20/46] SCPN1-10253 --- RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl | 4 +++- RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl index 5ef9252..0ac420f 100644 --- a/RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl @@ -106,8 +106,10 @@ "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}", + "ExecutionflowID":"${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}", + "OrderID": "${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": "${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}", "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}", diff --git a/RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl index 7085a3e..15f77e8 100644 --- a/RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl @@ -102,10 +102,11 @@ "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}", + "ExecutionflowID":"${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}", + "OrderID": "${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": "${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}", - "ExecutionflowID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year?json_string}${physical_receipt.receipt_number?json_string}", "ProjectID": "${projectRP}", "PartnerAppID": "${partnerApplicationRP}", "OrganisationID": "${organisationRP}", From bb2174a8bd73a6843b57b2039c465f451882ac84 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Fri, 27 Feb 2026 16:27:33 +0100 Subject: [PATCH 21/46] SCPN1-10253 --- RFXtoRP_PlatformLogCreate.ftl | 82 +++++++++++++++++------------------ RFXtoRP_RestResponse.ftl | 22 +++++++++- 2 files changed, 61 insertions(+), 43 deletions(-) diff --git a/RFXtoRP_PlatformLogCreate.ftl b/RFXtoRP_PlatformLogCreate.ftl index f48b2b9..e38863f 100644 --- a/RFXtoRP_PlatformLogCreate.ftl +++ b/RFXtoRP_PlatformLogCreate.ftl @@ -1,42 +1,42 @@ -<#include "HfRpConfig.ftl"> -[ - <#assign UUID = UUID.randomUUID()> - <#assign strJsonBody = JsonUtil.espaceQuoteInJsonString(restResponseBody)> - { - "Header": { - "ProjectID": "${projectRP}" - }, - "ID": { - "RefID": "${UUID}", - "RefDate": { - "DateTime": "${aDateTime?iso_utc}", - "AuthorTimeZone": "${time_zone_rfx}" - } - }, - "Payload": { - <#assign severity = SeverityLevel.ERROR> - "Severity": "${severity}", - "Namespace": "ReflexIntegration", - "DateTime": { - "DateTime": "${aDateTime?iso_utc}", - "AuthorTimeZone": "${time_zone_rfx}" - }, - "TechMessage": { - "Code": "${restResponsetMsg.status!"no Code"}", - "Label": ${strJsonBody} - }, - "UserMessage": { - "Code": "${restResponsetMsg.status!"no Code"}", - "Label": ${strJsonBody}, - "Params": [] - }, - "DetailElements": [], - "CorrelationID": "${id.correlationid!"no Correlationid"}", - "ContextPayload": ${strJsonBody}, - "Type": "RP_EXECUTIONFLOW_EVENT", - "Task": "${id.apiRestReflexID!"no Task"}", - "OriginalID": "${id.refid!"no OriginalID"?trim?json_string}", - "StackTrace": "" - } - } +<#include "HfRpConfig.ftl"> +[ + <#assign UUID = UUID.randomUUID()> + <#assign strJsonBody = JsonUtil.espaceQuoteInJsonString(restResponseBody)> + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + "RefID": "${UUID}", + "RefDate": { + "DateTime": "${aDateTime?iso_utc}", + "AuthorTimeZone": "${time_zone_rfx}" + } + }, + "Payload": { + <#assign severity = SeverityLevel.ERROR> + "Severity": "${severity}", + "Namespace": "ReflexIntegration", + "DateTime": { + "DateTime": "${aDateTime?iso_utc}", + "AuthorTimeZone": "${time_zone_rfx}" + }, + "TechMessage": { + "Code": "${restResponsetMsg.status!"no Code"}", + "Label": ${strJsonBody} + }, + "UserMessage": { + "Code": "${restResponsetMsg.status!"no Code"}", + "Label": ${strJsonBody}, + "Params": [] + }, + "DetailElements": [], + "CorrelationID": "${id.correlationid!"no Correlationid"}", + "ContextPayload": ${strJsonBody}, + "Type": ${event}, + "Task": "${id.apiRestReflexID!"no Task"}", + "OriginalID": "${id.refid!"no OriginalID"?trim?json_string}", + "StackTrace": "" + } + } ] \ No newline at end of file diff --git a/RFXtoRP_RestResponse.ftl b/RFXtoRP_RestResponse.ftl index 70928b3..2a29aeb 100644 --- a/RFXtoRP_RestResponse.ftl +++ b/RFXtoRP_RestResponse.ftl @@ -12,7 +12,7 @@ <#assign aDateTime = .now> <#assign no_apiRestReflexID = "no apiRestReflexID"> <#assign no_status = -99999> - +<#assign event = "UNKNOW_EVENT" > <#switch id.apiRestReflexID!no_apiRestReflexID> <#case no_apiRestReflexID> @@ -25,7 +25,7 @@ <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : + "datas" : <#include "RFXtoRP_PlatformLogCreate.ftl"> } ] @@ -44,6 +44,7 @@ <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : + <#assign event = "RP_EXECUTIONFLOW_EVENT" /> <#include "RFXtoRP_PlatformLogCreate.ftl"> }, { @@ -84,6 +85,7 @@ <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : + <#assign event = "RP_EXECUTIONFLOW_EVENT"> <#include "RFXtoRP_PlatformLogCreate.ftl"> }, { @@ -107,6 +109,7 @@ <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : + <#assign event = "RP_EXECUTIONFLOW_EVENT" /> <#include "RFXtoRP_PlatformLogCreate.ftl"> }, { @@ -132,6 +135,7 @@ <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : + <#assign event = "RP_EXECUTIONFLOW_EVENT" /> <#include "RFXtoRP_PlatformLogCreate.ftl"> }, { @@ -162,6 +166,7 @@ <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : + <#assign event = "RP_EXECUTIONFLOW_EVENT" /> <#include "RFXtoRP_PlatformLogCreate.ftl"> }, { @@ -184,6 +189,7 @@ <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : + <#assign event = "RP_EXECUTIONFLOW_EVENT" /> <#include "RFXtoRP_PlatformLogCreate.ftl"> }, { @@ -209,6 +215,7 @@ <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : + <#assign event = "RP_APPOINTMENT_EVENT" /> <#include "RFXtoRP_PlatformLogCreate.ftl"> }, { @@ -236,6 +243,7 @@ <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : + <#assign event = "RP_APPOINTMENT_EVENT" /> <#include "RFXtoRP_PlatformLogCreate.ftl"> }, { @@ -258,6 +266,7 @@ <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : + <#assign event = "RP_APPOINTMENT_EVENT" /> <#include "RFXtoRP_PlatformLogCreate.ftl"> }, { @@ -284,6 +293,7 @@ <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : + <#assign event = "RP_APPOINTMENT_EVENT" /> <#include "RFXtoRP_PlatformLogCreate.ftl"> }, { @@ -311,6 +321,7 @@ <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : + <#assign event = "RP_APPOINTMENT_EVENT" /> <#include "RFXtoRP_PlatformLogCreate.ftl"> }, { @@ -333,6 +344,7 @@ <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : + <#assign event = "RP_APPOINTMENT_EVENT" /> <#include "RFXtoRP_PlatformLogCreate.ftl"> }, { @@ -359,6 +371,7 @@ <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : + <#assign event = "RP_APPOINTMENT_EVENT" /> <#include "RFXtoRP_PlatformLogCreate.ftl"> }, { @@ -386,6 +399,7 @@ <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : + <#assign event = "RP_APPOINTMENT_EVENT" /> <#include "RFXtoRP_PlatformLogCreate.ftl"> }, { @@ -408,6 +422,7 @@ <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : + <#assign event = "RP_APPOINTMENT_EVENT" /> <#include "RFXtoRP_PlatformLogCreate.ftl"> }, { @@ -436,6 +451,7 @@ <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : + <#assign event = "RP_APPOINTMENT_EVENT" /> <#include "RFXtoRP_PlatformLogCreate.ftl"> }, { @@ -463,6 +479,7 @@ <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : + <#assign event = "RP_APPOINTMENT_EVENT" /> <#include "RFXtoRP_PlatformLogCreate.ftl"> }, { @@ -485,6 +502,7 @@ <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : + <#assign event = "RP_APPOINTMENT_EVENT" /> <#include "RFXtoRP_PlatformLogCreate.ftl"> }, { From a1c5485bebfd9c0e6ee81f7eb89fbe3e3acba742 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Mon, 2 Mar 2026 12:07:22 +0100 Subject: [PATCH 22/46] SCPN1-10253 --- RFXtoRP_PlatformLogCreate.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_PlatformLogCreate.ftl b/RFXtoRP_PlatformLogCreate.ftl index e38863f..953c214 100644 --- a/RFXtoRP_PlatformLogCreate.ftl +++ b/RFXtoRP_PlatformLogCreate.ftl @@ -33,7 +33,7 @@ "DetailElements": [], "CorrelationID": "${id.correlationid!"no Correlationid"}", "ContextPayload": ${strJsonBody}, - "Type": ${event}, + "Type": "${event}", "Task": "${id.apiRestReflexID!"no Task"}", "OriginalID": "${id.refid!"no OriginalID"?trim?json_string}", "StackTrace": "" From 68a39fab3d4b326e54e67acc261380fcad52432d Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Mon, 2 Mar 2026 16:18:04 +0100 Subject: [PATCH 23/46] SCPN1-10253 (cherry picked from commit eea2a41313e5ee3b118223b3d0e748b8a69eb17e) --- ...rCarrierApt_BookingForceBookAppointment.ftl | 18 ++++++------------ ...rCarrierApt_BookingWMSUpdateAppointment.ftl | 9 +++------ RFXtoRP_HsrCarrierApt_ProjectQuantities.ftl | 5 ----- RFXtoRP_HsrCarrierApt_Quantities.ftl | 5 ----- RFXtoRP_HsrCarrierApt_TotalQuantities.ftl | 5 ----- 5 files changed, 9 insertions(+), 33 deletions(-) delete mode 100644 RFXtoRP_HsrCarrierApt_ProjectQuantities.ftl delete mode 100644 RFXtoRP_HsrCarrierApt_Quantities.ftl delete mode 100644 RFXtoRP_HsrCarrierApt_TotalQuantities.ftl diff --git a/RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl index 0ac420f..abbb1bf 100644 --- a/RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl @@ -114,15 +114,12 @@ "ExecutionflowID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year?json_string}${physical_receipt.receipt_number?json_string}", "ProjectID": "${projectRP}", "PartnerAppID": "${partnerApplicationRP}", - "OrganisationID": "${organisationRP}", - <#include "RFXtoRP_HsrCarrierApt_Quantities.ftl"> + "OrganisationID": "${organisationRP}" }<#sep>, ], - "ProjectID" : "${projectRP}", - <#include "RFXtoRP_HsrCarrierApt_ProjectQuantities.ftl"> - }], - <#include "RFXtoRP_HsrCarrierApt_TotalQuantities.ftl"> + "ProjectID" : "${projectRP}" + }] }, <#else> "Loading" : @@ -132,13 +129,10 @@ "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", "ProjectID": "${projectRP}", "PartnerAppID": "${partnerApplicationRP}", - "OrganisationID": "${organisationRP}", - <#include "RFXtoRP_HsrCarrierApt_Quantities.ftl"> + "OrganisationID": "${organisationRP}" }], - "ProjectID" : "${projectRP}:${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", - <#include "RFXtoRP_HsrCarrierApt_ProjectQuantities.ftl"> - }], - <#include "RFXtoRP_HsrCarrierApt_TotalQuantities.ftl"> + "ProjectID" : "${projectRP}:${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" + }] }, <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> "Reason": "UNLOADING AND LOADING / ${carrier_apt.appointment_designation?json_string}", diff --git a/RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl index 15f77e8..568f477 100644 --- a/RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl @@ -109,15 +109,12 @@ "ProjectID": "${projectRP}", "PartnerAppID": "${partnerApplicationRP}", - "OrganisationID": "${organisationRP}", - <#include "RFXtoRP_HsrCarrierApt_Quantities.ftl"> + "OrganisationID": "${organisationRP}" }<#sep>, ], - "ProjectID" : "${projectRP}", - <#include "RFXtoRP_HsrCarrierApt_ProjectQuantities.ftl"> - }], - <#include "RFXtoRP_HsrCarrierApt_TotalQuantities.ftl"> + "ProjectID" : "${projectRP}" + }] }, <#else> <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> diff --git a/RFXtoRP_HsrCarrierApt_ProjectQuantities.ftl b/RFXtoRP_HsrCarrierApt_ProjectQuantities.ftl deleted file mode 100644 index 6c84c6f..0000000 --- a/RFXtoRP_HsrCarrierApt_ProjectQuantities.ftl +++ /dev/null @@ -1,5 +0,0 @@ -"ProjectQuantities": [ - - ] - - diff --git a/RFXtoRP_HsrCarrierApt_Quantities.ftl b/RFXtoRP_HsrCarrierApt_Quantities.ftl deleted file mode 100644 index 22b0ec5..0000000 --- a/RFXtoRP_HsrCarrierApt_Quantities.ftl +++ /dev/null @@ -1,5 +0,0 @@ -"Quantities": [ - - ] - - diff --git a/RFXtoRP_HsrCarrierApt_TotalQuantities.ftl b/RFXtoRP_HsrCarrierApt_TotalQuantities.ftl deleted file mode 100644 index 61bfaac..0000000 --- a/RFXtoRP_HsrCarrierApt_TotalQuantities.ftl +++ /dev/null @@ -1,5 +0,0 @@ -"TotalQuantities": [ - - ] - - From c04e562c463935363884f1d4a1452cdc259c5965 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 10 Mar 2026 10:43:35 +0100 Subject: [PATCH 24/46] SCPN1-10408 --- RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl | 11 +++++------ RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl | 9 ++++----- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl index abbb1bf..16cae58 100644 --- a/RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl @@ -8,7 +8,7 @@ "RefDate": { "DateTime": "${creation_datetime}", "AuthorTimeZone": "${time_zone_rfx}" - }, + }, <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> "RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", @@ -85,8 +85,7 @@ <#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend are not valid" > <#else> - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN> - <#assign duration = 0 /> + <#stop "Appointment type not supported" > @@ -98,7 +97,7 @@ <#include "RFXtoRP_HsrCarrierApt_MetadataAppointment.ftl">, <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0)> "Unloading" : - { + { "Projects" : [{ "Commissions": [ <#list carrier_apt.physical_receipt_list?filter(l ->l??) as physical_receipt> @@ -123,13 +122,13 @@ }, <#else> "Loading" : - { + { "Projects" : [{ "Commissions": [{ "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", "ProjectID": "${projectRP}", "PartnerAppID": "${partnerApplicationRP}", - "OrganisationID": "${organisationRP}" + "OrganisationID": "${organisationRP}" }], "ProjectID" : "${projectRP}:${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" }] diff --git a/RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl index 568f477..1a6042a 100644 --- a/RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl @@ -9,7 +9,7 @@ "RefDate": { "DateTime": "${update_datetime}", "AuthorTimeZone": "${time_zone_rfx}" - }, + }, <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> "RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", @@ -85,17 +85,16 @@ <#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend are not valid" > <#else> - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN> - <#assign duration = 0 /> + <#stop "Appointment type not supported" > "TimeZone":"${time_zone_rfx}", <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0) && ((carrier_apt.unloading_appointment =="true" && carrier_apt.load_appointment =="false") || (carrier_apt.unloading_appointment =="false" && carrier_apt.load_appointment =="true"))> "Unloading" : - { + { "Projects" : [ - { + { "Commissions": [ <#list carrier_apt.physical_receipt_list?filter(l ->l??) as physical_receipt> { From 76d3db411fa3b61ce23076949cc1aecce411b7ca Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 19 Mar 2026 09:54:55 +0100 Subject: [PATCH 25/46] SCPN1-10443 --- RFXtoRP_HsrReceiptList.ftl | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/RFXtoRP_HsrReceiptList.ftl b/RFXtoRP_HsrReceiptList.ftl index 7c96c29..e3ba55a 100644 --- a/RFXtoRP_HsrReceiptList.ftl +++ b/RFXtoRP_HsrReceiptList.ftl @@ -60,12 +60,32 @@ } <#else> <#if receipt.receipt_confirmed == "true" > - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl"> - } + <#assign ID = "R${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}"/> + <#assign payload = '{"Header": {"ProjectID": "${projectRP!""}"},"IDs": [{"RefID": ${ID}"}]}' /> + <#assign queryApiReflexPlatformID = QueryApiReflexPlatformID.ExecutionflowGetByIds> + <#assign response = QueryApiReflexPlatformCall.call(queryApiReflexPlatformID,payload) /> + <#assign executionflowRP = JsonUtil.jsonToMap(response)> + <#if executionflowRP?? && executionflowRP.Objects?? && executionflowRP.Objects[0]?? && executionflowRP.Objects[0].ID.RefID?? > + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl"> + } + <#else> + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl"> + } + <#else> <#if receipt.receipt_type == "030"> <#stop "ignored message because receipt type = transfert"> From 06bcfecad6b82c3cf1fee5336c9b10f0c5edbb55 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 19 Mar 2026 10:08:13 +0100 Subject: [PATCH 26/46] SCPN1-10443 --- RFXtoRP_HsrReceiptList.ftl | 56 ++++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 26 deletions(-) diff --git a/RFXtoRP_HsrReceiptList.ftl b/RFXtoRP_HsrReceiptList.ftl index e3ba55a..ef367c1 100644 --- a/RFXtoRP_HsrReceiptList.ftl +++ b/RFXtoRP_HsrReceiptList.ftl @@ -60,32 +60,36 @@ } <#else> <#if receipt.receipt_confirmed == "true" > - <#assign ID = "R${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}"/> - <#assign payload = '{"Header": {"ProjectID": "${projectRP!""}"},"IDs": [{"RefID": ${ID}"}]}' /> - <#assign queryApiReflexPlatformID = QueryApiReflexPlatformID.ExecutionflowGetByIds> - <#assign response = QueryApiReflexPlatformCall.call(queryApiReflexPlatformID,payload) /> - <#assign executionflowRP = JsonUtil.jsonToMap(response)> - <#if executionflowRP?? && executionflowRP.Objects?? && executionflowRP.Objects[0]?? && executionflowRP.Objects[0].ID.RefID?? > - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl"> - } - <#else> - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl"> - } - + <#if receipt.receipt_reference?? && receipt.receipt_reference!=""> + <#assign ID = "${receipt.receipt_reference?trim?json_string}"/> + <#else> + <#assign ID = "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}"/> + + <#assign payload = '{"Header": {"ProjectID": "${projectRP!""}"},"IDs": [{"RefID": ${ID}"}]}' /> + <#assign queryApiReflexPlatformID = QueryApiReflexPlatformID.ExecutionflowGetByIds> + <#assign response = QueryApiReflexPlatformCall.call(queryApiReflexPlatformID,payload) /> + <#assign executionflowRP = JsonUtil.jsonToMap(response)> + <#if executionflowRP?? && executionflowRP.Objects?? && executionflowRP.Objects[0]?? && executionflowRP.Objects[0].ID.RefID?? > + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl"> + } + <#else> + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl"> + } + <#else> <#if receipt.receipt_type == "030"> <#stop "ignored message because receipt type = transfert"> From 326390e93df3005884dfb6499d41d8ee74f39061 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 19 Mar 2026 10:14:55 +0100 Subject: [PATCH 27/46] SCPN1-10443 --- RFXtoRP_HsrReceiptList.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RFXtoRP_HsrReceiptList.ftl b/RFXtoRP_HsrReceiptList.ftl index ef367c1..0c8c4c2 100644 --- a/RFXtoRP_HsrReceiptList.ftl +++ b/RFXtoRP_HsrReceiptList.ftl @@ -18,7 +18,7 @@ <#if receipt.receipt_type == "030"> <#stop "ignored message because receipt type = transfert"> <#else> - <#if receipt.line_list ??> + <#if receipt.line_list ?? && (receipt.line_list?size == receipt.line_list?filter(l ->l??)?size)> [ { <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected> @@ -94,7 +94,7 @@ <#if receipt.receipt_type == "030"> <#stop "ignored message because receipt type = transfert"> <#else> - <#if receipt.line_list ??> + <#if receipt.line_list ?? && (receipt.line_list?size == receipt.line_list?filter(l ->l??)?size)> { <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected> "apiReflexPlatformID" : "${apiReflexPlatformID}", From 3c6dd780de3858bf1fd02acfadff091d6da52a13 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 19 Mar 2026 10:24:10 +0100 Subject: [PATCH 28/46] SCPN1-10443 --- RFXtoRP_HsrReceiptList.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RFXtoRP_HsrReceiptList.ftl b/RFXtoRP_HsrReceiptList.ftl index 0c8c4c2..09aaabd 100644 --- a/RFXtoRP_HsrReceiptList.ftl +++ b/RFXtoRP_HsrReceiptList.ftl @@ -18,7 +18,7 @@ <#if receipt.receipt_type == "030"> <#stop "ignored message because receipt type = transfert"> <#else> - <#if receipt.line_list ?? && (receipt.line_list?size == receipt.line_list?filter(l ->l??)?size)> + <#if receipt.line_list ?? && receipt.line_list[0]??> [ { <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected> @@ -94,7 +94,7 @@ <#if receipt.receipt_type == "030"> <#stop "ignored message because receipt type = transfert"> <#else> - <#if receipt.line_list ?? && (receipt.line_list?size == receipt.line_list?filter(l ->l??)?size)> + <#if receipt.line_list ?? && receipt.line_list[0]??> { <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected> "apiReflexPlatformID" : "${apiReflexPlatformID}", From fba2b820ac4094d2cbf0da192070d7de2d1beecd Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 19 Mar 2026 10:35:48 +0100 Subject: [PATCH 29/46] SCPN1-10443 --- RFXtoRP_HsrReceiptList.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RFXtoRP_HsrReceiptList.ftl b/RFXtoRP_HsrReceiptList.ftl index 09aaabd..7b09162 100644 --- a/RFXtoRP_HsrReceiptList.ftl +++ b/RFXtoRP_HsrReceiptList.ftl @@ -84,10 +84,10 @@ <#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl"> }, { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected> + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : - <#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl"> + <#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl"> } <#else> From f48dc006d3ddba62107be292defffcdd84db4feb Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 19 Mar 2026 11:51:22 +0100 Subject: [PATCH 30/46] SCPN1-10459 --- RFXtoRP_HsrPro.ftl | 6 --- ...srPro_ExecutionflowCustomFieldsUpdated.ftl | 40 ----------------- RFXtoRP_HsrReceiptList.ftl | 6 --- ...oRP_HsrReceiptList_CustomFieldsUpdated.ftl | 44 ------------------- 4 files changed, 96 deletions(-) delete mode 100644 RFXtoRP_HsrPro_ExecutionflowCustomFieldsUpdated.ftl delete mode 100644 RFXtoRP_HsrReceiptList_CustomFieldsUpdated.ftl diff --git a/RFXtoRP_HsrPro.ftl b/RFXtoRP_HsrPro.ftl index ab7b170..bdc7f26 100644 --- a/RFXtoRP_HsrPro.ftl +++ b/RFXtoRP_HsrPro.ftl @@ -25,12 +25,6 @@ "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 deleted file mode 100644 index 73a441b..0000000 --- a/RFXtoRP_HsrPro_ExecutionflowCustomFieldsUpdated.ftl +++ /dev/null @@ -1,40 +0,0 @@ -<#include "HfRpConfig.ftl"> -<#include "ReflexUtils.ftl"> -<#include "ActorPrefix.ftl"> -[ - { - "Header": { - "ProjectID": "${projectRP}" - }, - "Payload" :{}, - "ID":{ - "CustomFields": [ - { - "Key": "depot_code", - "Value": "${preparation_order.physical_depot_code?trim?json_string}" - }, - { - "Key": "activity_code", - "Value": "${preparation_order.activity_code?trim?json_string}" - }, - { - "Key": "originator_code", - "Value": "${preparation_order.originator_code?trim?json_string}" - }, - { - "Key": "reference", - "Value": "${preparation_order.originator_reference?trim?json_string}" - }, - { - "Key": "order_year", - "Value": "${preparation_order.preparation_order_year}" - }, - { - "Key": "order_number", - "Value": "${preparation_order.preparation_order_number}" - } - ], - "RefID": "${preparation_order.originator_reference?trim?json_string}" - } - } -] \ No newline at end of file diff --git a/RFXtoRP_HsrReceiptList.ftl b/RFXtoRP_HsrReceiptList.ftl index 7b09162..abf1285 100644 --- a/RFXtoRP_HsrReceiptList.ftl +++ b/RFXtoRP_HsrReceiptList.ftl @@ -32,12 +32,6 @@ "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 deleted file mode 100644 index 141794d..0000000 --- a/RFXtoRP_HsrReceiptList_CustomFieldsUpdated.ftl +++ /dev/null @@ -1,44 +0,0 @@ -<#include "HfRpConfig.ftl"> -<#include "ReflexUtils.ftl"> -<#include "ActorPrefix.ftl"> -[ - { - "Header": { - "ProjectID": "${projectRP}" - }, - "Payload" :{}, - "ID":{ - "CustomFields": [ - { - "Key": "depot_code", - "Value": "${receipt.physical_depot_code?trim?json_string}" - }, - { - "Key": "activity_code", - "Value": "${receipt.activity_code?trim?json_string}" - }, - { - "Key": "originator_code", - "Value": "${receipt.originator_code?trim?json_string}" - }, - { - "Key": "reference", - "Value": "${receipt.receipt_reference?trim?json_string}" - }, - { - "Key": "order_year", - "Value": "${receipt.receipt_year}" - }, - { - "Key": "order_number", - "Value": "${receipt.receipt_number}" - } - ], - <#if receipt.receipt_reference?? && receipt.receipt_reference!=""> - "RefID": "${receipt.receipt_reference?trim?json_string}" - <#else> - "RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}" - - } - } -] \ No newline at end of file From e269d41ccd2ec937e79e2ac9a8a45adf2a6cfe63 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 19 Mar 2026 14:30:08 +0100 Subject: [PATCH 31/46] SCPN1-10443 --- RFXtoRP_HsrReceiptList.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsrReceiptList.ftl b/RFXtoRP_HsrReceiptList.ftl index abf1285..f180188 100644 --- a/RFXtoRP_HsrReceiptList.ftl +++ b/RFXtoRP_HsrReceiptList.ftl @@ -59,7 +59,7 @@ <#else> <#assign ID = "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}"/> - <#assign payload = '{"Header": {"ProjectID": "${projectRP!""}"},"IDs": [{"RefID": ${ID}"}]}' /> + <#assign payload = '{"Header": {"ProjectID": "${projectRP!""}"},"IDs": [{"RefID": "${ID}"}]}' /> <#assign queryApiReflexPlatformID = QueryApiReflexPlatformID.ExecutionflowGetByIds> <#assign response = QueryApiReflexPlatformCall.call(queryApiReflexPlatformID,payload) /> <#assign executionflowRP = JsonUtil.jsonToMap(response)> From 1be32968f25363bdcb60f3e8a904aa90af0f27b2 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 20 Mar 2026 13:28:08 +0100 Subject: [PATCH 32/46] SCPN1-10443 --- RFXtoRP_HsrReceiptList.ftl | 44 +++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/RFXtoRP_HsrReceiptList.ftl b/RFXtoRP_HsrReceiptList.ftl index f180188..afc4ac7 100644 --- a/RFXtoRP_HsrReceiptList.ftl +++ b/RFXtoRP_HsrReceiptList.ftl @@ -59,30 +59,30 @@ <#else> <#assign ID = "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}"/> - <#assign payload = '{"Header": {"ProjectID": "${projectRP!""}"},"IDs": [{"RefID": "${ID}"}]}' /> - <#assign queryApiReflexPlatformID = QueryApiReflexPlatformID.ExecutionflowGetByIds> + <#assign payload = '{"Header": {"ProjectID": "${projectRP!""}"},"IDs": [{"RefID": "${ID}"}]}'/> + <#assign queryApiReflexPlatformID = QueryApiReflexPlatformID.OrderGetByIds> <#assign response = QueryApiReflexPlatformCall.call(queryApiReflexPlatformID,payload) /> - <#assign executionflowRP = JsonUtil.jsonToMap(response)> - <#if executionflowRP?? && executionflowRP.Objects?? && executionflowRP.Objects[0]?? && executionflowRP.Objects[0].ID.RefID?? > - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl"> - } + <#assign orderRP = JsonUtil.jsonToMap(response)> + <#if orderRP?? && orderRP.Objects?? && orderRP.Objects[0]?? && orderRP.Objects[0].ID.RefID?? > + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl"> + } <#else> - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl"> - } + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl"> + } <#else> <#if receipt.receipt_type == "030"> From 13b23c58192f15b1ec6b563ceceee7a033fd2cc3 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Tue, 24 Mar 2026 17:07:31 +0100 Subject: [PATCH 33/46] SCPN1-9218 --- RFXtoRP_HsrPro_ExecutionflowDetected.ftl | 1 + ...oRP_HsrPro_ExecutionflowDetected_ShipToMetadata.ftl | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 RFXtoRP_HsrPro_ExecutionflowDetected_ShipToMetadata.ftl diff --git a/RFXtoRP_HsrPro_ExecutionflowDetected.ftl b/RFXtoRP_HsrPro_ExecutionflowDetected.ftl index 79f720a..4777232 100644 --- a/RFXtoRP_HsrPro_ExecutionflowDetected.ftl +++ b/RFXtoRP_HsrPro_ExecutionflowDetected.ftl @@ -79,6 +79,7 @@ <#else> "Actor": { + <#include "RFXtoRP_HsrPro_ExecutionflowDetected_ShipToMetadata.ftl">, "Name" : "${(preparation_order.address.name_or_company_name!"")?json_string}", "Address" : { diff --git a/RFXtoRP_HsrPro_ExecutionflowDetected_ShipToMetadata.ftl b/RFXtoRP_HsrPro_ExecutionflowDetected_ShipToMetadata.ftl new file mode 100644 index 0000000..dcc2bc7 --- /dev/null +++ b/RFXtoRP_HsrPro_ExecutionflowDetected_ShipToMetadata.ftl @@ -0,0 +1,10 @@ +<#-- use protobuf of class HsrPro to find HARDIS WMS fields names --> + +<#-- Best practices: + If the SK is of type: + - string: add ?json_string (e.g. "${stock.batch_1?json_string}") + - boolean: possible values: true and false + - datetime: expected format: 2025-10-30T10:12:10.000Z + - decimal number: the separator is a point (e.g. 10.5)--> + +"MetaData": [ ] \ No newline at end of file From 71e4b030f7ed8b8478d6c5e30d18e7eef4f601a2 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Tue, 31 Mar 2026 08:53:18 +0200 Subject: [PATCH 34/46] Merge branch 'develop' into develop-1.2 # Conflicts: # README.md # RFXtoRP_HfDtlStockLs.ftl # RFXtoRP_HfDtlStockLs_StockSnapshotted_SegmentationKeys.ftl # RFXtoRP_HliPrepaL.ftl # RFXtoRP_HliReceiptLr.ftl # RFXtoRP_HliReceiptLr_ExecutionflowLinesAdded.ftl # RFXtoRP_HlrProL.ftl # RFXtoRP_HlrProL_ExecutionflowLinesAdded.ftl # RFXtoRP_HsaCarrier.ftl # RFXtoRP_HsaCarrier_ActorCreated.ftl # RFXtoRP_HsaCons.ftl # RFXtoRP_HsaCons_ActorCreated.ftl # RFXtoRP_HsaDesPatch.ftl # RFXtoRP_HsaDespNt.ftl # RFXtoRP_HsaDispute.ftl # RFXtoRP_HsaDispute_Created.ftl # RFXtoRP_HsaIpgMove_GoodsReceived.ftl # RFXtoRP_HsaIpgMove_StockMoved_SegmentationKeys.ftl # RFXtoRP_HsaLstCarSta.ftl # RFXtoRP_HsaLstCarSta_LoadingCompleted.ftl # RFXtoRP_HsaProStatus.ftl # RFXtoRP_HsaProStatus_ExecutionflowCancelled.ftl # RFXtoRP_HsaProStatus_PreparationCompleted.ftl # RFXtoRP_HsaProStatus_PreparationExpected.ftl # RFXtoRP_HsaProStatus_PreparationStarted.ftl # RFXtoRP_HsaProStatus_TransportStarted.ftl # RFXtoRP_HsaSup_ActorCreated.ftl # RFXtoRP_HsrCarrierApt.ftl # RFXtoRP_HsrCarrierApt_AppointmentCarrierInformationUpdatedToConfigure.ftl # RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl # RFXtoRP_HsrCarrierApt_AppointmentMetadataUpdatedToConfigure.ftl # RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl # RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl # RFXtoRP_HsrCarrierApt_CarrierDeparted.ftl # RFXtoRP_HsrCarrierApt_LoadingCompleted.ftl # RFXtoRP_HsrCarrierApt_UnloadingCompleted.ftl # RFXtoRP_HsrCarrierApt_UnloadingStarted.ftl # RFXtoRP_HsrDepot_ActorCreated.ftl # RFXtoRP_HsrLoadInfo.ftl # RFXtoRP_HsrPrepa.ftl # RFXtoRP_HsrPrepa_CarrierUpdated.ftl # RFXtoRP_HsrPrepa_ExecutionflowMetadataUpdated.ftl # RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl # RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl # RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl # RFXtoRP_HsrPro.ftl # RFXtoRP_HsrPro_ExecutionflowDetected.ftl # RFXtoRP_HsrPro_ExecutionflowDetected_HeaderMetadata.ftl # RFXtoRP_HsrReceiptList.ftl # RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl # RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl # RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl # RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl # RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl # RFXtoRP_HsrReceiptList_ReceiptExpected.ftl # RFXtoRP_RestResponse.ftl # RPtoRFX_AppointmentEvent.ftl # RPtoRFX_CarrierAppointmentCreated.ftl # RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl # RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl # RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl # RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl # RPtoRFX_CarrierAppointmentReasonUpdatedByNumber.ftl # RPtoRFX_CarrierAppointmentReasonUpdatedByRef.ftl # RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl # RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl # RPtoRFX_ExecutionflowEvent.ftl # RPtoRFX_PrepOrder_HeaderMetadata.ftl # RPtoRFX_PrepOrder_LineMetadata.ftl # RPtoRFX_Receipt.ftl # RPtoRFX_Receipt_HeaderMetadata.ftl # RPtoRFX_Receipt_LineMetadata.ftl # RPtoRFX_Receipt_OptionalAttributes.ftl # ReflexUtils.ftl --- RPtoRFX_AppointmentEvent.ftl | 57 ++++++++++++++++++++++++++++++++++-- 1 file changed, 55 insertions(+), 2 deletions(-) diff --git a/RPtoRFX_AppointmentEvent.ftl b/RPtoRFX_AppointmentEvent.ftl index 57a0906..9febf0b 100644 --- a/RPtoRFX_AppointmentEvent.ftl +++ b/RPtoRFX_AppointmentEvent.ftl @@ -28,8 +28,61 @@ <#assign AddComma = false /> <#assign appointment = eventRP.data /> [ - <#if eventRP.commissionsUpdated> - <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING" && eventRP.addedUnloadCommissions?? && eventRP.addedUnloadCommissions !=""> + <#if appointment?? && (!(appointment.WMSCreated??) || !appointment.WMSCreated) && appointment.Status?? && appointment.Status.Current?? && appointment.Status.Current.StatusCode?? && appointment.Status.Current.StatusCode == AppointmentStatusCode.APPOINTMENT_0150_ALLOCATION_ERROR> + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_post_create> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentCreated.ftl"> + } + <#else> + <#if eventRP.commissionsUpdated> + <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING" && eventRP.addedUnloadCommissions?? && eventRP.addedUnloadCommissions != ""> + <#if eventRP.appointmentCustomFields?has_content> + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_number> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl"> + } + <#else> + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_ref> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl"> + } + + <#assign AddComma = true /> + + <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING" && eventRP.removedUnloadCommissions?? && eventRP.removedUnloadCommissions!=""> + <#if AddComma == true> + , + + + <#if eventRP.appointmentCustomFields?has_content> + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_dissociations_by_number> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl"> + } + <#else> + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_dissociations_by_ref> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl"> + } + + <#assign AddComma = true /> + + + <#-- *********************************************** Action = reasonUpdated or slotUpdated ******************** --> + <#if eventRP.reasonUpdated || eventRP.slotUpdated || eventRP.carrierInformationUpdated> + <#if AddComma == true> + , + <#if eventRP.appointmentCustomFields?has_content> { <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_number> From 45904e8b6f3bd16f5a112f46a4b0971e4881a4e0 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Tue, 24 Mar 2026 17:10:45 +0100 Subject: [PATCH 35/46] SCPN1-10402 --- RPtoRFX_AppointmentEvent.ftl | 68 ++++++++++--------- RPtoRFX_CarrierAppointmentCreated.ftl | 35 +++++----- ...mentPhysicalReceiptAssociationByNumber.ftl | 2 +- ...intmentPhysicalReceiptAssociationByRef.ftl | 2 +- ...entPhysicalReceiptDissociationByNumber.ftl | 2 +- ...ntmentPhysicalReceiptDissociationByRef.ftl | 2 +- ...arrierAppointmentReasonUpdatedByNumber.ftl | 4 +- ...X_CarrierAppointmentReasonUpdatedByRef.ftl | 4 +- ...lotOrCarrierInformationUpdatedByNumber.ftl | 6 +- ...ntSlotOrCarrierInformationUpdatedByRef.ftl | 8 +-- 10 files changed, 69 insertions(+), 64 deletions(-) diff --git a/RPtoRFX_AppointmentEvent.ftl b/RPtoRFX_AppointmentEvent.ftl index 9febf0b..469b265 100644 --- a/RPtoRFX_AppointmentEvent.ftl +++ b/RPtoRFX_AppointmentEvent.ftl @@ -28,7 +28,11 @@ <#assign AddComma = false /> <#assign appointment = eventRP.data /> [ +<<<<<<< HEAD <#if appointment?? && (!(appointment.WMSCreated??) || !appointment.WMSCreated) && appointment.Status?? && appointment.Status.Current?? && appointment.Status.Current.StatusCode?? && appointment.Status.Current.StatusCode == AppointmentStatusCode.APPOINTMENT_0150_ALLOCATION_ERROR> +======= + <#if appointment?? && appointment.Status?? && appointment.Status.Current?? && appointment.Status.Current.StatusCode?? && appointment.Status.Current.StatusCode == AppointmentStatusCode.APPOINTMENT_0150_ALLOCATION_ERROR> +>>>>>>> f602f74 (SCPN1-10471) { <#assign apiRestReflexID = ApiRestReflexID.appointment_post_create> "apiRestReflexID" : "${apiRestReflexID}", @@ -54,6 +58,7 @@ } <#assign AddComma = true /> +<<<<<<< HEAD <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING" && eventRP.removedUnloadCommissions?? && eventRP.removedUnloadCommissions!=""> <#if AddComma == true> @@ -97,54 +102,55 @@ "datas" : <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl"> } +======= +>>>>>>> f602f74 (SCPN1-10471) - <#assign AddComma = true /> - - <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING" && eventRP.removedUnloadCommissions?? && eventRP.removedUnloadCommissions!=""> + <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING" && eventRP.removedUnloadCommissions?? && eventRP.removedUnloadCommissions!=""> + <#if AddComma == true> + , + + + <#if eventRP.appointmentCustomFields?has_content> + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_dissociations_by_number> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl"> + } + <#else> + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_dissociations_by_ref> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl"> + } + + <#assign AddComma = true /> + + + <#-- *********************************************** Action = reasonUpdated or slotUpdated ******************** --> + <#if eventRP.reasonUpdated || eventRP.slotUpdated || eventRP.carrierInformationUpdated> <#if AddComma == true> , - <#if eventRP.appointmentCustomFields?has_content> { - <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_dissociations_by_number> + <#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_number> "apiRestReflexID" : "${apiRestReflexID}", "datas" : - <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl"> + <#include "RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl"> } <#else> { - <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_dissociations_by_ref> + <#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_ref> "apiRestReflexID" : "${apiRestReflexID}", "datas" : - <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl"> + <#include "RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl"> } <#assign AddComma = true /> - -<#-- *********************************************** Action = reasonUpdated or slotUpdated ******************** --> - <#if eventRP.reasonUpdated || eventRP.slotUpdated || eventRP.carrierInformationUpdated> - <#if AddComma == true> - , - - <#if eventRP.appointmentCustomFields?has_content> - { - <#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_number> - "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl"> - } - <#else> - { - <#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_ref> - "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl"> - } - - <#assign AddComma = true /> - + ] <#break> <#-- *********************************************** Action = SlotUpdated ******************** --> diff --git a/RPtoRFX_CarrierAppointmentCreated.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl index 8c0b2f5..22bce16 100644 --- a/RPtoRFX_CarrierAppointmentCreated.ftl +++ b/RPtoRFX_CarrierAppointmentCreated.ftl @@ -9,7 +9,7 @@ { "appointment_reference": "${eventRP.refid?json_string}", <#switch appointment.AppointmentType> - <#case "APPOINTMENT_TYPE_LOADING"> + <#case AppointmentType.APPOINTMENT_TYPE_LOADING> "unloading_appointment" : "false", "load_appointment" : "true", <#if appointment.TimeZone?? && appointment.TimeZone!=""> @@ -20,7 +20,7 @@ "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}", <#break> - <#case "APPOINTMENT_TYPE_UNLOADING"> + <#case AppointmentType.APPOINTMENT_TYPE_UNLOADING> "unloading_appointment" : "true", "load_appointment" : "false", <#if appointment.TimeZone?? && appointment.TimeZone!=""> @@ -35,30 +35,29 @@ <#stop "appointment.AppointmentType not implemented" > <#include "RPtoRFX_CarrierAppointmentDefaultData.ftl"> - <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING" > + <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING > <#if appointment.Unloading?? && appointment.Unloading.Projects?? && appointment.Unloading.Projects[0]?? && appointment.Unloading.Projects[0].Commissions?? && - appointment.Unloading.Projects[0].Commissions[0]?? && - appointment.Unloading.Projects[0].Commissions[0].OrderID?? && - appointment.Unloading.Projects[0].Commissions[0].OrderID != ""> + appointment.Unloading.Projects[0].Commissions[0]??> "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>, - + <#list appointment.Unloading.Projects[0].Commissions?filter(l ->l.ExecutionflowID?? && l.ExecutionflowID !="") as commission> + <#list eventRP.executionflowCustomFields.entrySet()?filter(l ->l.key == commission.ExecutionflowID && 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}", <#else> - <#if appointment.AppointmentType == "APPOINTMENT_TYPE_LOADING"> + <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_LOADING> "appointment_designation":"${(appointment.Reason!"")?json_string}", diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl index 5677a75..2d532b1 100644 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl @@ -10,7 +10,7 @@ "payload" : { <#assign executionflowCustomFields = eventRP.executionflowCustomFields > - <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING"> + <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING> <#assign addedCommissions = eventRP.addedUnloadCommissions /> <#else> <#assign addedCommissions = eventRP.addedLoadCommissions /> diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl index d19ea66..0fef024 100644 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl @@ -9,7 +9,7 @@ "payload" : { <#assign executionflowCustomFields = eventRP.executionflowCustomFields > - <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING"> + <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING> <#assign addedCommissions = eventRP.addedUnloadCommissions /> <#else> <#assign addedCommissions = eventRP.addedLoadCommissions /> diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl index f3f2b2b..2f70e6c 100644 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl @@ -10,7 +10,7 @@ "payload" : { <#assign executionflowCustomFields = eventRP.executionflowCustomFields > - <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING"> + <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING> <#assign removedCommissions = eventRP.removedUnloadCommissions /> <#else> <#assign removedCommissions = eventRP.removedLoadCommissions /> diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl index 85a66dc..20735f9 100644 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl @@ -9,7 +9,7 @@ "payload" : { <#assign executionflowCustomFields = eventRP.executionflowCustomFields > - <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING"> + <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING> <#assign removedCommissions = eventRP.removedUnloadCommissions /> <#else> <#assign removedCommissions = eventRP.removedLoadCommissions /> diff --git a/RPtoRFX_CarrierAppointmentReasonUpdatedByNumber.ftl b/RPtoRFX_CarrierAppointmentReasonUpdatedByNumber.ftl index 7a57906..a8c7598 100644 --- a/RPtoRFX_CarrierAppointmentReasonUpdatedByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentReasonUpdatedByNumber.ftl @@ -12,7 +12,7 @@ "unloading_appointment" : "${eventRP.appointmentCustomFields.unloading?json_string}", "load_appointment" : "${eventRP.appointmentCustomFields.loading?json_string}", <#switch appointment.AppointmentType> - <#case "APPOINTMENT_TYPE_LOADING"> + <#case AppointmentType.APPOINTMENT_TYPE_LOADING> <#if appointment.TimeZone?? && appointment.TimeZone!=""> "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)}", @@ -21,7 +21,7 @@ "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}", <#break> - <#case "APPOINTMENT_TYPE_UNLOADING"> + <#case AppointmentType.APPOINTMENT_TYPE_UNLOADING> <#if appointment.TimeZone?? && appointment.TimeZone!=""> "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)}", diff --git a/RPtoRFX_CarrierAppointmentReasonUpdatedByRef.ftl b/RPtoRFX_CarrierAppointmentReasonUpdatedByRef.ftl index 00595f4..1ccf476 100644 --- a/RPtoRFX_CarrierAppointmentReasonUpdatedByRef.ftl +++ b/RPtoRFX_CarrierAppointmentReasonUpdatedByRef.ftl @@ -9,7 +9,7 @@ "payload" : { <#switch appointment.AppointmentType> - <#case "APPOINTMENT_TYPE_LOADING"> + <#case AppointmentType.APPOINTMENT_TYPE_LOADING> "unloading_appointment" : "false", "load_appointment" : "true", <#if appointment.TimeZone?? && appointment.TimeZone!=""> @@ -20,7 +20,7 @@ "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}", <#break> - <#case "APPOINTMENT_TYPE_UNLOADING"> + <#case AppointmentType.APPOINTMENT_TYPE_UNLOADING> "unloading_appointment" : "true", "load_appointment" : "false", <#if appointment.TimeZone?? && appointment.TimeZone!=""> diff --git a/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl index e009cc6..1c94ae1 100644 --- a/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl @@ -13,7 +13,7 @@ "unloading_appointment" : "${eventRP.appointmentCustomFields.unloading?json_string}", "load_appointment" : "${eventRP.appointmentCustomFields.loading?json_string}", <#switch appointment.AppointmentType> - <#case "APPOINTMENT_TYPE_LOADING"> + <#case AppointmentType.APPOINTMENT_TYPE_LOADING> <#if appointment.TimeZone?? && appointment.TimeZone!=""> "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)}", @@ -21,8 +21,8 @@ "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,time_zone_rfx),time_zone_rfx)}", "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}", - <#break> - <#case "APPOINTMENT_TYPE_UNLOADING"> + <#break> + <#case AppointmentType.APPOINTMENT_TYPE_UNLOADING> <#if appointment.TimeZone?? && appointment.TimeZone!=""> "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)}", diff --git a/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl index 5af02ee..6b514c6 100644 --- a/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl +++ b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl @@ -10,8 +10,8 @@ { <#include "RPtoRFX_CarrierAppointmentDataUpdated.ftl"> <#switch appointment.AppointmentType> - <#case "APPOINTMENT_TYPE_LOADING"> - "unloading_appointment" : "false", + <#case AppointmentType.APPOINTMENT_TYPE_LOADING> + "unloading_appointment" : "false", "load_appointment" : "true", <#if appointment.TimeZone?? && appointment.TimeZone!=""> "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", @@ -21,8 +21,8 @@ "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}", <#break> - <#case "APPOINTMENT_TYPE_UNLOADING"> - "unloading_appointment" : "true", + <#case AppointmentType.APPOINTMENT_TYPE_UNLOADING> + "unloading_appointment" : "true", "load_appointment" : "false", <#if appointment.TimeZone?? && appointment.TimeZone!=""> "planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", From f30e7b94d39557e65e9a3492377ea7cab5f3d6ef Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Tue, 31 Mar 2026 17:54:52 +0200 Subject: [PATCH 36/46] SCPN1-10402 --- RPtoRFX_AppointmentEvent.ftl | 54 ++---------------------------------- 1 file changed, 2 insertions(+), 52 deletions(-) diff --git a/RPtoRFX_AppointmentEvent.ftl b/RPtoRFX_AppointmentEvent.ftl index 469b265..4dbf993 100644 --- a/RPtoRFX_AppointmentEvent.ftl +++ b/RPtoRFX_AppointmentEvent.ftl @@ -28,11 +28,7 @@ <#assign AddComma = false /> <#assign appointment = eventRP.data /> [ -<<<<<<< HEAD <#if appointment?? && (!(appointment.WMSCreated??) || !appointment.WMSCreated) && appointment.Status?? && appointment.Status.Current?? && appointment.Status.Current.StatusCode?? && appointment.Status.Current.StatusCode == AppointmentStatusCode.APPOINTMENT_0150_ALLOCATION_ERROR> -======= - <#if appointment?? && appointment.Status?? && appointment.Status.Current?? && appointment.Status.Current.StatusCode?? && appointment.Status.Current.StatusCode == AppointmentStatusCode.APPOINTMENT_0150_ALLOCATION_ERROR> ->>>>>>> f602f74 (SCPN1-10471) { <#assign apiRestReflexID = ApiRestReflexID.appointment_post_create> "apiRestReflexID" : "${apiRestReflexID}", @@ -41,7 +37,7 @@ } <#else> <#if eventRP.commissionsUpdated> - <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING" && eventRP.addedUnloadCommissions?? && eventRP.addedUnloadCommissions != ""> + <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING && eventRP.addedUnloadCommissions?? && eventRP.addedUnloadCommissions != ""> <#if eventRP.appointmentCustomFields?has_content> { <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_number> @@ -58,54 +54,8 @@ } <#assign AddComma = true /> -<<<<<<< HEAD - <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING" && eventRP.removedUnloadCommissions?? && eventRP.removedUnloadCommissions!=""> - <#if AddComma == true> - , - - - <#if eventRP.appointmentCustomFields?has_content> - { - <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_dissociations_by_number> - "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl"> - } - <#else> - { - <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_dissociations_by_ref> - "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl"> - } - - <#assign AddComma = true /> - - - <#-- *********************************************** Action = reasonUpdated or slotUpdated ******************** --> - <#if eventRP.reasonUpdated || eventRP.slotUpdated || eventRP.carrierInformationUpdated> - <#if AddComma == true> - , - - <#if eventRP.appointmentCustomFields?has_content> - { - <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_number> - "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl"> - } - <#else> - { - <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_ref> - "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl"> - } -======= ->>>>>>> f602f74 (SCPN1-10471) - - <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING" && eventRP.removedUnloadCommissions?? && eventRP.removedUnloadCommissions!=""> + <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING && eventRP.removedUnloadCommissions?? && eventRP.removedUnloadCommissions!=""> <#if AddComma == true> , From 0795d36caaeb4aa64f2abb41f22f0589487697a7 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Fri, 3 Apr 2026 14:30:18 +0200 Subject: [PATCH 37/46] SCPN1-10402 (cherry picked from commit 4e3162556c73c277a875f62b42cbe28f15896c7f) --- RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl | 8 ++++++-- RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl | 1 + RPtoRFX_CarrierAppointmentCreated.ftl | 3 ++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl index 16cae58..a36034c 100644 --- a/RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl @@ -121,7 +121,11 @@ }] }, <#else> - "Loading" : + <#if appointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING> + "Unloading" : + <#else> + "Loading" : + { "Projects" : [{ "Commissions": [{ @@ -130,7 +134,7 @@ "PartnerAppID": "${partnerApplicationRP}", "OrganisationID": "${organisationRP}" }], - "ProjectID" : "${projectRP}:${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" + "ProjectID" : "${projectRP}" }] }, <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> diff --git a/RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl index 1a6042a..6b2b3e8 100644 --- a/RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl @@ -115,6 +115,7 @@ "ProjectID" : "${projectRP}" }] }, + "Reason": "", <#else> <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> "Reason": "UNLOADING AND LOADING / ${carrier_apt.appointment_designation?json_string}", diff --git a/RPtoRFX_CarrierAppointmentCreated.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl index 22bce16..1302451 100644 --- a/RPtoRFX_CarrierAppointmentCreated.ftl +++ b/RPtoRFX_CarrierAppointmentCreated.ftl @@ -51,7 +51,8 @@ } <#sep>, - + <#sep>, + ], <#else> "appointment_designation":"${(appointment.Reason!"")!?json_string}", From a570da2699fab4e8e52b88e50e4d85dac145a507 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 3 Apr 2026 16:17:36 +0200 Subject: [PATCH 38/46] espace --- RFXtoRP_RestResponse.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_RestResponse.ftl b/RFXtoRP_RestResponse.ftl index 2a29aeb..d4b338e 100644 --- a/RFXtoRP_RestResponse.ftl +++ b/RFXtoRP_RestResponse.ftl @@ -25,7 +25,7 @@ <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : + "datas" : <#include "RFXtoRP_PlatformLogCreate.ftl"> } ] From 7f6fb9b63a9edb3b8b8eacfb7c84ed59fc9f665b Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Mon, 13 Apr 2026 15:10:17 +0200 Subject: [PATCH 39/46] SCPN1-10560 (cherry picked from commit 8e1d0e3a17490c2d5f7a0dc10202c878da5457ea) --- ...CarrierApt_BookingWMSUpdateAppointment.ftl | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl index 6b2b3e8..69ae69a 100644 --- a/RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl @@ -117,6 +117,41 @@ }, "Reason": "", <#else> + <#if appointmentType == AppointmentType.APPOINTMENT_TYPE_LOADING> + "Loading" : + { + "Projects" : [ + { + "Commissions": [ + { + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", + "ProjectID": "${projectRP}", + "PartnerAppID": "${partnerApplicationRP}", + "OrganisationID": "${organisationRP}" + } + ], + "ProjectID" : "${projectRP}" + }] + }, + <#else> + <#if appointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING> + "Unloading" : + { + "Projects" : [ + { + "Commissions": [ + { + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", + "ProjectID": "${projectRP}", + "PartnerAppID": "${partnerApplicationRP}", + "OrganisationID": "${organisationRP}" + } + ], + "ProjectID" : "${projectRP}" + }] + }, + + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> "Reason": "UNLOADING AND LOADING / ${carrier_apt.appointment_designation?json_string}", <#else> From 6fac2a7a2cf03e0fa9fb1e962bed9d42c1d4e5ee Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Tue, 14 Apr 2026 14:35:04 +0200 Subject: [PATCH 40/46] SCPN1-10579 --- RFXtoRP_HsrCarrierApt.ftl | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/RFXtoRP_HsrCarrierApt.ftl b/RFXtoRP_HsrCarrierApt.ftl index 9106a94..a618b44 100644 --- a/RFXtoRP_HsrCarrierApt.ftl +++ b/RFXtoRP_HsrCarrierApt.ftl @@ -30,6 +30,34 @@ <#break> <#case "U"> <#-- *********************************************** Action = Update ********************--> + <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + <#assign ID = "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}" /> + <#else> + <#assign ID = "${carrier_apt.year_number}-${carrier_apt.appointment_number}" /> + + <#else> + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + <#assign ID = "${carrier_apt.appointment_reference?json_string}" /> + <#else> + <#assign ID = "${carrier_apt.year_number}-${carrier_apt.appointment_number}" /> + + + <#assign payload = '{"Header": {"ProjectID": "${projectRP}:${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"},"IDs": [{"RefID": "${ID}"}],"Options": {"Only": ["ID.RefID","Payload.WMSCreated"]}}'/> + <#assign queryApiReflexPlatformID = QueryApiReflexPlatformID.AppointmentGetByIds> + <#assign response = QueryApiReflexPlatformCall.call(queryApiReflexPlatformID,payload) /> + <#assign appointmentRP = JsonUtil.jsonToMap(response)> + + <#if !appointmentRP?? || !appointmentRP.Objects?? || !appointmentRP.Objects[0]?? || !appointmentRP.Objects[0].ID.RefID?? || !appointmentRP.Objects[0].Payload?? || !appointmentRP.Objects[0].Payload.WMSCreated?? || !appointmentRP.Objects[0].Payload.WMSCreated> + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.BookingForceBookAppointment> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl"> + } + ] + <#else> [ { <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCustomFieldsUpdated> @@ -125,6 +153,7 @@ ] + <#break> <#case "D"> <#-- *********************************************** Action = Delete ******************** --> From f29f1b6dc4fd9f7df42a26ce4233ffc0d2700bd6 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 14 Apr 2026 15:18:20 +0200 Subject: [PATCH 41/46] SCPN1-10579 --- RPtoRFX_CarrierAppointmentCreated.ftl | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentCreated.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl index 1302451..dfffa15 100644 --- a/RPtoRFX_CarrierAppointmentCreated.ftl +++ b/RPtoRFX_CarrierAppointmentCreated.ftl @@ -36,10 +36,13 @@ <#include "RPtoRFX_CarrierAppointmentDefaultData.ftl"> <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING > - <#if appointment.Unloading?? && appointment.Unloading.Projects?? && appointment.Unloading.Projects[0]?? && - appointment.Unloading.Projects[0].Commissions?? && - appointment.Unloading.Projects[0].Commissions[0]??> - "physical_receipt_list": [ + <#if appointment.Unloading?? && appointment.Unloading.Projects?? && + appointment.Unloading.Projects[0]?? && + appointment.Unloading.Projects[0].Commissions?? && + appointment.Unloading.Projects[0].Commissions[0]?? && + appointment.Unloading.Projects[0].Commissions[0].ExecutionflowID?? && + appointment.Unloading.Projects[0].Commissions[0].ExecutionflowID!="" > + "physical_receipt_list": [ <#list appointment.Unloading.Projects[0].Commissions?filter(l ->l.ExecutionflowID?? && l.ExecutionflowID !="") as commission> <#list eventRP.executionflowCustomFields.entrySet()?filter(l ->l.key == commission.ExecutionflowID && l.value?? && l.value?has_content) as custom> { @@ -52,7 +55,7 @@ <#sep>, <#sep>, - + ], <#else> "appointment_designation":"${(appointment.Reason!"")!?json_string}", From af5775375e0329fe2c168fa53e9bf816703e7a25 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Thu, 16 Apr 2026 17:17:35 +0200 Subject: [PATCH 42/46] SCPN1-10586 (cherry picked from commit 13fe55ae1a544c3af3a3a6cac1e27c683a7da87f) --- RPtoRFX_CarrierAppointmentReasonUpdatedByNumber.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentReasonUpdatedByNumber.ftl b/RPtoRFX_CarrierAppointmentReasonUpdatedByNumber.ftl index a8c7598..f2ba79a 100644 --- a/RPtoRFX_CarrierAppointmentReasonUpdatedByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentReasonUpdatedByNumber.ftl @@ -9,8 +9,8 @@ }, "payload" : { - "unloading_appointment" : "${eventRP.appointmentCustomFields.unloading?json_string}", - "load_appointment" : "${eventRP.appointmentCustomFields.loading?json_string}", + "unloading_appointment" : "${eventRP.appointmentCustomFields.unloading!"false"?json_string}", + "load_appointment" : "${eventRP.appointmentCustomFields.loading!"false"?json_string}", <#switch appointment.AppointmentType> <#case AppointmentType.APPOINTMENT_TYPE_LOADING> <#if appointment.TimeZone?? && appointment.TimeZone!=""> From 9a9e6922da82d7e3b881f4fa034b7c005638a44c Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Thu, 16 Apr 2026 17:35:48 +0200 Subject: [PATCH 43/46] SCPN1-10586 (cherry picked from commit 2bfb866dcc5586d3289ee3ad63dd6205067f377b) --- ...rierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl index 1c94ae1..5c8ff23 100644 --- a/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl @@ -10,8 +10,8 @@ "payload" : { <#include "RPtoRFX_CarrierAppointmentDataUpdated.ftl"> - "unloading_appointment" : "${eventRP.appointmentCustomFields.unloading?json_string}", - "load_appointment" : "${eventRP.appointmentCustomFields.loading?json_string}", + "unloading_appointment" : "${eventRP.appointmentCustomFields.unloading!"false"?json_string}", + "load_appointment" : "${eventRP.appointmentCustomFields.loading!"false"?json_string}", <#switch appointment.AppointmentType> <#case AppointmentType.APPOINTMENT_TYPE_LOADING> <#if appointment.TimeZone?? && appointment.TimeZone!=""> From 6eebe5c8054e88d7314b8f1a81bc227c2b5f661d Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 17 Apr 2026 10:59:47 +0200 Subject: [PATCH 44/46] SCPN1-10586 --- RFXtoRP_HsrCarrierApt.ftl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/RFXtoRP_HsrCarrierApt.ftl b/RFXtoRP_HsrCarrierApt.ftl index a618b44..eeb30f8 100644 --- a/RFXtoRP_HsrCarrierApt.ftl +++ b/RFXtoRP_HsrCarrierApt.ftl @@ -25,6 +25,12 @@ "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierExpected> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsaLstCarSta_CarrierExpected.ftl"> } ] <#break> From 2b443f56a5fc1e98bee75beca021a96a3f8b39e5 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 17 Apr 2026 14:17:20 +0200 Subject: [PATCH 45/46] SCPN1-10586 --- RFXtoRP_HsrCarrierApt.ftl | 2 +- RFXtoRP_HsrCarrierApt_CarrierExpected.ftl | 30 +++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 RFXtoRP_HsrCarrierApt_CarrierExpected.ftl diff --git a/RFXtoRP_HsrCarrierApt.ftl b/RFXtoRP_HsrCarrierApt.ftl index eeb30f8..73d1031 100644 --- a/RFXtoRP_HsrCarrierApt.ftl +++ b/RFXtoRP_HsrCarrierApt.ftl @@ -30,7 +30,7 @@ <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierExpected> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : - <#include "RFXtoRP_HsaLstCarSta_CarrierExpected.ftl"> + <#include "RFXtoRP_HsrCarrierApt_CarrierExpected.ftl"> } ] <#break> diff --git a/RFXtoRP_HsrCarrierApt_CarrierExpected.ftl b/RFXtoRP_HsrCarrierApt_CarrierExpected.ftl new file mode 100644 index 0000000..68dda4b --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_CarrierExpected.ftl @@ -0,0 +1,30 @@ +[ + <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) /> + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + "RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", + <#else> + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + + <#else> + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + "RefID": "${carrier_apt.appointment_reference?json_string}", + <#else> + "RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + + + "RefDate": { + "DateTime": "${ref_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + } + }, + "Payload":{ + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" + } + } +] \ No newline at end of file From 6353ffa18f14e9fafc528031f565ac7dbe20f140 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 17 Apr 2026 17:17:45 +0200 Subject: [PATCH 46/46] SCPN1-10586 --- RFXtoRP_HsrCarrierApt_CarrierExpected.ftl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RFXtoRP_HsrCarrierApt_CarrierExpected.ftl b/RFXtoRP_HsrCarrierApt_CarrierExpected.ftl index 68dda4b..b5df356 100644 --- a/RFXtoRP_HsrCarrierApt_CarrierExpected.ftl +++ b/RFXtoRP_HsrCarrierApt_CarrierExpected.ftl @@ -1,5 +1,6 @@ [ <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) /> + <#assign ref_datetime2 = AddSecondsToDatetime(ref_datetime?datetime.iso, 60)?iso_utc /> { "Header": { "ProjectID": "${projectRP}" @@ -19,7 +20,7 @@ "RefDate": { - "DateTime": "${ref_datetime}", + "DateTime": "${ref_datetime2}", "AuthorTimeZone": "${time_zone_rfx}" } },