diff --git a/RFXtoRP_HsrPrepa.ftl b/RFXtoRP_HsrPrepa.ftl index 9ed9935..45ed74d 100644 --- a/RFXtoRP_HsrPrepa.ftl +++ b/RFXtoRP_HsrPrepa.ftl @@ -28,6 +28,15 @@ "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"> + } + ] <#break> diff --git a/RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl b/RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl index 8e1c598..6e99c6b 100644 --- a/RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl +++ b/RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl @@ -1,25 +1,25 @@ <#include "HfRpConfig.ftl"> <#include "ReflexUtils.ftl"> [ - +<#assign dispatched_datetime = RfxDateTimetoUTC(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_offset_rfx) /> <#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list??) as preparation_line> - <#assign preparationOrder_confirmation_datetime = RfxDateTimetoUTC(preparation_line.confirmation_datetime,time_zone_offset_rfx) /> - <#list preparation_line.despatched_ipg_list as despatched_ipg> - { - "Header": { - "ProjectID": "${projectRP}" - }, - "ID": { - <#if despatched_ipg.carton_number != "000000000000000000"> - "RefID": "${despatched_ipg.carton_number}" + <#list preparation_line.despatched_ipg_list as despatched_ipg> + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + <#if despatched_ipg.carton_number != "000000000000000000"> + "RefID": "${despatched_ipg.carton_number}" <#else> - "RefID": "${despatched_ipg.hd_number}" + "RefID": "${despatched_ipg.hd_number}" - - }, - "Payload": { - + "RefDate": { + "DateTime": "${dispatched_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" } + }, + "Payload": { } }<#sep>, <#sep>, diff --git a/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl b/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl new file mode 100644 index 0000000..ae20883 --- /dev/null +++ b/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl @@ -0,0 +1,24 @@ +<#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>, + +]