diff --git a/RFXtoRP_HsaLstCarSta_CarrierArrived.ftl b/RFXtoRP_HsaLstCarSta_CarrierArrived.ftl index 256ab68..bf31116 100644 --- a/RFXtoRP_HsaLstCarSta_CarrierArrived.ftl +++ b/RFXtoRP_HsaLstCarSta_CarrierArrived.ftl @@ -8,7 +8,7 @@ <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !=""> "RefID": "${carrier_apt_status.appointment_reference?json_string}", <#else> - "RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}", + "RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}", "RefDate": { "DateTime": "${ref_datetime}", diff --git a/RFXtoRP_HsaLstCarSta_CarrierDeparted.ftl b/RFXtoRP_HsaLstCarSta_CarrierDeparted.ftl index c39c0c3..dc4ed53 100644 --- a/RFXtoRP_HsaLstCarSta_CarrierDeparted.ftl +++ b/RFXtoRP_HsaLstCarSta_CarrierDeparted.ftl @@ -8,7 +8,7 @@ <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !=""> "RefID": "${carrier_apt_status.appointment_reference?json_string}", <#else> - "RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}", + "RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}", "RefDate": { "DateTime": "${ref_datetime}", diff --git a/RFXtoRP_HsaLstCarSta_CarrierExpected.ftl b/RFXtoRP_HsaLstCarSta_CarrierExpected.ftl index c39c0c3..dc4ed53 100644 --- a/RFXtoRP_HsaLstCarSta_CarrierExpected.ftl +++ b/RFXtoRP_HsaLstCarSta_CarrierExpected.ftl @@ -8,7 +8,7 @@ <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !=""> "RefID": "${carrier_apt_status.appointment_reference?json_string}", <#else> - "RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}", + "RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}", "RefDate": { "DateTime": "${ref_datetime}", diff --git a/RFXtoRP_HsaLstCarSta_LoadingCompleted.ftl b/RFXtoRP_HsaLstCarSta_LoadingCompleted.ftl index c39c0c3..dc4ed53 100644 --- a/RFXtoRP_HsaLstCarSta_LoadingCompleted.ftl +++ b/RFXtoRP_HsaLstCarSta_LoadingCompleted.ftl @@ -8,7 +8,7 @@ <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !=""> "RefID": "${carrier_apt_status.appointment_reference?json_string}", <#else> - "RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}", + "RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}", "RefDate": { "DateTime": "${ref_datetime}", diff --git a/RFXtoRP_HsaLstCarSta_LoadingStarted.ftl b/RFXtoRP_HsaLstCarSta_LoadingStarted.ftl index c39c0c3..dc4ed53 100644 --- a/RFXtoRP_HsaLstCarSta_LoadingStarted.ftl +++ b/RFXtoRP_HsaLstCarSta_LoadingStarted.ftl @@ -8,7 +8,7 @@ <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !=""> "RefID": "${carrier_apt_status.appointment_reference?json_string}", <#else> - "RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}", + "RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}", "RefDate": { "DateTime": "${ref_datetime}", diff --git a/RFXtoRP_HsaLstCarSta_UnloadingCompleted.ftl b/RFXtoRP_HsaLstCarSta_UnloadingCompleted.ftl index c39c0c3..dc4ed53 100644 --- a/RFXtoRP_HsaLstCarSta_UnloadingCompleted.ftl +++ b/RFXtoRP_HsaLstCarSta_UnloadingCompleted.ftl @@ -8,7 +8,7 @@ <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !=""> "RefID": "${carrier_apt_status.appointment_reference?json_string}", <#else> - "RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}", + "RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}", "RefDate": { "DateTime": "${ref_datetime}", diff --git a/RFXtoRP_HsaLstCarSta_UnloadingStarted.ftl b/RFXtoRP_HsaLstCarSta_UnloadingStarted.ftl index c39c0c3..dc4ed53 100644 --- a/RFXtoRP_HsaLstCarSta_UnloadingStarted.ftl +++ b/RFXtoRP_HsaLstCarSta_UnloadingStarted.ftl @@ -8,7 +8,7 @@ <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !=""> "RefID": "${carrier_apt_status.appointment_reference?json_string}", <#else> - "RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}", + "RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}", "RefDate": { "DateTime": "${ref_datetime}", diff --git a/RFXtoRP_HsrCarrierApt_AppointmentCarrierExpected.ftl b/RFXtoRP_HsrCarrierApt_AppointmentCarrierExpected.ftl deleted file mode 100644 index 13bc369..0000000 --- a/RFXtoRP_HsrCarrierApt_AppointmentCarrierExpected.ftl +++ /dev/null @@ -1,26 +0,0 @@ -[ - <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) /> - { - "Header": { - "ProjectID": "${projectRP}" - }, - "ID": { - <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "RefID": "${carrier_apt.appointment_reference?json_string}", - <#else> - <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> - "RefID": "${carrier_apt.appointment_reference?json_string}${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", - <#else> - "RefID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", - - - "RefDate": { - "DateTime": "${ref_datetime}", - "AuthorTimeZone": "${time_zone_rfx}" - } - }, - "Payload":{ - "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" - } - } -] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl b/RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl index 4cd5972..21f408b 100644 --- a/RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl +++ b/RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl @@ -5,14 +5,18 @@ "ProjectID": "${projectRP}" }, "ID": { - <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "RefID": "${carrier_apt.appointment_reference?json_string}", - <#else> - <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> - "RefID": "${carrier_apt.appointment_reference?json_string}${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", - <#else> - "RefID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", - + <#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 --> + <#else> + "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + + <#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}", + "RefDate": { "DateTime": "${ref_datetime}", diff --git a/RFXtoRP_HsrCarrierApt_AppointmentMetadataUpdatedToConfigure.ftl b/RFXtoRP_HsrCarrierApt_AppointmentMetadataUpdatedToConfigure.ftl index 81fefce..5ef3e72 100644 --- a/RFXtoRP_HsrCarrierApt_AppointmentMetadataUpdatedToConfigure.ftl +++ b/RFXtoRP_HsrCarrierApt_AppointmentMetadataUpdatedToConfigure.ftl @@ -5,16 +5,20 @@ "ProjectID": "${projectRP}" }, "ID": { - <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "RefID": "${carrier_apt.appointment_reference?json_string}", - <#else> - <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> - "RefID": "${carrier_apt.appointment_reference?json_string}${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", + <#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> - "RefID": "${carrier_apt.physical_depot?json_string}${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!=""> + "AppointmentID": "${carrier_apt.appointment_reference?json_string}" + <#else> + "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}" - } + }, "Payload": { "ActorID": "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", <#--To configure--> diff --git a/RFXtoRP_HsrCarrierApt_CarrierArrived.ftl b/RFXtoRP_HsrCarrierApt_CarrierArrived.ftl index afdefe6..1cd5974 100644 --- a/RFXtoRP_HsrCarrierApt_CarrierArrived.ftl +++ b/RFXtoRP_HsrCarrierApt_CarrierArrived.ftl @@ -5,11 +5,19 @@ "ProjectID": "${projectRP}" }, "ID": { - <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference !=""> - "RefID": "${carrier_apt.appointment_reference?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 --> + <#else> + "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + <#else> - "RefID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number?json_string}${carrier_apt.appointment_number?json_string}", - + <#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}", + + "RefDate": { "DateTime": "${ref_datetime}", "AuthorTimeZone": "${time_zone_rfx}" diff --git a/RFXtoRP_HsrCarrierApt_CarrierDeparted.ftl b/RFXtoRP_HsrCarrierApt_CarrierDeparted.ftl index afdefe6..1cd5974 100644 --- a/RFXtoRP_HsrCarrierApt_CarrierDeparted.ftl +++ b/RFXtoRP_HsrCarrierApt_CarrierDeparted.ftl @@ -5,11 +5,19 @@ "ProjectID": "${projectRP}" }, "ID": { - <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference !=""> - "RefID": "${carrier_apt.appointment_reference?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 --> + <#else> + "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + <#else> - "RefID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number?json_string}${carrier_apt.appointment_number?json_string}", - + <#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}", + + "RefDate": { "DateTime": "${ref_datetime}", "AuthorTimeZone": "${time_zone_rfx}" diff --git a/RFXtoRP_HsrCarrierApt_LoadingCompleted.ftl b/RFXtoRP_HsrCarrierApt_LoadingCompleted.ftl index afdefe6..1cd5974 100644 --- a/RFXtoRP_HsrCarrierApt_LoadingCompleted.ftl +++ b/RFXtoRP_HsrCarrierApt_LoadingCompleted.ftl @@ -5,11 +5,19 @@ "ProjectID": "${projectRP}" }, "ID": { - <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference !=""> - "RefID": "${carrier_apt.appointment_reference?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 --> + <#else> + "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + <#else> - "RefID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number?json_string}${carrier_apt.appointment_number?json_string}", - + <#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}", + + "RefDate": { "DateTime": "${ref_datetime}", "AuthorTimeZone": "${time_zone_rfx}" diff --git a/RFXtoRP_HsrCarrierApt_LoadingStarted.ftl b/RFXtoRP_HsrCarrierApt_LoadingStarted.ftl index afdefe6..1cd5974 100644 --- a/RFXtoRP_HsrCarrierApt_LoadingStarted.ftl +++ b/RFXtoRP_HsrCarrierApt_LoadingStarted.ftl @@ -5,11 +5,19 @@ "ProjectID": "${projectRP}" }, "ID": { - <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference !=""> - "RefID": "${carrier_apt.appointment_reference?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 --> + <#else> + "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + <#else> - "RefID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number?json_string}${carrier_apt.appointment_number?json_string}", - + <#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}", + + "RefDate": { "DateTime": "${ref_datetime}", "AuthorTimeZone": "${time_zone_rfx}" diff --git a/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl index 0d7a7e1..99d96d4 100644 --- a/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl @@ -1,15 +1,19 @@ <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) /> [ { - <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + <<#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 --> + <#else> + "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + + <#else> + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> "AppointmentID": "${carrier_apt.appointment_reference?json_string}", <#else> - <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", - <#else> - "AppointmentID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", - + "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", + "Header": { "ProjectID": "${projectRP}" }, diff --git a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl index 7bfc9a3..4f9a2a8 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl @@ -4,13 +4,17 @@ "ProjectID": "${projectRP}" }, "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", - <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}", - <#else> - <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> - "AppointmentID": "${carrier_apt.physical_depot?json_string}${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 --> + <#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 --> <#else> - "AppointmentID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", + "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + + <#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}", @@ -101,7 +105,7 @@ } ], <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true" && carrier_apt.appointment_designation?? && carrier_apt.appointment_designation!=""> - "Reason": "LOAD AND UNLOADING / ${carrier_apt.appointment_designation?json_string}", + "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}", diff --git a/RFXtoRP_HsrCarrierApt_UnloadingCompleted.ftl b/RFXtoRP_HsrCarrierApt_UnloadingCompleted.ftl index afdefe6..6c93825 100644 --- a/RFXtoRP_HsrCarrierApt_UnloadingCompleted.ftl +++ b/RFXtoRP_HsrCarrierApt_UnloadingCompleted.ftl @@ -5,11 +5,19 @@ "ProjectID": "${projectRP}" }, "ID": { - <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference !=""> - "RefID": "${carrier_apt.appointment_reference?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 --> + <#else> + "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + <#else> - "RefID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number?json_string}${carrier_apt.appointment_number?json_string}", - + <#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}", + + "RefDate": { "DateTime": "${ref_datetime}", "AuthorTimeZone": "${time_zone_rfx}" diff --git a/RFXtoRP_HsrCarrierApt_UnloadingStarted.ftl b/RFXtoRP_HsrCarrierApt_UnloadingStarted.ftl index afdefe6..1cd5974 100644 --- a/RFXtoRP_HsrCarrierApt_UnloadingStarted.ftl +++ b/RFXtoRP_HsrCarrierApt_UnloadingStarted.ftl @@ -5,11 +5,19 @@ "ProjectID": "${projectRP}" }, "ID": { - <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference !=""> - "RefID": "${carrier_apt.appointment_reference?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 --> + <#else> + "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + <#else> - "RefID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number?json_string}${carrier_apt.appointment_number?json_string}", - + <#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}", + + "RefDate": { "DateTime": "${ref_datetime}", "AuthorTimeZone": "${time_zone_rfx}" diff --git a/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl index 8e424ff..28fac14 100644 --- a/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl @@ -5,13 +5,17 @@ "Header":{ "ProjectID": "${projectRP}" }, - <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}", - <#else> - <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", + <#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 --> <#else> - "AppointmentID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", + "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + + <#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"> diff --git a/RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl b/RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl index 4c5b120..b8a1d02 100644 --- a/RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl @@ -4,13 +4,17 @@ "Header":{ "ProjectID": "${projectRP}" }, - <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}", - <#else> - <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", + <#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 --> <#else> - "AppointmentID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", + "AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo --> + + <#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)}", diff --git a/RPtoRFX_CarrierAppointmentCancellationCode.ftl b/RPtoRFX_CarrierAppointmentCancellationCode.ftl index 79d6747..c9262b8 100644 --- a/RPtoRFX_CarrierAppointmentCancellationCode.ftl +++ b/RPtoRFX_CarrierAppointmentCancellationCode.ftl @@ -1,2 +1,2 @@ -<#-- To custom with cancellation reason code--> +<#-- To custom with cancellation reason code, the reason code must be cancellation type--> "cancellation_reason_code": "" \ No newline at end of file diff --git a/RPtoRFX_CarrierAppointmentCreated.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl index 820c79d..6a4b174 100644 --- a/RPtoRFX_CarrierAppointmentCreated.ftl +++ b/RPtoRFX_CarrierAppointmentCreated.ftl @@ -56,9 +56,7 @@ <#else> <#if appointment.AppointmentType == "APPOINTMENT_TYPE_LOADING"> - <#if appointment.Commissions[0].OrderID ?? && appointment.Commissions[0].OrderID!=""> - "appointment_designation":"LOADING", - <#else> + <#if appointment.AppointmentType == "APPOINTMENT_TYPE_LOADING"> "appointment_designation":"${(appointment.Reason!"")?json_string}",