From c79ab16480f71e2b3bd140c39a45b0f62280a5de Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 12 Dec 2023 14:25:58 +0100 Subject: [PATCH] Modifs 1212231425 --- RFXtoRP_HsrPrepa.ftl | 9 +++++++++ RFXtoRP_HsrPrepa_CarrierUpdated.ftl | 17 +++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 RFXtoRP_HsrPrepa_CarrierUpdated.ftl diff --git a/RFXtoRP_HsrPrepa.ftl b/RFXtoRP_HsrPrepa.ftl index 8dd9c37..14c8cea 100644 --- a/RFXtoRP_HsrPrepa.ftl +++ b/RFXtoRP_HsrPrepa.ftl @@ -29,7 +29,15 @@ "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl"> + }, + <#if preparationOrder.load_data.carrier_code!=""> + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.CarrierUpdated> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrPrepa_CarrierUpdated.ftl"> } + <#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list??) as preparation_line> <#list preparation_line.despatched_ipg_list as despatched_ipg> , @@ -43,6 +51,7 @@ ] + <#else> <#stop "no confirmed quantity for the preparation - preparation closed"> diff --git a/RFXtoRP_HsrPrepa_CarrierUpdated.ftl b/RFXtoRP_HsrPrepa_CarrierUpdated.ftl new file mode 100644 index 0000000..859f095 --- /dev/null +++ b/RFXtoRP_HsrPrepa_CarrierUpdated.ftl @@ -0,0 +1,17 @@ +<#include "HfRpConfig.ftl"> +<#include "ReflexUtils.ftl"> +[ + + { + "Header": { + "ProjectID": "${projectRP}" + }, + "RefID": "preparationOrder.preparation_line.preparation_order_originator_reference" + + }, + "Payload":{ + "Carrier": { + "ActorID":"${preparationOrder.load_data.carrier_code}" + } + } +] \ No newline at end of file