From d9f9a4762afb54e4a4a227f153d7d75f06403af7 Mon Sep 17 00:00:00 2001 From: Laure Pascal Date: Fri, 20 Oct 2023 09:28:44 +0200 Subject: [PATCH] Tracking HU labelled --- RFXtoRP_HsrPrepa.ftl | 24 ++++++++++------- RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl | 36 +++++++++++-------------- 2 files changed, 31 insertions(+), 29 deletions(-) diff --git a/RFXtoRP_HsrPrepa.ftl b/RFXtoRP_HsrPrepa.ftl index 45ed74d..f365bc0 100644 --- a/RFXtoRP_HsrPrepa.ftl +++ b/RFXtoRP_HsrPrepa.ftl @@ -28,15 +28,21 @@ "datas" : <#include "RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl"> } - <#if preparationOrder.preparation_line_lst.despatched_ipg.consignment_unit_id != ""> <#-- if le colis a un tracking - pb listes--> - , - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl"> - } - + + <#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list??) as preparation_line> + <#list preparation_line.despatched_ipg_list as despatched_ipg> + <#if despatched_ipg.consignment_unit_id != ""> + , + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl"> + } + + + + ] <#break> diff --git a/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl b/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl index ae20883..dd55a18 100644 --- a/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl +++ b/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl @@ -1,24 +1,20 @@ <#include "HfRpConfig.ftl"> <#include "ReflexUtils.ftl"> [ - <#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list??) as preparation_line> - <#list preparation_line.despatched_ipg_list as despatched_ipg> - { - "Header": { - "ProjectID": "${projectRP}" - }, - "ID": { - "RefID": "${despatched_ipg.consignment_unit_id}" - }, - "Payload": { - <#if despatched_ipg.carton_number != "000000000000000000"> - "HandlingunitID": "${despatched_ipg.carton_number}" - <#else> - "HandlingunitID": "${despatched_ipg.hd_number}" - - } - }<#sep>, - - <#sep>, - + + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + "RefID": "${despatched_ipg.consignment_unit_id}" + }, + "Payload": { + <#if despatched_ipg.carton_number != "000000000000000000"> + "HandlingunitID": "${despatched_ipg.carton_number}" + <#else> + "HandlingunitID": "${despatched_ipg.hd_number}" + + } + } ]