From 5cafa068a75d2f54eeed921beb3c4c37b03f28a4 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 25 Mar 2024 18:03:45 +0100 Subject: [PATCH 1/8] Modifs date emballage --- RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl b/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl index feb6c2e..046e1d3 100644 --- a/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl +++ b/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl @@ -8,6 +8,10 @@ "ProjectID": "${projectRP}" }, "ID": { + "RefDate": { + "AuthorTimeZone": "${time_zone_rfx}", + "DateTime": "${preparation_line.confirmation_datetime}" + }, <#if despatched_ipg.carton_number != "000000000000000000"> "RefID": "${despatched_ipg.carton_number}" <#else> From 196ab387acdd112161fdbcb00195051979342f23 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 26 Mar 2024 10:00:03 +0100 Subject: [PATCH 2/8] modifs date --- RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl b/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl index 046e1d3..19a13de 100644 --- a/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl +++ b/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl @@ -1,8 +1,10 @@ <#include "HfRpConfig.ftl"> [ + < <#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") as preparation_line> <#list preparation_line.despatched_ipg_list as despatched_ipg> + <#assign packing_datetime = RfxDateTimetoUTC(preparation_line.confirmation_datetime,time_zone_offset_rfx) /> { "Header": { "ProjectID": "${projectRP}" From 0fff71b759fb1ef6c309d4330856a318a3ab167d Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 26 Mar 2024 10:09:15 +0100 Subject: [PATCH 3/8] modifs goods --- RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl | 1 + 1 file changed, 1 insertion(+) diff --git a/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl b/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl index 19a13de..324c50d 100644 --- a/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl +++ b/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl @@ -1,4 +1,5 @@ <#include "HfRpConfig.ftl"> +<#include "ReflexUtils.ftl"> [ < From fd9f248619fb074339debb8343cccfbe402495e1 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 26 Mar 2024 10:19:20 +0100 Subject: [PATCH 4/8] modifs goods --- RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl b/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl index 324c50d..8cb15ab 100644 --- a/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl +++ b/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl @@ -13,7 +13,7 @@ "ID": { "RefDate": { "AuthorTimeZone": "${time_zone_rfx}", - "DateTime": "${preparation_line.confirmation_datetime}" + "DateTime": "${packing_datetime}" }, <#if despatched_ipg.carton_number != "000000000000000000"> "RefID": "${despatched_ipg.carton_number}" From 264f9131d08991983a44487e10e329948e51d19c Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 26 Mar 2024 10:26:59 +0100 Subject: [PATCH 5/8] modifs goods --- RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl | 1 - 1 file changed, 1 deletion(-) diff --git a/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl b/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl index 8cb15ab..2094590 100644 --- a/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl +++ b/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl @@ -2,7 +2,6 @@ <#include "ReflexUtils.ftl"> [ - < <#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") as preparation_line> <#list preparation_line.despatched_ipg_list as despatched_ipg> <#assign packing_datetime = RfxDateTimetoUTC(preparation_line.confirmation_datetime,time_zone_offset_rfx) /> From d1512d426947b8916b1539ad847d2f8785d75f49 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 26 Mar 2024 11:08:38 +0100 Subject: [PATCH 6/8] modifs date packing --- RFXtoRP_HsrPrepa.ftl | 3 +- ...rPrepa_HUsAdded_HandlingUnitDispatched.ftl | 12 ++-- ...oRP_HsrPrepa_HandlingunitGoodsPrepared.ftl | 60 +++++++++---------- RFXtoRP_HsrPrepa_HandlingunitHUsAdded.ftl | 5 +- 4 files changed, 42 insertions(+), 38 deletions(-) diff --git a/RFXtoRP_HsrPrepa.ftl b/RFXtoRP_HsrPrepa.ftl index eef8a4a..ddb67e3 100644 --- a/RFXtoRP_HsrPrepa.ftl +++ b/RFXtoRP_HsrPrepa.ftl @@ -2,7 +2,7 @@ <#-- input : message RFX --> <#-- project : projectId in ReflexPlatform --> <#-- organisation : organisationtId in ReflexPlatform --> - +<#include "ReflexUtils.ftl"> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> <#assign organisationRP = organisation> @@ -49,6 +49,7 @@ <#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") as preparation_line> <#list preparation_line.despatched_ipg_list as despatched_ipg> + <#assign HUadded_packing_datetime = RfxDateTimetoUTC(preparation_line.confirmation_datetime,time_zone_offset_rfx) /> <#if despatched_ipg.consignment_unit_id!=""> , { diff --git a/RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl b/RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl index d8e06d9..64be3ad 100644 --- a/RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl +++ b/RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl @@ -1,24 +1,24 @@ <#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_line2> - <#list preparation_line2.despatched_ipg_list?filter(j ->j.carton_number!="000000000000000000") as despatched_ipg2> +<#assign dispatched3_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_line3> + <#list preparation_line2.despatched_ipg_list?filter(j ->j.carton_number!="000000000000000000") as despatched_ipg3> { "Header": { "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${despatched_ipg2.carton_number}", + "RefID": "${despatched_ipg3.carton_number}", "RefDate": { - "DateTime": "${dispatched_datetime}", + "DateTime": "${dispatched3_datetime}", "AuthorTimeZone": "${time_zone_rfx}" } }, "Payload": { } }<#sep>, - <#if preparation_line2.despatched_ipg_list?filter(j ->j.carton_number!="000000000000000000")?size!=0 > + <#if preparation_line3.despatched_ipg_list?filter(j ->j.carton_number!="000000000000000000")?size!=0 > <#sep>, diff --git a/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl b/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl index 2094590..ac496b5 100644 --- a/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl +++ b/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl @@ -2,9 +2,9 @@ <#include "ReflexUtils.ftl"> [ - <#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") as preparation_line> - <#list preparation_line.despatched_ipg_list as despatched_ipg> - <#assign packing_datetime = RfxDateTimetoUTC(preparation_line.confirmation_datetime,time_zone_offset_rfx) /> + <#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") as preparation_line2> + <#list preparation_line2.despatched_ipg_list as despatched_ipg2> + <#assign packing_datetime = RfxDateTimetoUTC(preparation_line2.confirmation_datetime,time_zone_offset_rfx) /> { "Header": { "ProjectID": "${projectRP}" @@ -14,19 +14,19 @@ "AuthorTimeZone": "${time_zone_rfx}", "DateTime": "${packing_datetime}" }, - <#if despatched_ipg.carton_number != "000000000000000000"> - "RefID": "${despatched_ipg.carton_number}" + <#if despatched_ipg2.carton_number != "000000000000000000"> + "RefID": "${despatched_ipg2.carton_number}" <#else> - "RefID": "${despatched_ipg.hd_number}" + "RefID": "${despatched_ipg2.hd_number}" }, "Payload": { "Information" :{ - <#if despatched_ipg.carton_number != "000000000000000000"> - "ContainerType": "${despatched_ipg.carton_type_code}" - <#if preparation_line.despatched_cartons_list?? > - <#list preparation_line.despatched_cartons_list?filter(l ->l.carton_number==despatched_ipg.carton_number) as dimensionCarton> + <#if despatched_ipg2.carton_number != "000000000000000000"> + "ContainerType": "${despatched_ipg2.carton_type_code}" + <#if preparation_line2.despatched_cartons_list?? > + <#list preparation_line2.despatched_cartons_list?filter(l ->l.carton_number==despatched_ipg2.carton_number) as dimensionCarton> , "Length": { "Unit": "${length_unit_rfx}", @@ -47,9 +47,9 @@ <#else> - "ContainerType": "${despatched_ipg.hd_type_code?json_string}" - <#if preparation_line.despatched_hds_list??> - <#list preparation_line.despatched_hds_list?filter(j ->j.handling_device_number==despatched_ipg.hd_number) as dimensionHU> + "ContainerType": "${despatched_ipg2.hd_type_code?json_string}" + <#if preparation_line2.despatched_hds_list??> + <#list preparation_line2.despatched_hds_list?filter(j ->j.handling_device_number==despatched_ipg2.hd_number) as dimensionHU> , "Length": { "Unit": "${length_unit_rfx}", @@ -74,26 +74,26 @@ "PreparedContents" :[ { "Goods": { - "ItemID": "${preparation_line.item_code?trim?json_string}", - "LVBranchID": "${preparation_line.item_lv_code?json_string}", - <#if (despatched_ipg.ipg_manufacture_date?length != 0) && (despatched_ipg.ipg_manufacture_date?starts_with("00") == false)> - <#assign priority_date = despatched_ipg.ipg_manufacture_date?datetime(rfx_date_format_default)?iso_utc /> + "ItemID": "${preparation_line2.item_code?trim?json_string}", + "LVBranchID": "${preparation_line2.item_lv_code?json_string}", + <#if (despatched_ipg2.ipg_manufacture_date?length != 0) && (despatched_ipg2.ipg_manufacture_date?starts_with("00") == false)> + <#assign priority_date = despatched_ipg2.ipg_manufacture_date?datetime(rfx_date_format_default)?iso_utc /> "PriorityDate": "${priority_date}", <#else> - <#if (despatched_ipg.ipg_receipt_date?length != 0) && (despatched_ipg.ipg_receipt_date?starts_with("00")== false)> - <#assign priority_date = despatched_ipg.ipg_receipt_date?datetime(rfx_date_format_default)?iso_utc /> + <#if (despatched_ipg2.ipg_receipt_date?length != 0) && (despatched_ipg2.ipg_receipt_date?starts_with("00")== false)> + <#assign priority_date = despatched_ipg2.ipg_receipt_date?datetime(rfx_date_format_default)?iso_utc /> "PriorityDate": "${priority_date}", <#else> - <#if (despatched_ipg.ipg_best_before_date?length != 0) && (despatched_ipg.ipg_best_before_date?starts_with("00")== false)> - <#assign priority_date = despatched_ipg.ipg_best_before_date?datetime(rfx_date_format_default)?iso_utc /> + <#if (despatched_ipg2.ipg_best_before_date?length != 0) && (despatched_ipg2.ipg_best_before_date?starts_with("00")== false)> + <#assign priority_date = despatched_ipg2.ipg_best_before_date?datetime(rfx_date_format_default)?iso_utc /> "PriorityDate": "${priority_date}", <#else> - <#if (despatched_ipg.ipg_sell_by_date?length != 0) && (despatched_ipg.ipg_sell_by_date?starts_with("00")== false)> - <#assign priority_date = despatched_ipg.ipg_sell_by_date?datetime(rfx_date_format_default)?iso_utc /> + <#if (despatched_ipg2.ipg_sell_by_date?length != 0) && (despatched_ipg2.ipg_sell_by_date?starts_with("00")== false)> + <#assign priority_date = despatched_ipg2.ipg_sell_by_date?datetime(rfx_date_format_default)?iso_utc /> "PriorityDate": "${priority_date}", <#else> - <#if (despatched_ipg.ipg_use_by_date?length != 0) && (despatched_ipg.ipg_use_by_date?starts_with("00")== false)> - <#assign priority_date = despatched_ipg.ipg_use_by_date?datetime(rfx_date_format_default)?iso_utc /> + <#if (despatched_ipg2.ipg_use_by_date?length != 0) && (despatched_ipg2.ipg_use_by_date?starts_with("00")== false)> + <#assign priority_date = despatched_ipg2.ipg_use_by_date?datetime(rfx_date_format_default)?iso_utc /> "PriorityDate": "${priority_date}", <#else> <#if (preparationOrder.stock_despatch_at_preparation_datetime?length != 0) && (preparationOrder.stock_despatch_at_preparation_datetime?starts_with("00")== false)> @@ -111,16 +111,16 @@ <#-- Segmentation Keys inclusion --> <#include "RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl"> }, - "ExecutionflowID": "${preparation_line.preparation_order_originator_reference?trim?json_string}", - <#if (preparation_line.pro_originator_reference_line_number!0) != 0> - "LineID": "${preparation_line.pro_originator_reference_line_number}", + "ExecutionflowID": "${preparation_line2.preparation_order_originator_reference?trim?json_string}", + <#if (preparation_line2.pro_originator_reference_line_number!0) != 0> + "LineID": "${preparation_line2.pro_originator_reference_line_number}", <#else> - "LineID": "${preparation_line.pro_line_number!0}", + "LineID": "${preparation_line2.pro_line_number!0}", "ActorID": "${preparationOrder.physical_depot_code?trim?json_string}", "Quantity": { "LVID": "${quantity_in_base_lv_RP_Cst}", - "Value": ${despatched_ipg.quantity_lvs} + "Value": ${despatched_ipg2.quantity_lvs} } } diff --git a/RFXtoRP_HsrPrepa_HandlingunitHUsAdded.ftl b/RFXtoRP_HsrPrepa_HandlingunitHUsAdded.ftl index cb9e5b0..968ed88 100644 --- a/RFXtoRP_HsrPrepa_HandlingunitHUsAdded.ftl +++ b/RFXtoRP_HsrPrepa_HandlingunitHUsAdded.ftl @@ -1,12 +1,15 @@ <#include "HfRpConfig.ftl"> <#include "ReflexUtils.ftl"> [ - { "Header": { "ProjectID": "${projectRP}" }, "ID": { + "RefDate": { + "AuthorTimeZone": "${time_zone_rfx}", + "DateTime": "${HUadded_packing_datetime}" + }, "RefID": "${despatched_ipg.hd_number}" }, From cfb8e2ab5ac20e735d7506db64ceb1a11840deba Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 26 Mar 2024 11:21:10 +0100 Subject: [PATCH 7/8] modifs HUadded --- RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl b/RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl index 64be3ad..2d5d7e0 100644 --- a/RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl +++ b/RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl @@ -3,7 +3,7 @@ [ <#assign dispatched3_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_line3> - <#list preparation_line2.despatched_ipg_list?filter(j ->j.carton_number!="000000000000000000") as despatched_ipg3> + <#list preparation_line3.despatched_ipg_list?filter(j ->j.carton_number!="000000000000000000") as despatched_ipg3> { "Header": { "ProjectID": "${projectRP}" From eca09f2e9ebda72d51624b848f4943b1884be3c0 Mon Sep 17 00:00:00 2001 From: frea Date: Tue, 26 Mar 2024 11:46:09 +0100 Subject: [PATCH 8/8] Merge branch 'develop' of https://gitlab.hardis-group.com/r-d-technique/tiers/reflex-wms-connector into SCPN1-6203 --- RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl | 2 -- 1 file changed, 2 deletions(-) diff --git a/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl b/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl index ac496b5..38ec8a0 100644 --- a/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl +++ b/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl @@ -1,6 +1,4 @@ <#include "HfRpConfig.ftl"> -<#include "ReflexUtils.ftl"> - [ <#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") as preparation_line2> <#list preparation_line2.despatched_ipg_list as despatched_ipg2>