From 86afce4b0dff37520deea849a7282f4c556a5630 Mon Sep 17 00:00:00 2001 From: Vincent LEMAITRE Date: Tue, 12 Mar 2024 08:29:59 +0000 Subject: [PATCH 01/11] reverted VERSION --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 8f069ae..9d7c109 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.4.0-SNAPSHOT +1.3.0-SNAPSHOT From c7d7aaec1605536c301e3fd7b87dd8ada97d8a98 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 12 Mar 2024 17:09:22 +0100 Subject: [PATCH 02/11] Modifs pro cancelled --- RFXtoRP_HsrPro.ftl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/RFXtoRP_HsrPro.ftl b/RFXtoRP_HsrPro.ftl index caa5990..cfa3721 100644 --- a/RFXtoRP_HsrPro.ftl +++ b/RFXtoRP_HsrPro.ftl @@ -46,12 +46,18 @@ <#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 8575ad0de26e53e3d705efaf3de90b85a04bf723 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 12 Mar 2024 17:47:35 +0100 Subject: [PATCH 03/11] Modifs --- RFXtoRP_HsaProStatus.ftl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RFXtoRP_HsaProStatus.ftl b/RFXtoRP_HsaProStatus.ftl index a1c4709..044f6db 100644 --- a/RFXtoRP_HsaProStatus.ftl +++ b/RFXtoRP_HsaProStatus.ftl @@ -17,6 +17,7 @@ <#assign preparationStatusInterface = JsonUtil.jsonToMap(dataRfx) /> [ <#--**Pick batch runned (200) **--> + <#if preparationStatusInterface.preparation_order_originator_reference?? && preparationStatusInterface.preparation_order_originator_reference!=""> <#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "200" > { <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationExpected> @@ -63,6 +64,9 @@ + <#else> + <#stop "PRO reference is empty"> + ] <#break> From c6370e2eb78f00c27f3f097e718758e45f84ebac Mon Sep 17 00:00:00 2001 From: frea Date: Wed, 13 Mar 2024 18:07:47 +0100 Subject: [PATCH 04/11] SCPN1-6203 --- RPtoRFX_ExecutionflowEvent.ftl | 2 ++ RPtoRFX_PrepOrder.ftl | 7 ++----- RPtoRFX_Receipt.ftl | 6 +++--- ReflexUtils.ftl | 4 ++++ 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/RPtoRFX_ExecutionflowEvent.ftl b/RPtoRFX_ExecutionflowEvent.ftl index 30f9c0e..95d8132 100644 --- a/RPtoRFX_ExecutionflowEvent.ftl +++ b/RPtoRFX_ExecutionflowEvent.ftl @@ -2,6 +2,8 @@ <#-- input : message RFX --> <#-- project : projectId in ReflexPlatform --> <#-- organisation : organisationtId in ReflexPlatform --> +<#include "HfRpConfig.ftl"> +<#include "ReflexUtils.ftl"> <#assign eventRP = JsonUtil.jsonToMap(input)> <#assign projectRP = project> diff --git a/RPtoRFX_PrepOrder.ftl b/RPtoRFX_PrepOrder.ftl index 17cc8d6..a887482 100644 --- a/RPtoRFX_PrepOrder.ftl +++ b/RPtoRFX_PrepOrder.ftl @@ -1,8 +1,5 @@ <#include "RPtoRFX_PrepOrder_DefaultHeaderData.ftl"> -<#assign aDateTime = .now> - - { "id" : {"refid" : "${executionflow.OrderID}"}, "route" : "rest/public/v1/activities/{activity_code}/physical_depots/{physical_depot_code}/originators/{originator_code}/preparation_orders", @@ -18,9 +15,9 @@ "preparation_type_code": "${preparation_type_code}", "end_consignee_code": "${executionflow.ShipTo.ActorID!""}", <#if executionflow.RequestedMilestones?? && executionflow.RequestedMilestones.RequestedDeliveryDateTime??> - "requested_delivery_start_datetime": "${executionflow.RequestedMilestones.RequestedDeliveryDateTime.DateTime}", + "requested_delivery_start_datetime": "${DateTimeUTCtoRfxLocale(executionflow.RequestedMilestones.RequestedDeliveryDateTime.DateTime,time_zone_rfx)}", <#else> - "requested_delivery_start_datetime": "${aDateTime?iso_utc}", + "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}", diff --git a/RPtoRFX_Receipt.ftl b/RPtoRFX_Receipt.ftl index e9fa3b3..5cf790e 100644 --- a/RPtoRFX_Receipt.ftl +++ b/RPtoRFX_Receipt.ftl @@ -1,5 +1,5 @@ <#include "RPtoRFX_Receipt_DefaultHeaderData.ftl"> -<#assign aDateTime = .now> + { "id" : {"refid" : "${executionflow.OrderID}"}, "route" : "rest/public/v1/activities/{activity_code}/physical_depots/{physical_depot_code}/originators/{originator_code}/receipts", @@ -19,9 +19,9 @@ "carrier_code" : "${executionflow.Carrier.ActorID!""}", <#if executionflow.RequestedMilestones?? && executionflow.RequestedMilestones.RequestedDeliveryDateTime??> - "receipt_datetime": "${executionflow.RequestedMilestones.RequestedDeliveryDateTime.DateTime}", + "receipt_datetime": "${DateTimeUTCtoRfxLocale(executionflow.RequestedMilestones.RequestedDeliveryDateTime.DateTime,time_zone_rfx)}", <#else> - "receipt_datetime": "${aDateTime?iso_utc}", + "receipt_datetime": "${DateTimeUTCtoRfxLocale(.now?iso_utc?string,time_zone_rfx)}", "carrier_appointment_made": "false", "receipt_in_cross_docking": "false", diff --git a/ReflexUtils.ftl b/ReflexUtils.ftl index d033bfb..b7071f6 100644 --- a/ReflexUtils.ftl +++ b/ReflexUtils.ftl @@ -5,6 +5,10 @@ <#return ((rfxdatetime + offset)?datetime.iso?iso_utc)> +<#function DateTimeUTCtoRfxLocale dateutc locale > + <#return dateutc?datetime.iso?iso_nz(locale)> + + <#-- --------------------------------------------------------------------------------------- --> <#-- Split email reflex into json array string --> <#-- Example : splitemail "john.doe@hardis-group.com,; name@hardis-group.com" --> From 4802c74fb81e99df0b9a77529b346e831274b3ac Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 14 Mar 2024 11:51:49 +0100 Subject: [PATCH 05/11] modifs ref vide --- RFXtoRP_HsaProStatus.ftl | 68 ++++++++++----------- RFXtoRP_HsrPrepa.ftl | 127 +++++++++++++++++++-------------------- 2 files changed, 97 insertions(+), 98 deletions(-) diff --git a/RFXtoRP_HsaProStatus.ftl b/RFXtoRP_HsaProStatus.ftl index 044f6db..99a4993 100644 --- a/RFXtoRP_HsaProStatus.ftl +++ b/RFXtoRP_HsaProStatus.ftl @@ -18,55 +18,55 @@ [ <#--**Pick batch runned (200) **--> <#if preparationStatusInterface.preparation_order_originator_reference?? && preparationStatusInterface.preparation_order_originator_reference!=""> - <#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "200" > - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationExpected> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsaProStatus_PreparationExpected.ftl"> - } - <#else> - <#-- ** Collection started (300) and Preparation in progress (400)** --> - <#if preparationStatusInterface.preparation_status_type == "100" && (preparationStatusInterface.preparation_status_code == "300" || preparationStatusInterface.preparation_status_code == "400") > + <#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "200" > { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationStarted> + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationExpected> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : - <#include "RFXtoRP_HsaProStatus_PreparationStarted.ftl"> + <#include "RFXtoRP_HsaProStatus_PreparationExpected.ftl"> } <#else> - <#-- ****Preparation dispatched (600)** --> - <#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "600" > - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationCompleted> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsaProStatus_PreparationCompleted.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowTransportStarted> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsaProStatus_TransportStarted.ftl"> - } + <#-- ** Collection started (300) and Preparation in progress (400)** --> + <#if preparationStatusInterface.preparation_status_type == "100" && (preparationStatusInterface.preparation_status_code == "300" || preparationStatusInterface.preparation_status_code == "400") > + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationStarted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsaProStatus_PreparationStarted.ftl"> + } <#else> - <#-- ****Preparation cancelled (650)**** --> - <#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "650" > + <#-- ****Preparation dispatched (600)** --> + <#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "600" > { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled> + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationCompleted> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : - <#include "RFXtoRP_HsaProStatus_ExecutionflowCancelled.ftl"> + <#include "RFXtoRP_HsaProStatus_PreparationCompleted.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowTransportStarted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsaProStatus_TransportStarted.ftl"> } <#else> - <#stop> + <#-- ****Preparation cancelled (650)**** --> + <#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "650" > + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsaProStatus_ExecutionflowCancelled.ftl"> + } + <#else> + <#stop> + + <#else> + <#stop "PRO reference is empty"> - <#else> - <#stop "PRO reference is empty"> - ] <#break> diff --git a/RFXtoRP_HsrPrepa.ftl b/RFXtoRP_HsrPrepa.ftl index 712cfec..bcd6a62 100644 --- a/RFXtoRP_HsrPrepa.ftl +++ b/RFXtoRP_HsrPrepa.ftl @@ -15,74 +15,73 @@ <#-- *********************************************** Action = CREATE or UPDATE ******************** --> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign preparationOrder = JsonUtil.jsonToMap(dataRfx)> +<#if preparation_line.preparation_order_originator_reference?? && preparation_line.preparation_order_originator_reference??!=""> + <#if preparationOrder.total_lv_validated !=0> + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsPrepared> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl"> + } -<#if preparationOrder.total_lv_validated !=0> - [ - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsPrepared> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl"> - } - - <#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" > - , - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCarrierUpdated> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrPrepa_CarrierUpdated.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.OrderCarrierUpdated> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrPrepa_OrderCarrierUpdated.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"> - } - - <#if despatched_ipg.carton_number != "000000000000000000" && despatched_ipg.carton_number!=despatched_ipg.hd_number > - , - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitHUsAdded> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrPrepa_HandlingunitHUsAdded.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl"> - } - + <#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" > + , + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCarrierUpdated> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrPrepa_CarrierUpdated.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.OrderCarrierUpdated> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrPrepa_OrderCarrierUpdated.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"> + } + + <#if despatched_ipg.carton_number != "000000000000000000" && despatched_ipg.carton_number!=despatched_ipg.hd_number > + , + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitHUsAdded> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrPrepa_HandlingunitHUsAdded.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl"> + } + + + <#-- <#sep>, --> - <#-- <#sep>, --> - - - - ] - + ] + <#else> + <#stop "no confirmed quantity for the preparation - preparation closed"> + <#else> - <#stop "no confirmed quantity for the preparation - preparation closed"> + <#stop "PRO reference is empty"> <#break> From 349642fe256928e794ccdb3ebde4852d321c5a46 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 14 Mar 2024 11:58:35 +0100 Subject: [PATCH 06/11] modifs --- RFXtoRP_HsrPrepa.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsrPrepa.ftl b/RFXtoRP_HsrPrepa.ftl index bcd6a62..6ce5b27 100644 --- a/RFXtoRP_HsrPrepa.ftl +++ b/RFXtoRP_HsrPrepa.ftl @@ -15,7 +15,7 @@ <#-- *********************************************** Action = CREATE or UPDATE ******************** --> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign preparationOrder = JsonUtil.jsonToMap(dataRfx)> -<#if preparation_line.preparation_order_originator_reference?? && preparation_line.preparation_order_originator_reference??!=""> +<#if preparationOrder.preparation_line_lst[0].preparation_order_originator_reference?? && preparationOrder.preparation_line_lst[0].preparation_order_originator_reference??!=""> <#if preparationOrder.total_lv_validated !=0> [ { From 53afac0ccf79ab36849e6b6c41c9a9cf6329ec8a Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 14 Mar 2024 12:01:40 +0100 Subject: [PATCH 07/11] modifs --- RFXtoRP_HsrPrepa.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsrPrepa.ftl b/RFXtoRP_HsrPrepa.ftl index 6ce5b27..eccfac8 100644 --- a/RFXtoRP_HsrPrepa.ftl +++ b/RFXtoRP_HsrPrepa.ftl @@ -15,7 +15,7 @@ <#-- *********************************************** Action = CREATE or UPDATE ******************** --> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign preparationOrder = JsonUtil.jsonToMap(dataRfx)> -<#if preparationOrder.preparation_line_lst[0].preparation_order_originator_reference?? && preparationOrder.preparation_line_lst[0].preparation_order_originator_reference??!=""> +<#if preparationOrder.preparation_line_lst[0].preparation_order_originator_reference?? && preparationOrder.preparation_line_lst[0].preparation_order_originator_reference!=""> <#if preparationOrder.total_lv_validated !=0> [ { From 0211b910691a1e6e610eef275dfc4db7652e3a7f Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 15 Mar 2024 09:38:15 +0100 Subject: [PATCH 08/11] modifs --- RFXtoRP_HsaIpgMove.ftl | 66 ++++++++++++++++++------------------ RFXtoRP_HsrReceiptList.ftl | 68 +++++++++++++++++++++----------------- 2 files changed, 71 insertions(+), 63 deletions(-) diff --git a/RFXtoRP_HsaIpgMove.ftl b/RFXtoRP_HsaIpgMove.ftl index be73034..00fdfd5 100644 --- a/RFXtoRP_HsaIpgMove.ftl +++ b/RFXtoRP_HsaIpgMove.ftl @@ -12,50 +12,52 @@ <#assign reflexMvtStockInterface = JsonUtil.jsonToMap(dataRfx)> <#-- 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 --> - <#if reflexMvtStockInterface.ipg_move_type == "130" || - reflexMvtStockInterface.ipg_move_type == "200" || - reflexMvtStockInterface.ipg_move_type == "210" || - reflexMvtStockInterface.ipg_move_type == "220" || - reflexMvtStockInterface.ipg_move_type == "230" || - reflexMvtStockInterface.ipg_move_type == "240" || - reflexMvtStockInterface.ipg_move_type == "260" || - reflexMvtStockInterface.ipg_move_type == "290" || - reflexMvtStockInterface.ipg_move_type == "300" || - reflexMvtStockInterface.ipg_move_type == "400" || - reflexMvtStockInterface.ipg_move_type == "410" || - reflexMvtStockInterface.ipg_move_type == "420" - > - [ - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.StockMoved> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsaIpgMove_StockMoved.ftl"> - - } - ] - <#else> - <#-- 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" + <#if reflexMvtStockInterface.ipg_move_type == "130" || + reflexMvtStockInterface.ipg_move_type == "200" || + reflexMvtStockInterface.ipg_move_type == "210" || + reflexMvtStockInterface.ipg_move_type == "220" || + reflexMvtStockInterface.ipg_move_type == "230" || + reflexMvtStockInterface.ipg_move_type == "240" || + reflexMvtStockInterface.ipg_move_type == "260" || + reflexMvtStockInterface.ipg_move_type == "290" || + reflexMvtStockInterface.ipg_move_type == "300" || + reflexMvtStockInterface.ipg_move_type == "400" || + reflexMvtStockInterface.ipg_move_type == "410" || + reflexMvtStockInterface.ipg_move_type == "420" > [ { - <#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsReceived> + <#assign apiReflexPlatformID = ApiReflexPlatformID.StockMoved> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : - <#include "RFXtoRP_HsaIpgMove_GoodsReceived.ftl"> + <#include "RFXtoRP_HsaIpgMove_StockMoved.ftl"> } ] + <#else> + <#-- IPG moves translated into goods received (all type of receipt) --> + <#if reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!=""> + <#if reflexMvtStockInterface.ipg_move_type == "100" || + reflexMvtStockInterface.ipg_move_type == "110" || + reflexMvtStockInterface.ipg_move_type == "120"> + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsReceived> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsaIpgMove_GoodsReceived.ftl"> + } + ] + <#else> + <#-- Case of IPG move type volontarilly ignored--> + <#stop> + <#else> - <#-- Case of IPG move type volontarilly ignored--> - <#stop> + <#stop Receipt reference is empty> - <#else> <#-- cases of an IPG move with quantity = 0 (weight modification)--> <#stop> diff --git a/RFXtoRP_HsrReceiptList.ftl b/RFXtoRP_HsrReceiptList.ftl index abcab30..d25cd93 100644 --- a/RFXtoRP_HsrReceiptList.ftl +++ b/RFXtoRP_HsrReceiptList.ftl @@ -45,31 +45,34 @@ <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign receipt = JsonUtil.jsonToMap(dataRfx)> [ - <#if receipt.receipt_confirmed == "true" > - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl"> - } - <#else> - <#if receipt.receipt_type = "030"> - <#stop "ignored message because receipt type = transfert"> + <#if receipt.receipt_reference?? && receipt.receipt_reference!=""> + <#if receipt.receipt_confirmed == "true" > + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl"> + } <#else> - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl"> - - } - + <#if receipt.receipt_type = "030"> + <#stop "ignored message because receipt type = transfert"> + <#else> + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl"> + } + + + <#else> + <#stop "Receipt reference is empty"> ] <#break> @@ -79,14 +82,17 @@ <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign receipt = JsonUtil.jsonToMap(dataRfx)> [ - { + <#if receipt.receipt_reference?? && receipt.receipt_reference!=""> + { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl"> - - } + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl"> + } + <#else> + <#stop "Receipt reference is empty"> + ] <#break> From c03129855ea974b326e97188d86e13f80183b310 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 15 Mar 2024 09:45:24 +0100 Subject: [PATCH 09/11] modifs --- RFXtoRP_HsaIpgMove.ftl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RFXtoRP_HsaIpgMove.ftl b/RFXtoRP_HsaIpgMove.ftl index 00fdfd5..e1ff9be 100644 --- a/RFXtoRP_HsaIpgMove.ftl +++ b/RFXtoRP_HsaIpgMove.ftl @@ -58,9 +58,10 @@ <#else> <#stop Receipt reference is empty> - <#else> + <#else> <#-- cases of an IPG move with quantity = 0 (weight modification)--> <#stop> + <#break> From cc5357369d43f27b8d8bb9b15ff7c8bd492d273f Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 15 Mar 2024 10:42:28 +0100 Subject: [PATCH 10/11] modifs --- RFXtoRP_HsaIpgMove.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsaIpgMove.ftl b/RFXtoRP_HsaIpgMove.ftl index e1ff9be..ef559d0 100644 --- a/RFXtoRP_HsaIpgMove.ftl +++ b/RFXtoRP_HsaIpgMove.ftl @@ -56,7 +56,7 @@ <#stop> <#else> - <#stop Receipt reference is empty> + <#stop "Receipt reference is empty"> <#else> <#-- cases of an IPG move with quantity = 0 (weight modification)--> From 591b49cd88cac6978b01e391f55f8402266bd816 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 15 Mar 2024 10:56:08 +0100 Subject: [PATCH 11/11] modifs --- RFXtoRP_HsaIpgMove.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RFXtoRP_HsaIpgMove.ftl b/RFXtoRP_HsaIpgMove.ftl index ef559d0..03cbfb8 100644 --- a/RFXtoRP_HsaIpgMove.ftl +++ b/RFXtoRP_HsaIpgMove.ftl @@ -58,10 +58,10 @@ <#else> <#stop "Receipt reference is empty"> - <#else> + + <#else> <#-- cases of an IPG move with quantity = 0 (weight modification)--> <#stop> - <#break>