From 123d1dce90bb64d493369e0b8039472bb99ffe3d Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 16 Jan 2024 17:06:17 +0100 Subject: [PATCH] Modifs date 1601241705 --- RFXtoRP_HsrPrepa.ftl | 6 +++--- RFXtoRP_HsrPrepa_GoodsPrepared.ftl | 9 ++++----- RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl | 9 --------- RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl | 6 ------ 4 files changed, 7 insertions(+), 23 deletions(-) diff --git a/RFXtoRP_HsrPrepa.ftl b/RFXtoRP_HsrPrepa.ftl index 962fd5e..7bc4634 100644 --- a/RFXtoRP_HsrPrepa.ftl +++ b/RFXtoRP_HsrPrepa.ftl @@ -49,15 +49,15 @@ <#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}", diff --git a/RFXtoRP_HsrPrepa_GoodsPrepared.ftl b/RFXtoRP_HsrPrepa_GoodsPrepared.ftl index 89c38ad..1cf0eb7 100644 --- a/RFXtoRP_HsrPrepa_GoodsPrepared.ftl +++ b/RFXtoRP_HsrPrepa_GoodsPrepared.ftl @@ -50,29 +50,28 @@ "ItemID": "${preparation_line.item_code}", "LVBranchID": "${preparation_line.item_lv_code}", <#if (despatched_ipg.ipg_manufacture_date?length != 0) && (despatched_ipg.ipg_manufacture_date?starts_with("00") == false)> - <#-- <#assign priority_date = JsonUtil.createUTCDateTime(despatched_ipg.ipg_manufacture_date) /> --> <#assign priority_date = despatched_ipg.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 = JsonUtil.createUTCDateTime(despatched_ipg.ipg_receipt_date) /> --> <#assign priority_date = despatched_ipg.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 = JsonUtil.createUTCDateTime(despatched_ipg.ipg_best_before_date) /> --> <#assign priority_date = despatched_ipg.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 = JsonUtil.createUTCDateTime(despatched_ipg.ipg_sell_by_date) /> --> <#assign priority_date = despatched_ipg.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 = JsonUtil.createUTCDateTime(despatched_ipg.ipg_use_by_date) /> --> <#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)> + <#assign priority_date = preparationOrder.stock_despatch_at_preparation_datetime?datetime(rfx_date_format_default)?iso_utc /> + "PriorityDate": "${priority_date}", <#else> "PriorityDate": "error_date", diff --git a/RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl b/RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl index 07f6274..d4c3d21 100644 --- a/RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl +++ b/RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl @@ -9,16 +9,7 @@ "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${despatched_ipg.hd_number}", - - - <#-- <#if despatched_ipg.carton_number != "000000000000000000"> - "RefID": "${despatched_ipg.carton_number}", - <#else> - "RefID": "${despatched_ipg.hd_number}", - --> - "RefDate": { "DateTime": "${dispatched_datetime}", "AuthorTimeZone": "${time_zone_rfx}" diff --git a/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl b/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl index 575a1bf..0b37d35 100644 --- a/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl +++ b/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl @@ -9,12 +9,6 @@ "ID": { <#if despatched_ipg.consignment_unit_id!=""> "RefID": "${despatched_ipg.consignment_unit_id}" - <#-- <#else> - <#if despatched_ipg.carton_number != "000000000000000000"> - "RefID": "${despatched_ipg.carton_number}" - <#else> - "RefID": "${despatched_ipg.hd_number}" - --> }, "Payload": {