From 87efb21e644cdc630786b239e7b26f6d0fbe4518 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 9 Apr 2024 16:53:34 +0200 Subject: [PATCH 01/19] modifs ipg --- ...oRP_HsrPrepa_HandlingunitGoodsPrepared.ftl | 60 +++++++++---------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl b/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl index 38ec8a0..df6cf3b 100644 --- a/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl +++ b/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl @@ -1,8 +1,8 @@ <#include "HfRpConfig.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> - <#assign packing_datetime = RfxDateTimetoUTC(preparation_line2.confirmation_datetime,time_zone_offset_rfx) /> + <#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}" @@ -12,19 +12,19 @@ "AuthorTimeZone": "${time_zone_rfx}", "DateTime": "${packing_datetime}" }, - <#if despatched_ipg2.carton_number != "000000000000000000"> - "RefID": "${despatched_ipg2.carton_number}" + <#if despatched_ipg.carton_number != "000000000000000000"> + "RefID": "${despatched_ipg.carton_number}" <#else> - "RefID": "${despatched_ipg2.hd_number}" + "RefID": "${despatched_ipg.hd_number}" }, "Payload": { "Information" :{ - <#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> + <#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> , "Length": { "Unit": "${length_unit_rfx}", @@ -45,9 +45,9 @@ <#else> - "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> + "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> , "Length": { "Unit": "${length_unit_rfx}", @@ -72,26 +72,26 @@ "PreparedContents" :[ { "Goods": { - "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 /> + "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 /> "PriorityDate": "${priority_date}", <#else> - <#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 /> + <#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 /> "PriorityDate": "${priority_date}", <#else> - <#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 /> + <#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 /> "PriorityDate": "${priority_date}", <#else> - <#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 /> + <#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 /> "PriorityDate": "${priority_date}", <#else> - <#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 /> + <#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 /> "PriorityDate": "${priority_date}", <#else> <#if (preparationOrder.stock_despatch_at_preparation_datetime?length != 0) && (preparationOrder.stock_despatch_at_preparation_datetime?starts_with("00")== false)> @@ -109,16 +109,16 @@ <#-- Segmentation Keys inclusion --> <#include "RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl"> }, - "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}", + "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}", <#else> - "LineID": "${preparation_line2.pro_line_number!0}", + "LineID": "${preparation_line.pro_line_number!0}", "ActorID": "${preparationOrder.physical_depot_code?trim?json_string}", "Quantity": { "LVID": "${quantity_in_base_lv_RP_Cst}", - "Value": ${despatched_ipg2.quantity_lvs} + "Value": ${despatched_ipg.quantity_lvs} } } From d7c9c72762ccf42d2db2c62c0e8827340ea66ed4 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 10 Apr 2024 16:25:27 +0200 Subject: [PATCH 02/19] modifs hsrpro --- RFXtoRP_HsrPro.ftl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/RFXtoRP_HsrPro.ftl b/RFXtoRP_HsrPro.ftl index cfa3721..3258db3 100644 --- a/RFXtoRP_HsrPro.ftl +++ b/RFXtoRP_HsrPro.ftl @@ -16,16 +16,18 @@ <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign preparation_order = JsonUtil.jsonToMap(dataRfx)> [ - { + <#if preparation_order.originator_reference?? && preparation_order.originator_reference!=""> <#-- check preparation type code (internal order and reservation are ignored) --> <#if preparation_order.preparation_type_code == "010" || preparation_order.preparation_type_code == "030"> <#-- Only if preparation order not confirmed --> <#if preparation_order.preparation_order_confirmed == "false" > + { <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl"> + } <#else> <#stop "preparation order already confirmed"> @@ -36,7 +38,7 @@ <#else> <#stop "PRO reference is empty"> - } + ] <#break> @@ -46,18 +48,16 @@ <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign preparation_order = JsonUtil.jsonToMap(dataRfx)> [ - { <#if preparation_order.originator_reference?? && preparation_order.originator_reference!=""> - { + { <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsrPro_ExecutionflowCancelled.ftl"> - } + } <#else> <#stop "PRO reference is empty"> - } ] <#break> From 6b6cef5332f47dbe93445eacce63d7fa70b723aa Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 11 Apr 2024 11:01:05 +0200 Subject: [PATCH 03/19] modifs ipgmove --- RFXtoRP_HsaIpgMove.ftl | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/RFXtoRP_HsaIpgMove.ftl b/RFXtoRP_HsaIpgMove.ftl index c1a22d7..4a98824 100644 --- a/RFXtoRP_HsaIpgMove.ftl +++ b/RFXtoRP_HsaIpgMove.ftl @@ -14,8 +14,7 @@ <#-- exclusion of the cases of an IPG move with quantity = 0 (weight modification) --> <#if reflexMvtStockInterface.ipg_move_quantity_in_base_lvs != 0> - - <#-- IPG moves translated into Stock moves --> + <#-- IPG moves translated into Stock moves --> <#if reflexMvtStockInterface.ipg_move_type == "130" || reflexMvtStockInterface.ipg_move_type == "200" || reflexMvtStockInterface.ipg_move_type == "210" || @@ -41,22 +40,22 @@ <#-- IPG moves translated into goods received (all type of receipt) --> <#if (reflexMvtStockInterface.ipg_move_type == "100" || reflexMvtStockInterface.ipg_move_type == "110" || - reflexMvtStockInterface.ipg_move_type == "120") && reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!=""> - [ - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsReceived> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsaIpgMove_GoodsReceived.ftl"> - } - ] + reflexMvtStockInterface.ipg_move_type == "120") > + <#if reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!=""> + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsReceived> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsaIpgMove_GoodsReceived.ftl"> + } + ] + <#else> + <#-- Case of IPG move type volontarilly ignored--> + <#stop " Reference receipt is empty"> + <#else> - <#if reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!=""> - <#-- Case of IPG move type volontarilly ignored--> - <#stop " Reference receipt is empty"> - <#else> - <#stop> - + <#stop> <#else> From 26654a9820efcd47b74f1626c209c3d166a3e4c0 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 12 Apr 2024 09:37:03 +0200 Subject: [PATCH 04/19] modifs --- ...oRP_HsrPrepa_HandlingunitGoodsPrepared.ftl | 60 +++++++++---------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl b/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl index df6cf3b..7786d62 100644 --- a/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl +++ b/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl @@ -1,8 +1,8 @@ <#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) /> + <#list preparationOrder.preparation_line2_lst?filter(l ->l.despatched_ipg2_list?? && l.preparation_order_originator_reference!="") as preparation_line2> + <#list preparation_line2.despatched_ipg2_list as despatched_ipg2> + <#assign packing_datetime = RfxDateTimetoUTC(preparation_line2.confirmation_datetime,time_zone_offset_rfx) /> { "Header": { "ProjectID": "${projectRP}" @@ -12,19 +12,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?json_string}" + <#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}", @@ -45,9 +45,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}", @@ -72,26 +72,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)> @@ -109,16 +109,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} } } From eda5fe4e07ef155f6d68d754f05f286c2b895f57 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 15 Apr 2024 10:16:14 +0200 Subject: [PATCH 05/19] modifs hsrprepa --- ...oRP_HsrPrepa_HandlingunitGoodsPrepared.ftl | 60 +++++++++---------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl b/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl index 7786d62..941f578 100644 --- a/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl +++ b/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl @@ -1,8 +1,8 @@ <#include "HfRpConfig.ftl"> [ - <#list preparationOrder.preparation_line2_lst?filter(l ->l.despatched_ipg2_list?? && l.preparation_order_originator_reference!="") as preparation_line2> - <#list preparation_line2.despatched_ipg2_list as despatched_ipg2> - <#assign packing_datetime = RfxDateTimetoUTC(preparation_line2.confirmation_datetime,time_zone_offset_rfx) /> + <#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}" @@ -12,19 +12,19 @@ "AuthorTimeZone": "${time_zone_rfx}", "DateTime": "${packing_datetime}" }, - <#if despatched_ipg2.carton_number != "000000000000000000"> - "RefID": "${despatched_ipg2.carton_number}" + <#if despatched_ipg.carton_number != "000000000000000000"> + "RefID": "${despatched_ipg.carton_number}" <#else> - "RefID": "${despatched_ipg2.hd_number}" + "RefID": "${despatched_ipg.hd_number}" }, "Payload": { "Information" :{ - <#if despatched_ipg2.carton_number != "000000000000000000"> - "ContainerType": "${despatched_ipg2.carton_type_code?json_string}" - <#if preparation_line2.despatched_cartons_list?? > - <#list preparation_line2.despatched_cartons_list?filter(l ->l.carton_number==despatched_ipg2.carton_number) as dimensionCarton> + <#if despatched_ipg.carton_number != "000000000000000000"> + "ContainerType": "${despatched_ipg.carton_type_code?json_string}" + <#if preparation_line.despatched_cartons_list?? > + <#list preparation_line.despatched_cartons_list?filter(l ->l.carton_number==despatched_ipg.carton_number) as dimensionCarton> , "Length": { "Unit": "${length_unit_rfx}", @@ -45,9 +45,9 @@ <#else> - "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> + "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> , "Length": { "Unit": "${length_unit_rfx}", @@ -72,26 +72,26 @@ "PreparedContents" :[ { "Goods": { - "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 /> + "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 /> "PriorityDate": "${priority_date}", <#else> - <#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 /> + <#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 /> "PriorityDate": "${priority_date}", <#else> - <#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 /> + <#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 /> "PriorityDate": "${priority_date}", <#else> - <#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 /> + <#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 /> "PriorityDate": "${priority_date}", <#else> - <#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 /> + <#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 /> "PriorityDate": "${priority_date}", <#else> <#if (preparationOrder.stock_despatch_at_preparation_datetime?length != 0) && (preparationOrder.stock_despatch_at_preparation_datetime?starts_with("00")== false)> @@ -109,16 +109,16 @@ <#-- Segmentation Keys inclusion --> <#include "RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl"> }, - "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}", + "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}", <#else> - "LineID": "${preparation_line2.pro_line_number!0}", + "LineID": "${preparation_line.pro_line_number!0}", "ActorID": "${preparationOrder.physical_depot_code?trim?json_string}", "Quantity": { "LVID": "${quantity_in_base_lv_RP_Cst}", - "Value": ${despatched_ipg2.quantity_lvs} + "Value": ${despatched_ipg.quantity_lvs} } } From 82dfc05cdb4693cd26bc03d86150ca6c7db95635 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 24 Apr 2024 15:09:45 +0200 Subject: [PATCH 06/19] =?UTF-8?q?Cr=C3=A9ation=20de=20commande?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- RPtoRFX_PrepOrder.ftl | 114 ++++++++++++++---------- RPtoRFX_PrepOrder_DefaultHeaderData.ftl | 20 ++++- 2 files changed, 86 insertions(+), 48 deletions(-) diff --git a/RPtoRFX_PrepOrder.ftl b/RPtoRFX_PrepOrder.ftl index a887482..3d272fb 100644 --- a/RPtoRFX_PrepOrder.ftl +++ b/RPtoRFX_PrepOrder.ftl @@ -1,4 +1,18 @@ <#include "RPtoRFX_PrepOrder_DefaultHeaderData.ftl"> +<#-- Valeurs par défaut Adresse --> +<#-- Default values --> +<#assign typecode ="010"> +<#assign titlecode ="1"> +<#assign contacttypecode ="010"> +<#assign adresstypecode ="010"> +<#-- Si vous utilisez des acteurs non référencés, il faudra créer un destinataire "VIZ" dans Reflex WMS pour utiliser cette fonctionnalité --> +<#-- If you are using unreferenced actors, you will need to create a "VIZ" consignee in Reflex WMS to use this feature --> +<#assign defaultactor ="VIZ"> +<#if executionflow.ShipTo.ActorID?? && executionflow.ShipTo.ActorID!=""> + <#assign actorID = executionflow.ShipTo.ActorID > +<#else> + <#assign actorID = defaultactor > + { "id" : {"refid" : "${executionflow.OrderID}"}, @@ -9,15 +23,15 @@ "physical_depot_code": "${executionflow.ShipFrom.ActorID}", "originator_code": "${originator_code}" }, - "payload" : + "payload" : { "originator_reference": "${executionflow.OrderID}", "preparation_type_code": "${preparation_type_code}", - "end_consignee_code": "${executionflow.ShipTo.ActorID!""}", - <#if executionflow.RequestedMilestones?? && executionflow.RequestedMilestones.RequestedDeliveryDateTime??> - "requested_delivery_start_datetime": "${DateTimeUTCtoRfxLocale(executionflow.RequestedMilestones.RequestedDeliveryDateTime.DateTime,time_zone_rfx)}", + "end_consignee_code": "${actorID}", + <#if executionflow.RequestedMilestones?? && executionflow.RequestedMilestones.RequestedDeliveryDateTime??> + "requested_delivery_start_datetime": "${DateTimeUTCtoRfxLocale(executionflow.RequestedMilestones.RequestedDeliveryDateTime.DateTime,time_zone_rfx)}", <#else> - "requested_delivery_start_datetime": "${DateTimeUTCtoRfxLocale(.now?iso_utc?string,time_zone_rfx)}", + "requested_delivery_start_datetime": "${DateTimeUTCtoRfxLocale(.now?iso_utc?string,time_zone_rfx)}", "requested_delivery_date_type": "${requested_delivery_date_type}", "consolidated_delivery": "${consolidated_delivery_flag}", @@ -31,52 +45,62 @@ "apt_with_intermediate": "false", "load_grouping": "${load_grouping}" }, - <#if executionflow.ShipTo.ActorID == ""> - "address": { + <#if actorID == defaultactor > + "address": { + "type_code": "${typecode}", + "title_code" : "${titlecode}", + "contact_type_code" : "${contacttypecode}", + "address_type_code" : "${adresstypecode}", "first_name": "${executionflow.ShipTo.Contact.FirstName!""?json_string}", - "last_name" :"${executionflow.ShipTo.Contact.Lastname!""?json_string}", - "mail_address": "${executionflow.ShipTo.Actor.Emails[0]!""}", - "mobile_phone_number": "${executionflow.ShipTo.Actor.Phones[0]!""}", + "last_name" :"${executionflow.ShipTo.Contact.LastName!""?json_string}", + "name_or_company_name" : "${executionflow.ShipTo.Contact.FirstName!""?json_string} ${executionflow.ShipTo.Contact.LastName!""?json_string}", + <#if executionflow.ShipTo.Contact.Emails?? && executionflow.ShipTo.Contact.Emails[0]!=""> + "mail_address": "${executionflow.ShipTo.Contact.Emails[0]}", + + <#if executionflow.ShipTo.Contact.Phones?? && executionflow.ShipTo.Contact.Phones[0]!=""> + "mobile_phone_number": "${executionflow.ShipTo.Contact.Phones[0]}", + "street_and_number_and_po_box": "${executionflow.ShipTo.Actor.Address.StreetAddressOne!""?json_string}", "additional_address_data_1": "${executionflow.ShipTo.Actor.Address.StreetAddressTwo!""?json_string}", "additional_address_data_2": "${executionflow.ShipTo.Actor.Address.StreetAddressThree!""?json_string}", "postal_code": "${executionflow.ShipTo.Actor.Address.PostalCode!""}", + "post_code_area_name" : "${executionflow.ShipTo.Actor.Address.City!""}", "iso_country_code": "${executionflow.ShipTo.Actor.Address.CountryCode!""}" - }, + }, - <#if executionflow.Lines??> - "line_list": [ - <#list executionflow.Lines as line> - <#-- ******* line MetaData and Segmentationkeys to maps ******** --> - <#if line.MetaData??> - <#assign Line_MetaData_Map = JsonUtil.sequenceToMap(line.MetaData, "Key", "Value") /> - - <#if line.RequestedContent.Goods.SegmentationKeys??> - <#assign SegmentationKeys_Map = JsonUtil.sequenceToMap(line.RequestedContent.Goods.SegmentationKeys, "Key", "Value") /> - - <#include "RPtoRFX_PrepOrder_DefaultLineData.ftl"> - { - "originator_reference_line_number": ${line.LineID?number}, - "item_code": "${line.RequestedContent.Goods.ItemID!""}", - "item_lv_code": "${line.RequestedContent.Goods.LVBranchID!""}", - "base_lv_quantity_to_prepare": ${line.RequestedMetrics.QuantityInBaseLV.Value!0}, - "owner_code_to_prepare" :"${owner_code_to_prepare}", - "grade_code_to_prepare" :"${grade_code_to_prepare}", - "input_order_data": "false", - "batch_1": "${batch_1}", - "base_lv_quantity": "true", - "any_lv": "false" - <#-- - "stock_reservation": "false", - "forced_priority_date_min_lead_time": "false", - "temp_substitution_possible": "false", - "substitution_possible": "false" - --> - - }<#sep>, - - - ] + <#if executionflow.Lines??> + "line_list": [ + <#list executionflow.Lines as line> + <#-- ******* line MetaData and Segmentationkeys to maps ******** --> + <#if line.MetaData??> + <#assign Line_MetaData_Map = JsonUtil.sequenceToMap(line.MetaData, "Key", "Value") /> + + <#if line.RequestedContent.Goods.SegmentationKeys??> + <#assign SegmentationKeys_Map = JsonUtil.sequenceToMap(line.RequestedContent.Goods.SegmentationKeys, "Key", "Value") /> + + <#include "RPtoRFX_PrepOrder_DefaultLineData.ftl"> + { + "originator_reference_line_number": ${line.LineID?number}, + "item_code": "${line.RequestedContent.Goods.ItemID!""}", + "item_lv_code": "${line.RequestedContent.Goods.LVBranchID!""}", + "base_lv_quantity_to_prepare": ${line.RequestedMetrics.QuantityInBaseLV.Value!0}, + "owner_code_to_prepare" :"${owner_code_to_prepare}", + "grade_code_to_prepare" :"${grade_code_to_prepare}", + "input_order_data": "false", + "batch_1": "${batch_1}", + "base_lv_quantity": "true", + "any_lv": "false" + <#-- + "stock_reservation": "false", + "forced_priority_date_min_lead_time": "false", + "temp_substitution_possible": "false", + "substitution_possible": "false" + --> + + } + <#sep>, + + + ] } } - \ No newline at end of file diff --git a/RPtoRFX_PrepOrder_DefaultHeaderData.ftl b/RPtoRFX_PrepOrder_DefaultHeaderData.ftl index 7055d66..6d51468 100644 --- a/RPtoRFX_PrepOrder_DefaultHeaderData.ftl +++ b/RPtoRFX_PrepOrder_DefaultHeaderData.ftl @@ -1,7 +1,7 @@ <#-- Note : you can use Order Header Metadata, using the define map : Header_MetaData_Map --> <#-- How to use MD Header map - Example : + Example : <#assign pick_sequence_code = Header_MetaData_Map["OrderType"].String!""/> If your MD is : @@ -23,8 +23,22 @@ <#assign protected_flag ="false"/> <#assign automatic_generation_flag ="false"/> <#assign apt_with_end_consignee_flag="false"/> -<#assign load_grouping = "DEFAUT"/> - + +<#-- A supprimer si utilisation de la table de correspondance--> +<#--To be deleted if using the correspondence table--> +<#assign load_grouping = "default"> + + +<#-- Table de correspondance Transporteur/Code regroupement chargement, +affectation à un chargement si paramétrage regroupement chargement+plan de base distribution--> +<#--Carrier / Load Grouping Code Correspondence Table, +Assigning to a load if you set up Load Grouping+Distribution Master Plan--> +<#-- Example --> + <#--<#if executionflow.Carrier.ActorID == "TEST" > + <#assign load_grouping = "TEST"> + <#else> + <#assign load_grouping = "default"> + --> From b3da874dd390786e59025c040843f2f5c06cd772 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 13 May 2024 16:00:46 +0200 Subject: [PATCH 07/19] modifs HUGP --- RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl b/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl index 941f578..c6ad759 100644 --- a/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl +++ b/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl @@ -24,7 +24,7 @@ <#if despatched_ipg.carton_number != "000000000000000000"> "ContainerType": "${despatched_ipg.carton_type_code?json_string}" <#if preparation_line.despatched_cartons_list?? > - <#list preparation_line.despatched_cartons_list?filter(l ->l.carton_number==despatched_ipg.carton_number) as dimensionCarton> + <#list preparation_line.despatched_cartons_list?filter(l -> l?? && l.carton_number==despatched_ipg.carton_number) as dimensionCarton> , "Length": { "Unit": "${length_unit_rfx}", @@ -47,7 +47,7 @@ <#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> + <#list preparation_line.despatched_hds_list?filter(j -> j?? && j.handling_device_number==despatched_ipg.hd_number) as dimensionHU> , "Length": { "Unit": "${length_unit_rfx}", From c31d6de4a2bbfe1165d55803ab860a61e2cdbb38 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Thu, 16 May 2024 15:30:52 +0000 Subject: [PATCH 08/19] Merge branch 'SCPN1-6564' into 'release/1.2' SCPN1-6564 See merge request r-d-technique/tiers/reflex-wms-connector!38 (cherry picked from commit c0dd029d1ff89d69ea644f402f03177c16b78251) --- RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl | 9 +++++---- RFXtoRP_HsrPrepa_HandlingunitHUsAdded.ftl | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl b/RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl index 2d5d7e0..0433ade 100644 --- a/RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl +++ b/RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl @@ -2,8 +2,11 @@ <#include "ReflexUtils.ftl"> [ <#assign dispatched3_datetime = RfxDateTimetoUTC(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_offset_rfx) /> +<#assign generatedComa = false> <#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list??) as preparation_line3> <#list preparation_line3.despatched_ipg_list?filter(j ->j.carton_number!="000000000000000000") as despatched_ipg3> + + <#if generatedComa >, { "Header": { "ProjectID": "${projectRP}" @@ -16,10 +19,8 @@ } }, "Payload": { } - }<#sep>, + } + <#assign generatedComa = true> - <#if preparation_line3.despatched_ipg_list?filter(j ->j.carton_number!="000000000000000000")?size!=0 > - <#sep>, - ] diff --git a/RFXtoRP_HsrPrepa_HandlingunitHUsAdded.ftl b/RFXtoRP_HsrPrepa_HandlingunitHUsAdded.ftl index 968ed88..4102e1f 100644 --- a/RFXtoRP_HsrPrepa_HandlingunitHUsAdded.ftl +++ b/RFXtoRP_HsrPrepa_HandlingunitHUsAdded.ftl @@ -16,7 +16,7 @@ "Payload": { "IncludedHandlingunitIDs": [ "${despatched_ipg.carton_number}" ] - <#if preparation_line.despatched_hds_list?? > + <#if preparation_line.despatched_hds_list?? && preparation_line.despatched_hds_list[0]??> , "Information": { "ContainerType": "${preparation_line.despatched_hds_list[0].hd_type_code}", From 9cbacc0ebcb3098aa2c662650c2624e54a324c54 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 17 May 2024 11:00:25 +0200 Subject: [PATCH 09/19] priority date --- RFXtoRP_HsaIpgMove_GoodsReceived.ftl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/RFXtoRP_HsaIpgMove_GoodsReceived.ftl b/RFXtoRP_HsaIpgMove_GoodsReceived.ftl index 4a65641..c2de1cd 100644 --- a/RFXtoRP_HsaIpgMove_GoodsReceived.ftl +++ b/RFXtoRP_HsaIpgMove_GoodsReceived.ftl @@ -20,7 +20,11 @@ "Goods": { "ItemID": "${reflexMvtStockInterface.item_code?trim?json_string}", "LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}", - "PriorityDate": "${priority_date}", + <#if (priority_date!="") && (priority_date?starts_with("00")== false) > + "PriorityDate": "${priority_date}", + <#else> + "PriorityDate": "1970-01-01T00:00:00Z", + <#-- Goods received Segmentation Keys inclusion --> <#include "RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl"> From 06147dd8d4acc694f3acf0eadfa84de8fe023aff Mon Sep 17 00:00:00 2001 From: frea Date: Thu, 30 May 2024 17:18:16 +0200 Subject: [PATCH 10/19] SCPN1-6642 SCPN1-6641 --- RFXtoRP_HsrPrepa.ftl | 3 ++ RFXtoRP_HsrPrepa_CarrierUpdated.ftl | 45 +++++++++++-------- ...rPrepa_HUsAdded_HandlingUnitDispatched.ftl | 37 ++++++++------- RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl | 35 ++++++++------- RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl | 35 +++++++++------ ...P_HsrReceiptList_ExecutionflowDetected.ftl | 11 +++-- 6 files changed, 97 insertions(+), 69 deletions(-) diff --git a/RFXtoRP_HsrPrepa.ftl b/RFXtoRP_HsrPrepa.ftl index ddb67e3..ba650af 100644 --- a/RFXtoRP_HsrPrepa.ftl +++ b/RFXtoRP_HsrPrepa.ftl @@ -25,6 +25,7 @@ <#include "RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl"> }, { + <#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : @@ -47,6 +48,7 @@ } + <#assign refIDHmap ={}> <#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) /> @@ -76,6 +78,7 @@ + <#assign refIDHmap ={}> ] <#else> <#stop "no confirmed quantity for the preparation - preparation closed"> diff --git a/RFXtoRP_HsrPrepa_CarrierUpdated.ftl b/RFXtoRP_HsrPrepa_CarrierUpdated.ftl index b058352..ca87415 100644 --- a/RFXtoRP_HsrPrepa_CarrierUpdated.ftl +++ b/RFXtoRP_HsrPrepa_CarrierUpdated.ftl @@ -1,26 +1,33 @@ <#include "HfRpConfig.ftl"> <#include "ReflexUtils.ftl"> [ + <#assign refIDHmap_local ={}> <#list preparationOrder.preparation_line_lst?filter(l ->l.preparation_order_originator_reference!="") as preparation_line> <#assign OrderOriginReference = preparation_line.preparation_order_originator_reference?trim?json_string> - { - "Header": { - "ProjectID": "${projectRP}" - }, - "ID":{ - "RefID": "${OrderOriginReference}" - }, - "Payload":{ - "Carrier": { - "ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}" + <#if !refIDHmap_local[OrderOriginReference]?? > + <#if refIDHmap_local?size != 0 > + , + + <#assign refIDHmap_local +={OrderOriginReference,OrderOriginReference}> + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID":{ + "RefID": "${OrderOriginReference}" + }, + "Payload":{ + "Carrier": { + "ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}" + } + <#-- Add transport grade code + <#if preparationOrder.transport_grade_code!=""> + , + "CarrierService":"${preparationOrder.transport_grade_code?trim?json_string}" + --> } - <#-- Add transport grade code - <#if preparationOrder.transport_grade_code!=""> - , - "CarrierService":"${preparationOrder.transport_grade_code?trim?json_string}" - --> - } - } - <#sep>, - + } + + + <#assign refIDHmap_local ={}> ] \ No newline at end of file diff --git a/RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl b/RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl index 0433ade..1a780d5 100644 --- a/RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl +++ b/RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl @@ -2,25 +2,28 @@ <#include "ReflexUtils.ftl"> [ <#assign dispatched3_datetime = RfxDateTimetoUTC(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_offset_rfx) /> -<#assign generatedComa = false> + <#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list??) as preparation_line3> <#list preparation_line3.despatched_ipg_list?filter(j ->j.carton_number!="000000000000000000") as despatched_ipg3> - - <#if generatedComa >, - { - "Header": { - "ProjectID": "${projectRP}" - }, - "ID": { - "RefID": "${despatched_ipg3.carton_number}", - "RefDate": { - "DateTime": "${dispatched3_datetime}", - "AuthorTimeZone": "${time_zone_rfx}" - } - }, - "Payload": { } - } - <#assign generatedComa = true> + <#if !refIDHmap[despatched_ipg3.carton_number]?? > + <#if refIDHmap?size != 0 > + , + + <#assign refIDHmap += {despatched_ipg3.carton_number,despatched_ipg3.carton_number}> + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + "RefID": "${despatched_ipg3.carton_number}", + "RefDate": { + "DateTime": "${dispatched3_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + } + }, + "Payload": { } + } + ] diff --git a/RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl b/RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl index 22948cb..a1b31be 100644 --- a/RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl +++ b/RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl @@ -2,22 +2,27 @@ <#include "ReflexUtils.ftl"> [ <#assign dispatched_datetime = RfxDateTimetoUTC(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_offset_rfx) /> +<#assign refIDHmap_local ={}> <#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> - { - "Header": { - "ProjectID": "${projectRP}" - }, - "ID": { - "RefID": "${despatched_ipg.hd_number}", - "RefDate": { - "DateTime": "${dispatched_datetime}", - "AuthorTimeZone": "${time_zone_rfx}" - } - }, - "Payload": { } - }<#sep>, - - <#sep>, + <#if !refIDHmap_local[despatched_ipg.hd_number]?? > + <#if refIDHmap_local?size != 0 > + , + + <#assign refIDHmap_local +={despatched_ipg.hd_number,despatched_ipg.hd_number}> + { + "Header": {"ProjectID": "${projectRP}"}, + "ID": { + "RefID": "${despatched_ipg.hd_number}", + "RefDate": { + "DateTime": "${dispatched_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + } + }, + "Payload": { } + } + + + <#assign refIDHmap_local ={}> ] diff --git a/RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl b/RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl index 42b3f85..7a41e47 100644 --- a/RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl +++ b/RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl @@ -1,21 +1,28 @@ <#include "HfRpConfig.ftl"> <#include "ReflexUtils.ftl"> [ + <#assign refIDHmap_local ={}> <#list preparationOrder.preparation_line_lst?filter(l ->l.preparation_order_originator_reference!="") as preparation_line> <#assign OrderOriginReference = preparation_line.preparation_order_originator_reference?trim?json_string> - { - "Header": { - "ProjectID": "${projectRP}" - }, - "ID":{ - "RefID": "${OrderOriginReference}" - }, - "Payload":{ - "Carrier": { - "ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}" + <#if !refIDHmap_local[OrderOriginReference]?? > + <#if refIDHmap_local?size != 0 > + , + + <#assign refIDHmap_local +={OrderOriginReference,OrderOriginReference}> + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID":{ + "RefID": "${OrderOriginReference}" + }, + "Payload":{ + "Carrier": { + "ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}" + } } - } - } - <#sep>, - + } + + + <#assign refIDHmap_local ={}> ] \ No newline at end of file diff --git a/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl b/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl index 5919440..fe0cc5f 100644 --- a/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl +++ b/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl @@ -51,13 +51,16 @@ { "ItemID": "${line.item_code?trim?json_string!"0"}", "LVBranchID": "${line.item_lv_code?json_string!"0"}", - <#if line.line_without_detail??> - <#if (line.line_without_detail.priority_date?length != 0) && (line.line_without_detail.priority_date?starts_with("00") == false)> + <#if (line.line_without_detail?? && line.line_without_detail.priority_date?length != 0) && (line.line_without_detail.priority_date?starts_with("00") == false)> <#assign line_without_detail_priority_date = line.line_without_detail.priority_date?datetime(rfx_date_format_default)?iso_utc /> "PriorityDate": "${line_without_detail_priority_date}", - <#else> - <#stop > + <#if (line.line_detail?? && line.line_detail.priority_date?length != 0) && (line.line_detail.priority_date?starts_with("00") == false)> + <#assign line_detail_priority_date = line.line_detail.priority_date?datetime(rfx_date_format_default)?iso_utc /> + "PriorityDate": "${line_detail_priority_date}", + <#else> + "PriorityDate": "1970-01-01T00:00:00Z", + <#-- Segmentation Keys inclusion --> <#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl"> From 2524859cd42c5e6a8de76806a30054f86650d1b8 Mon Sep 17 00:00:00 2001 From: frea Date: Thu, 6 Jun 2024 09:15:09 +0200 Subject: [PATCH 11/19] SCPN1-6692 --- RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl b/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl index fe0cc5f..d941559 100644 --- a/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl +++ b/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl @@ -55,8 +55,8 @@ <#assign line_without_detail_priority_date = line.line_without_detail.priority_date?datetime(rfx_date_format_default)?iso_utc /> "PriorityDate": "${line_without_detail_priority_date}", <#else> - <#if (line.line_detail?? && line.line_detail.priority_date?length != 0) && (line.line_detail.priority_date?starts_with("00") == false)> - <#assign line_detail_priority_date = line.line_detail.priority_date?datetime(rfx_date_format_default)?iso_utc /> + <#if (line.line_detail?? && line.line_detail?size == 1 && line.line_detail[0].priority_date?length != 0) && (line.line_detail[0].priority_date?starts_with("00") == false)> + <#assign line_detail_priority_date = line.line_detail[0].priority_date?datetime(rfx_date_format_default)?iso_utc /> "PriorityDate": "${line_detail_priority_date}", <#else> "PriorityDate": "1970-01-01T00:00:00Z", From e8510d079c36cdcd395a3ea3d3d71a8cddae2b2a Mon Sep 17 00:00:00 2001 From: frea Date: Fri, 7 Jun 2024 11:15:47 +0200 Subject: [PATCH 12/19] SCPN1-6605 MovementCreated --- RFXtoRP_HsaIpgMove.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsaIpgMove.ftl b/RFXtoRP_HsaIpgMove.ftl index 4a98824..2e216fd 100644 --- a/RFXtoRP_HsaIpgMove.ftl +++ b/RFXtoRP_HsaIpgMove.ftl @@ -30,7 +30,7 @@ > [ { - <#assign apiReflexPlatformID = ApiReflexPlatformID.StockMoved> + <#assign apiReflexPlatformID = ApiReflexPlatformID.MovementCreated> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsaIpgMove_StockMoved.ftl"> From 044fda9d169e7856fb49af7760571ba187202e4b Mon Sep 17 00:00:00 2001 From: frea Date: Fri, 21 Jun 2024 13:28:44 +0200 Subject: [PATCH 13/19] =?UTF-8?q?correction=20dans=20le=20cas=20o=C3=B9=20?= =?UTF-8?q?la=20commande=20n'a=20pas=20de=20ligne...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- RPtoRFX_PrepOrder.ftl | 9 ++++++--- RPtoRFX_Receipt.ftl | 6 +++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/RPtoRFX_PrepOrder.ftl b/RPtoRFX_PrepOrder.ftl index 3d272fb..3616f05 100644 --- a/RPtoRFX_PrepOrder.ftl +++ b/RPtoRFX_PrepOrder.ftl @@ -44,8 +44,9 @@ "apt_with_end_consignee": "${apt_with_end_consignee_flag}", "apt_with_intermediate": "false", "load_grouping": "${load_grouping}" - }, + } <#if actorID == defaultactor > + , "address": { "type_code": "${typecode}", "title_code" : "${titlecode}", @@ -66,9 +67,10 @@ "postal_code": "${executionflow.ShipTo.Actor.Address.PostalCode!""}", "post_code_area_name" : "${executionflow.ShipTo.Actor.Address.City!""}", "iso_country_code": "${executionflow.ShipTo.Actor.Address.CountryCode!""}" - }, + } <#if executionflow.Lines??> + , "line_list": [ <#list executionflow.Lines as line> <#-- ******* line MetaData and Segmentationkeys to maps ******** --> @@ -100,7 +102,8 @@ } <#sep>, + ] - ] + } } diff --git a/RPtoRFX_Receipt.ftl b/RPtoRFX_Receipt.ftl index 5cf790e..2125ae5 100644 --- a/RPtoRFX_Receipt.ftl +++ b/RPtoRFX_Receipt.ftl @@ -25,9 +25,10 @@ "carrier_appointment_made": "false", "receipt_in_cross_docking": "false", - "dock_occupation_duration": 1, + "dock_occupation_duration": 1 <#if executionflow.Lines??> + , "line_list": [ <#list executionflow.Lines as line> @@ -61,7 +62,6 @@ }<#sep>, ] - - + } } From 74b976b367953acf82412170298b752a0cf4fc01 Mon Sep 17 00:00:00 2001 From: frea Date: Mon, 24 Jun 2024 16:20:09 +0200 Subject: [PATCH 14/19] adjust json_string --- RFXtoRP_HsaItmLv_LogisticVariantUpdated.ftl | 4 ++-- RFXtoRP_HsaItm_ItemCreated.ftl | 4 ++-- RFXtoRP_HsrPro_ExecutionflowDetected.ftl | 18 ++++++++--------- RPtoRFX_PrepOrder.ftl | 22 ++++++++++----------- RPtoRFX_Receipt.ftl | 4 ++-- 5 files changed, 26 insertions(+), 26 deletions(-) diff --git a/RFXtoRP_HsaItmLv_LogisticVariantUpdated.ftl b/RFXtoRP_HsaItmLv_LogisticVariantUpdated.ftl index 81560f3..c61e73b 100644 --- a/RFXtoRP_HsaItmLv_LogisticVariantUpdated.ftl +++ b/RFXtoRP_HsaItmLv_LogisticVariantUpdated.ftl @@ -16,8 +16,8 @@ "Codes": [ <#list lv.id_list as id> { - "Key": "${id.logistical_variant_ID_type_code?json_string!""}", - "Value": "${id.logistical_variant_ID_code?json_string!""}" + "Key": "${(id.logistical_variant_ID_type_code!"")?json_string}", + "Value": "${(id.logistical_variant_ID_code!"")?json_string}" }<#sep>, ], diff --git a/RFXtoRP_HsaItm_ItemCreated.ftl b/RFXtoRP_HsaItm_ItemCreated.ftl index 6ef16c0..a8ce5c9 100644 --- a/RFXtoRP_HsaItm_ItemCreated.ftl +++ b/RFXtoRP_HsaItm_ItemCreated.ftl @@ -39,8 +39,8 @@ "Codes": [ <#list logistical_variant.id_list as id> { - "Key": "${id.logistical_variant_ID_type_code?json_string!""}", - "Value": "${id.logistical_variant_ID_code?json_string!""}" + "Key": "${(id.logistical_variant_ID_type_code!"")?json_string}", + "Value": "${(id.logistical_variant_ID_code!"")?json_string}" }<#sep>, ], diff --git a/RFXtoRP_HsrPro_ExecutionflowDetected.ftl b/RFXtoRP_HsrPro_ExecutionflowDetected.ftl index d1f4107..1de6b02 100644 --- a/RFXtoRP_HsrPro_ExecutionflowDetected.ftl +++ b/RFXtoRP_HsrPro_ExecutionflowDetected.ftl @@ -52,23 +52,23 @@ <#else> "Actor": { - "Name" : "${preparation_order.address.name_or_company_name?json_string!""}", + "Name" : "${(preparation_order.address.name_or_company_name!"")?json_string}", "Address" : { - "City" : "${preparation_order.address.post_code_area_name?json_string!""}", + "City" : "${(preparation_order.address.post_code_area_name!"")?json_string}", "CountryCode" : "${preparation_order.address.iso_country_code!""}", "PostalCode" : "${preparation_order.address.postal_code!""}", - "StreetAddressOne" : "${preparation_order.address.street_and_number_and_po_box?json_string!""}", - "StreetAddressTwo" : "${preparation_order.address.additional_address_data_1?json_string!""}", - "StreetAddressThree" : "${preparation_order.address.additional_address_data_2?json_string!""}" + "StreetAddressOne" : "${(preparation_order.address.street_and_number_and_po_box!"")?json_string}", + "StreetAddressTwo" : "${(preparation_order.address.additional_address_data_1!"")?json_string}", + "StreetAddressThree" : "${(preparation_order.address.additional_address_data_2!"")?json_string}" } }, "Contact" : { - "FirstName" : "${preparation_order.address.first_name?json_string!""}", - "LastName" : "${preparation_order.address.last_name?json_string!""}", - "Emails" : ${splitEmailsIntoArray(preparation_order.address.mail_address!""?json_string)}, - "Phones" : ["${preparation_order.address.mobile_phone_number?json_string!""}","${preparation_order.address.land_line_phone_number?json_string!""}", "${preparation_order.address.fax_number?json_string!""}" ] + "FirstName" : "${(preparation_order.address.first_name!"")?json_string}", + "LastName" : "${(preparation_order.address.last_name!"")?json_string}", + "Emails" : ${splitEmailsIntoArray((preparation_order.address.mail_address!"")?json_string)}, + "Phones" : ["${(preparation_order.address.mobile_phone_number!"")?json_string}","${(preparation_order.address.land_line_phone_number!"")?json_string}", "${(preparation_order.address.fax_number!"")?json_string}" ] } }, diff --git a/RPtoRFX_PrepOrder.ftl b/RPtoRFX_PrepOrder.ftl index 3616f05..a33d6d5 100644 --- a/RPtoRFX_PrepOrder.ftl +++ b/RPtoRFX_PrepOrder.ftl @@ -15,7 +15,7 @@ { - "id" : {"refid" : "${executionflow.OrderID}"}, + "id" : {"refid" : "${executionflow.OrderID?json_string}"}, "route" : "rest/public/v1/activities/{activity_code}/physical_depots/{physical_depot_code}/originators/{originator_code}/preparation_orders", "method" : "POST", "uri_substitutions": { @@ -25,7 +25,7 @@ }, "payload" : { - "originator_reference": "${executionflow.OrderID}", + "originator_reference": "${executionflow.OrderID?json_string}", "preparation_type_code": "${preparation_type_code}", "end_consignee_code": "${actorID}", <#if executionflow.RequestedMilestones?? && executionflow.RequestedMilestones.RequestedDeliveryDateTime??> @@ -52,21 +52,21 @@ "title_code" : "${titlecode}", "contact_type_code" : "${contacttypecode}", "address_type_code" : "${adresstypecode}", - "first_name": "${executionflow.ShipTo.Contact.FirstName!""?json_string}", - "last_name" :"${executionflow.ShipTo.Contact.LastName!""?json_string}", - "name_or_company_name" : "${executionflow.ShipTo.Contact.FirstName!""?json_string} ${executionflow.ShipTo.Contact.LastName!""?json_string}", + "first_name": "${(executionflow.ShipTo.Contact.FirstName!"")?json_string}", + "last_name" :"${(executionflow.ShipTo.Contact.LastName!"")?json_string}", + "name_or_company_name" : "${(executionflow.ShipTo.Contact.FirstName!"")?json_string} ${(executionflow.ShipTo.Contact.LastName!"")?json_string}", <#if executionflow.ShipTo.Contact.Emails?? && executionflow.ShipTo.Contact.Emails[0]!=""> "mail_address": "${executionflow.ShipTo.Contact.Emails[0]}", <#if executionflow.ShipTo.Contact.Phones?? && executionflow.ShipTo.Contact.Phones[0]!=""> "mobile_phone_number": "${executionflow.ShipTo.Contact.Phones[0]}", - "street_and_number_and_po_box": "${executionflow.ShipTo.Actor.Address.StreetAddressOne!""?json_string}", - "additional_address_data_1": "${executionflow.ShipTo.Actor.Address.StreetAddressTwo!""?json_string}", - "additional_address_data_2": "${executionflow.ShipTo.Actor.Address.StreetAddressThree!""?json_string}", - "postal_code": "${executionflow.ShipTo.Actor.Address.PostalCode!""}", - "post_code_area_name" : "${executionflow.ShipTo.Actor.Address.City!""}", - "iso_country_code": "${executionflow.ShipTo.Actor.Address.CountryCode!""}" + "street_and_number_and_po_box": "${(executionflow.ShipTo.Actor.Address.StreetAddressOne!"")?json_string}", + "additional_address_data_1": "${(executionflow.ShipTo.Actor.Address.StreetAddressTwo!"")?json_string}", + "additional_address_data_2": "${(executionflow.ShipTo.Actor.Address.StreetAddressThree!"")?json_string}", + "postal_code": "${(executionflow.ShipTo.Actor.Address.PostalCode!"")?json_string}", + "post_code_area_name" : "${(executionflow.ShipTo.Actor.Address.City!"")?json_string}", + "iso_country_code": "${(executionflow.ShipTo.Actor.Address.CountryCode!"")?json_string}" } <#if executionflow.Lines??> diff --git a/RPtoRFX_Receipt.ftl b/RPtoRFX_Receipt.ftl index 2125ae5..80eafaa 100644 --- a/RPtoRFX_Receipt.ftl +++ b/RPtoRFX_Receipt.ftl @@ -1,7 +1,7 @@ <#include "RPtoRFX_Receipt_DefaultHeaderData.ftl"> { - "id" : {"refid" : "${executionflow.OrderID}"}, + "id" : {"refid" : "${executionflow.OrderID?json_string}"}, "route" : "rest/public/v1/activities/{activity_code}/physical_depots/{physical_depot_code}/originators/{originator_code}/receipts", "method" : "POST", "uri_substitutions": { @@ -11,7 +11,7 @@ }, "payload" : { - "receipt_reference": "${executionflow.OrderID}", + "receipt_reference": "${executionflow.OrderID?json_string}", "receipt_type": "${receipt_type}", "receipt_reason_code": "${receipt_reason_code}", "work_mode_code" : "${work_mode_code}", From af29a11b220facebebc3e39e5eb49ed84cf732b6 Mon Sep 17 00:00:00 2001 From: frea Date: Tue, 25 Jun 2024 17:29:36 +0200 Subject: [PATCH 15/19] adjust json_string --- RFXtoRP_PrepOrder_ShipFromAcked.ftl | 2 +- RFXtoRP_Receipt_ShipToAcked.ftl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/RFXtoRP_PrepOrder_ShipFromAcked.ftl b/RFXtoRP_PrepOrder_ShipFromAcked.ftl index 6a4ab2c..cf47d44 100644 --- a/RFXtoRP_PrepOrder_ShipFromAcked.ftl +++ b/RFXtoRP_PrepOrder_ShipFromAcked.ftl @@ -4,7 +4,7 @@ "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${id.refid}" + "RefID": "${id.refid?json_string}" }, "Payload": { diff --git a/RFXtoRP_Receipt_ShipToAcked.ftl b/RFXtoRP_Receipt_ShipToAcked.ftl index ae00aae..a094aeb 100644 --- a/RFXtoRP_Receipt_ShipToAcked.ftl +++ b/RFXtoRP_Receipt_ShipToAcked.ftl @@ -4,7 +4,7 @@ "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${id.refid}" + "RefID": "${id.refid?json_string}" }, "Payload": { From 45e8c4fee2ecda7c18df3a0ab0e204ed4b8c566a Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 5 Jul 2024 10:40:55 +0200 Subject: [PATCH 16/19] ajout MD HuAdded --- RFXtoRP_HsrPrepa_HUsAdded_Metadata.ftl | 9 +++++++++ RFXtoRP_HsrPrepa_HandlingunitHUsAdded.ftl | 5 ++++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 RFXtoRP_HsrPrepa_HUsAdded_Metadata.ftl diff --git a/RFXtoRP_HsrPrepa_HUsAdded_Metadata.ftl b/RFXtoRP_HsrPrepa_HUsAdded_Metadata.ftl new file mode 100644 index 0000000..22d1c4d --- /dev/null +++ b/RFXtoRP_HsrPrepa_HUsAdded_Metadata.ftl @@ -0,0 +1,9 @@ +<#-- use protobuf of class HsrPrepa to find Reflex WMS fields names --> + +<#-- +"MetaData" :[ + + ] + +--> +"MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsrPrepa_HandlingunitHUsAdded.ftl b/RFXtoRP_HsrPrepa_HandlingunitHUsAdded.ftl index 4102e1f..126118d 100644 --- a/RFXtoRP_HsrPrepa_HandlingunitHUsAdded.ftl +++ b/RFXtoRP_HsrPrepa_HandlingunitHUsAdded.ftl @@ -33,7 +33,10 @@ "Value": ${preparation_line.despatched_hds_list[0].hd_type_width} } } - + , + <#-- HU Metadata inclusin inclusion --> + <#include "RFXtoRP_HsrPrepa_HUsAdded_Metadata.ftl"> + } } From c3d1ceb0c5f8863b00241efb4d09b9c89fffe5e0 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 12 Jul 2024 11:17:30 +0200 Subject: [PATCH 17/19] ODP --- RFXtoRP_HsrPro.ftl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/RFXtoRP_HsrPro.ftl b/RFXtoRP_HsrPro.ftl index 3258db3..998fa70 100644 --- a/RFXtoRP_HsrPro.ftl +++ b/RFXtoRP_HsrPro.ftl @@ -21,16 +21,16 @@ <#-- check preparation type code (internal order and reservation are ignored) --> <#if preparation_order.preparation_type_code == "010" || preparation_order.preparation_type_code == "030"> <#-- Only if preparation order not confirmed --> - <#if preparation_order.preparation_order_confirmed == "false" > + <#-- <#if preparation_order.preparation_order_confirmed == "false" > --> { <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl"> } - <#else> + <#-- <#else> <#stop "preparation order already confirmed"> - + --> <#else> <#stop "preparation order type not supported"> From 5c0b112c39b6c42bfe6ae0f83f1ff0c1004ad994 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 17 Jul 2024 11:07:36 +0200 Subject: [PATCH 18/19] Modifs 170724 --- RFXtoRP_HsaIpgMove.ftl | 2 ++ RFXtoRP_HsaIpgMove_StockMoved.ftl | 2 ++ RFXtoRP_HsrPrepa_HUsAdded_Metadata.ftl | 2 +- RFXtoRP_RestResponse.ftl | 43 ++++++++++++++++---------- 4 files changed, 32 insertions(+), 17 deletions(-) diff --git a/RFXtoRP_HsaIpgMove.ftl b/RFXtoRP_HsaIpgMove.ftl index 2e216fd..18a4a46 100644 --- a/RFXtoRP_HsaIpgMove.ftl +++ b/RFXtoRP_HsaIpgMove.ftl @@ -24,6 +24,8 @@ reflexMvtStockInterface.ipg_move_type == "260" || reflexMvtStockInterface.ipg_move_type == "290" || reflexMvtStockInterface.ipg_move_type == "300" || + reflexMvtStockInterface.ipg_move_type == "350" || + reflexMvtStockInterface.ipg_move_type == "370" || reflexMvtStockInterface.ipg_move_type == "400" || reflexMvtStockInterface.ipg_move_type == "410" || reflexMvtStockInterface.ipg_move_type == "420" diff --git a/RFXtoRP_HsaIpgMove_StockMoved.ftl b/RFXtoRP_HsaIpgMove_StockMoved.ftl index 4fc6aaf..c09d3ae 100644 --- a/RFXtoRP_HsaIpgMove_StockMoved.ftl +++ b/RFXtoRP_HsaIpgMove_StockMoved.ftl @@ -10,6 +10,8 @@ "260":"STOCK_MOVEMENT_TYPE_REQUALIFICATION", "290":"STOCK_MOVEMENT_TYPE_REQUALIFICATION", "300":"STOCK_MOVEMENT_TYPE_REQUALIFICATION", + "350":"STOCK_MOVEMENT_TYPE_USE_OF_GOODS", + "370":"STOCK_MOVEMENT_TYPE_USE_OF_GOODS", "400":"STOCK_MOVEMENT_TYPE_FIX", "410":"STOCK_MOVEMENT_TYPE_FIX", "420":"STOCK_MOVEMENT_TYPE_REQUALIFICATION"}> diff --git a/RFXtoRP_HsrPrepa_HUsAdded_Metadata.ftl b/RFXtoRP_HsrPrepa_HUsAdded_Metadata.ftl index 22d1c4d..5b233b9 100644 --- a/RFXtoRP_HsrPrepa_HUsAdded_Metadata.ftl +++ b/RFXtoRP_HsrPrepa_HUsAdded_Metadata.ftl @@ -2,7 +2,7 @@ <#-- "MetaData" :[ - + ] --> diff --git a/RFXtoRP_RestResponse.ftl b/RFXtoRP_RestResponse.ftl index 01a3c9b..69983ef 100644 --- a/RFXtoRP_RestResponse.ftl +++ b/RFXtoRP_RestResponse.ftl @@ -28,22 +28,33 @@ <#include "RFXtoRP_PrepOrder_ShipFromAcked.ftl"> } ] - <#else> - [ - { - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_PlatformLogCreate.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_RestResponseAllocationError.ftl"> - } - ] + <#else> + <#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "WARN"> + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipFromAcked> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_PrepOrder_ShipFromAcked.ftl"> + } + ] + <#else> + [ + { + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAllocationError.ftl"> + } + ] + <#break> <#default> From fea5691dddc39c0794246c9eadcd2ad85cbb6c59 Mon Sep 17 00:00:00 2001 From: freat Date: Mon, 22 Jul 2024 10:18:15 +0200 Subject: [PATCH 19/19] Release 1.2.19+1 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index d2007ef..2d99881 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.2.18+1 +1.2.19+1