From 243482af3bdeecbea63402aa84d93816099097ea Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Thu, 20 Nov 2025 17:34:07 +0100 Subject: [PATCH] modif sur les rdz --- RFXtoRP_HsaCarrierAptStatus_CarrierArrived.ftl | 3 +++ RFXtoRP_HsaCarrierAptStatus_CarrierDeparted.ftl | 3 +++ RFXtoRP_HsaCarrierAptStatus_CarrierExpected.ftl | 3 +++ RFXtoRP_HsaCarrierAptStatus_ReceptionStarted.ftl | 5 ++++- RFXtoRP_HsaCarrierAptStatus_ReceptionUnloaded.ftl | 3 +++ RPtoRFX_CarrierAppointment.ftl | 4 ++-- 6 files changed, 18 insertions(+), 3 deletions(-) diff --git a/RFXtoRP_HsaCarrierAptStatus_CarrierArrived.ftl b/RFXtoRP_HsaCarrierAptStatus_CarrierArrived.ftl index b80bc11..6426fbe 100644 --- a/RFXtoRP_HsaCarrierAptStatus_CarrierArrived.ftl +++ b/RFXtoRP_HsaCarrierAptStatus_CarrierArrived.ftl @@ -5,6 +5,9 @@ "ProjectID": "${projectRP}" }, "ID": { + <#if (!carrier_apt_status.appointment_reference?? || carrier_apt_status.appointment_reference == "")> + <#stop "appointment_reference is not valid or empty" > + "RefID": "${carrier_apt_status.appointment_reference?trim?json_string}", "RefDate": { "DateTime": "${ref_datetime}", diff --git a/RFXtoRP_HsaCarrierAptStatus_CarrierDeparted.ftl b/RFXtoRP_HsaCarrierAptStatus_CarrierDeparted.ftl index b80bc11..6426fbe 100644 --- a/RFXtoRP_HsaCarrierAptStatus_CarrierDeparted.ftl +++ b/RFXtoRP_HsaCarrierAptStatus_CarrierDeparted.ftl @@ -5,6 +5,9 @@ "ProjectID": "${projectRP}" }, "ID": { + <#if (!carrier_apt_status.appointment_reference?? || carrier_apt_status.appointment_reference == "")> + <#stop "appointment_reference is not valid or empty" > + "RefID": "${carrier_apt_status.appointment_reference?trim?json_string}", "RefDate": { "DateTime": "${ref_datetime}", diff --git a/RFXtoRP_HsaCarrierAptStatus_CarrierExpected.ftl b/RFXtoRP_HsaCarrierAptStatus_CarrierExpected.ftl index b80bc11..6426fbe 100644 --- a/RFXtoRP_HsaCarrierAptStatus_CarrierExpected.ftl +++ b/RFXtoRP_HsaCarrierAptStatus_CarrierExpected.ftl @@ -5,6 +5,9 @@ "ProjectID": "${projectRP}" }, "ID": { + <#if (!carrier_apt_status.appointment_reference?? || carrier_apt_status.appointment_reference == "")> + <#stop "appointment_reference is not valid or empty" > + "RefID": "${carrier_apt_status.appointment_reference?trim?json_string}", "RefDate": { "DateTime": "${ref_datetime}", diff --git a/RFXtoRP_HsaCarrierAptStatus_ReceptionStarted.ftl b/RFXtoRP_HsaCarrierAptStatus_ReceptionStarted.ftl index b80bc11..07b6b85 100644 --- a/RFXtoRP_HsaCarrierAptStatus_ReceptionStarted.ftl +++ b/RFXtoRP_HsaCarrierAptStatus_ReceptionStarted.ftl @@ -5,7 +5,10 @@ "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${carrier_apt_status.appointment_reference?trim?json_string}", + <#if (!carrier_apt_status.appointment_reference?? || carrier_apt_status.appointment_reference == "")> + <#stop "appointment_reference is not valid or empty" > + + "RefID": "${carrier_apt_status.appointment_reference?trim?json_string}", "RefDate": { "DateTime": "${ref_datetime}", "AuthorTimeZone": "${time_zone_rfx}" diff --git a/RFXtoRP_HsaCarrierAptStatus_ReceptionUnloaded.ftl b/RFXtoRP_HsaCarrierAptStatus_ReceptionUnloaded.ftl index b80bc11..6426fbe 100644 --- a/RFXtoRP_HsaCarrierAptStatus_ReceptionUnloaded.ftl +++ b/RFXtoRP_HsaCarrierAptStatus_ReceptionUnloaded.ftl @@ -5,6 +5,9 @@ "ProjectID": "${projectRP}" }, "ID": { + <#if (!carrier_apt_status.appointment_reference?? || carrier_apt_status.appointment_reference == "")> + <#stop "appointment_reference is not valid or empty" > + "RefID": "${carrier_apt_status.appointment_reference?trim?json_string}", "RefDate": { "DateTime": "${ref_datetime}", diff --git a/RPtoRFX_CarrierAppointment.ftl b/RPtoRFX_CarrierAppointment.ftl index 4147b66..eb0c5e2 100644 --- a/RPtoRFX_CarrierAppointment.ftl +++ b/RPtoRFX_CarrierAppointment.ftl @@ -15,7 +15,7 @@ "unloading_appointment" : "false", "load_appointment" : "true", "planned_load_start_datetime : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime,time_zone_rfx)}", - "planned_load_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime,appointment.Slot.DurationInSeconds?long)?iso_nz(time_zone_rfx)}" + "planned_load_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime?datetime.iso,appointment.Slot.DurationInSeconds?long)?iso_nz(time_zone_rfx)}" <#break> @@ -23,7 +23,7 @@ "unloading_appointment" : "true", "load_appointment" : "false", "planned_unloading_start_datetime : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime?iso_nz(time_zone_rfx))}", - "planned_unloading_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime,appointment.Slot.DurationInSeconds?long)?iso_nz(time_zone_rfx)}" + "planned_unloading_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime?datetime.iso,appointment.Slot.DurationInSeconds?long)?iso_nz(time_zone_rfx)}" <#break> <#default> <#stop "appointment.AppointmentType not implemented" >