From d050ade2b9e5f37e87d04dfa2187d86d8cb9eabc Mon Sep 17 00:00:00 2001 From: Laure Pascal Date: Wed, 6 Sep 2023 16:43:31 +0200 Subject: [PATCH] Addition of example in SK inclusions --- ...ckLs_StockSnapshotted_SegmentationKeys.ftl | 44 +++++++++++----- ...IpgMove_GoodsReceived_SegmentationKeys.ftl | 49 +++++++++++------- ...HsaIpgMove_StockMoved_SegmentationKeys.ftl | 51 +++++++++++-------- ...srPrepa_GoodsPrepared_SegmentationKeys.ftl | 49 ++++++++++++------ RFXtoRP_HsrPro.ftl | 9 ---- ...utionflowDetected_LineSegmentationKeys.ftl | 33 ++++++------ ...utionflowDetected_LineSegmentationKeys.ftl | 48 ++++++++++++----- 7 files changed, 180 insertions(+), 103 deletions(-) diff --git a/RFXtoRP_HfDtlStockLs_StockSnapshotted_SegmentationKeys.ftl b/RFXtoRP_HfDtlStockLs_StockSnapshotted_SegmentationKeys.ftl index 34ef750..a26d58e 100644 --- a/RFXtoRP_HfDtlStockLs_StockSnapshotted_SegmentationKeys.ftl +++ b/RFXtoRP_HfDtlStockLs_StockSnapshotted_SegmentationKeys.ftl @@ -1,24 +1,42 @@ -<#-- **** file included in RFXtoRP_HsaItm_ItemCreated.ftl ***** --> <#-- use protobuf of class HfDtlStockLs to find Reflex WMS fields names --> -<#--"SegmentationKeys": [ - { +<#-- + +"SegmentationKeys": [ + { + "Key": "Grade", + "Value": { "String" : "${stock.grade_code}"} + }, + { + "Key": "Owner", + "Value": { "String" : "${stock.owner_code}"} + }, + { "Key": "BatchNumber", <#if stock.batch_1 == ""> "Value": { "String" : "no batch"} <#else> "Value": { "String" : "${stock.batch_1}"} - + }, - { - "Key": "Grade", - "Value": { "String" : "${SegmentationKeys_KV[stock.grade_code]!Default_Value_Grade_SegmentationKey}"} + { + "Key": "HeldForSpecificCode", + "Value": { "Bool" : "${stock.held_for_specific_code}"} }, - { - "Key": "Owner", - "Value": { "String" : "${stock.owner_code}"} - } - ], - + + { + <#assign manufacturing_datetime = RfxDateTimetoUTC(stock.Date_of_manufacture,time_zone_offset_rfx) /> + "Key": "ManufacturingDate", + "Value": "Timestamp": { + "AuthorTimeZone": "${time_zone_rfx}", + "DateTime": "${manufacturing_datetime}" + } + } + ] --> + + + + + "SegmentationKeys": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl b/RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl index 78816d5..bee18d4 100644 --- a/RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl +++ b/RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl @@ -1,24 +1,39 @@ <#-- use protobuf of class HsaIpgMove to find Reflex WMS fields names --> -<#--"SegmentationKeys": - [ - { - "Key": "Grade", - "Value": {"String": "${reflexMvtStockInterface.grade_code}"} - }, - { - "Key": "Owner", - "Value": {"String": "${reflexMvtStockInterface.owner_code}"} - }, - { - "Key": "BatchNumber", - <#if reflexMvtStockInterface.batch_1 == ""> +<#-- + + +"SegmentationKeys": [ + { + "Key": "Grade", + "Value": { "String" : "${reflexMvtStockInterface.grade_code}"} + }, + { + "Key": "Owner", + "Value": { "String" : "${reflexMvtStockInterface.owner_code}"} + }, + { + "Key": "BatchNumber", + <#if reflexMvtStockInterface.batch_1 == ""> "Value": { "String" : "no batch"} - <#else> + <#else> "Value": { "String" : "${reflexMvtStockInterface.batch_1}"} - - } - ], + + }, + { + "Key": "HeldForSpecificCode", + "Value": { "Bool" : "${reflexMvtStockInterface.ipg_specific_code_held}"} + }, + + { + <#assign manufacturing_date = reflexMvtStockInterface.manufacture_date?datetime(rfx_date_format_default)?iso_utc /> + "Key": "ManufacturingDate", + "Value": "Timestamp": { + "AuthorTimeZone": "${time_zone_rfx}", + "DateTime": "${manufacturing_date}" + } + } + ] --> "SegmentationKeys": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsaIpgMove_StockMoved_SegmentationKeys.ftl b/RFXtoRP_HsaIpgMove_StockMoved_SegmentationKeys.ftl index 8079043..efb4f7b 100644 --- a/RFXtoRP_HsaIpgMove_StockMoved_SegmentationKeys.ftl +++ b/RFXtoRP_HsaIpgMove_StockMoved_SegmentationKeys.ftl @@ -1,25 +1,36 @@ -<#-- **** file included in RFXtoRP_HsaItm_ItemCreated.ftl ***** --> <#-- use protobuf of class HsaIpgMove to find Reflex WMS fields names --> - -<#--"SegmentationKeys": - [ - { - "Key": "Grade", - "Value": {"String": "${reflexMvtStockInterface.grade_code}"} - }, - { - "Key": "Owner", - "Value": {"String": "${reflexMvtStockInterface.owner_code}"} - }, - { - "Key": "BatchNumber", - <#if reflexMvtStockInterface.batch_1 == ""> +<#-- +"SegmentationKeys": [ + { + "Key": "Grade", + "Value": { "String" : "${reflexMvtStockInterface.grade_code}"} + }, + { + "Key": "Owner", + "Value": { "String" : "${reflexMvtStockInterface.owner_code}"} + }, + { + "Key": "BatchNumber", + <#if reflexMvtStockInterface.batch_1 == ""> "Value": { "String" : "no batch"} - <#else> + <#else> "Value": { "String" : "${reflexMvtStockInterface.batch_1}"} - - } - ], + + }, + { + "Key": "HeldForSpecificCode", + "Value": { "Bool" : "${reflexMvtStockInterface.ipg_specific_code_held}"} + }, + + { + <#assign manufacturing_date = reflexMvtStockInterface.manufacture_date?datetime(rfx_date_format_default)?iso_utc /> + "Key": "ManufacturingDate", + "Value": "Timestamp": { + "AuthorTimeZone": "${time_zone_rfx}", + "DateTime": "${manufacturing_date}" + } + } + ] --> -"SegmentationKeys": [ ], \ No newline at end of file +"SegmentationKeys": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl b/RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl index 6f43935..e3a46d3 100644 --- a/RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl +++ b/RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl @@ -1,24 +1,41 @@ <#-- use protobuf of class Hsrprepa to find Reflex WMS fields names --> - <#-- -"SegmentationKeys" :[ - { - "Key": "BatchNumber", - <#if despatched_ipg.batch_number == ""> - "Value": { "String" : "no batch"} - <#else> - "Value": { "String" : "${despatched_ipg.batch_number}"} - - }, +"SegmentationKeys": [ { - "Key": "Grade", - "Value": { "String" : "${preparation_line.grade_code}"} + "Key": "Grade", + "Value": { "String" : "${preparation_line.grade_code}"} }, - { - "Key": "Owner", - "Value": { "String" : "${preparation_line.owner_code}"} - } + { + "Key": "Owner", + "Value": { "String" : "${preparation_line.owner_code}"} + }, + { + "Key": "BatchNumber", + <#if reflexMvtStockInterface.batch_1 == ""> + "Value": { "String" : "no batch"} + <#else> + "Value": { "String" : "${despatched_ipg.batch_number}"} + + }, + { + "Key": "HeldForSpecificCode", + <#if despatched_ipg.ipg_held == "true"> + "Value": { "Bool" : "True"} + <#else> + "Value": { "Bool" : "False"} + }, + + { + <#assign manufacturing_date = despatched_ipg.ipg_manufacture_date?datetime(rfx_date_format_default)?iso_utc /> + "Key": "ManufacturingDate", + "Value": "Timestamp": { + "AuthorTimeZone": "${time_zone_rfx}", + "DateTime": "${manufacturing_date}" + } + } ] + + --> "SegmentationKeys": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsrPro.ftl b/RFXtoRP_HsrPro.ftl index 4b6ef39..b8b998a 100644 --- a/RFXtoRP_HsrPro.ftl +++ b/RFXtoRP_HsrPro.ftl @@ -27,15 +27,6 @@ "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl"> - - <#-- preparation expected a prendre en compte dans le connecteur - , - - <#assign apiReflexPlatformID = ApiReflexPlatformID.TransportExpected> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrPro_PreparationExpected.ftl"> - --> <#-- Preparation order confirmed --> <#else> diff --git a/RFXtoRP_HsrPro_ExecutionflowDetected_LineSegmentationKeys.ftl b/RFXtoRP_HsrPro_ExecutionflowDetected_LineSegmentationKeys.ftl index 6482f78..eec0805 100644 --- a/RFXtoRP_HsrPro_ExecutionflowDetected_LineSegmentationKeys.ftl +++ b/RFXtoRP_HsrPro_ExecutionflowDetected_LineSegmentationKeys.ftl @@ -1,20 +1,23 @@ -<#-- **** file included in RFXtoRP_HsaItm_ItemCreated.ftl ***** --> <#-- use protobuf of class HsrPro to find Reflex WMS fields names --> - <#-- -"SegmentationKeys": [ { - "Key": "BatchNumber", - <#if line.batch_1 == ""> - "Value": { "String" : "no batch"} - <#else> - "Value": { "String" : "${line.batch_1}"} - - }, - { - "Key": "Grade", - "Value": { "String" : "${SegmentationKeys_KV[line.grade_code_to_prepare]!Default_Value_Grade_SegmentationKey}"} - } - ] +"SegmentationKeys": [ + { + "Key": "Grade", + "Value": { "String" : "${line.grade_code_to_prepare}"} + }, + { + "Key": "Owner", + "Value": { "String" : "${line.owner_code_to_prepare}"} + }, + { + "Key": "BatchNumber", + <#if reflexMvtStockInterface.batch_1 == ""> + "Value": { "String" : "no batch"} + <#else> + "Value": { "String" : "${line.batch_1}"} + + } + ] --> "SegmentationKeys": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineSegmentationKeys.ftl b/RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineSegmentationKeys.ftl index ef2e808..2282e33 100644 --- a/RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineSegmentationKeys.ftl +++ b/RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineSegmentationKeys.ftl @@ -1,19 +1,41 @@ <#-- use protobuf of class HsrReceiptList to find Reflex WMS fields names --> <#-- -"SegmentationKeys": [ { - "Key": "BatchNumber", - <#if line.batch_1 == ""> - "Value": { "String" : "no batch"} - <#else> - "Value": { "String" : "${line.batch_1}"} - - }, - { - "Key": "Grade", - "Value": { "String" : "${line.grade_code_to_prepare} - } - ] +"SegmentationKeys": [ + { + "Key": "Grade", + "Value": { "String" : "${line.grade_code}"} + }, + { + "Key": "Owner", + "Value": { "String" : "${line.owner_code}"} + }, + { + "Key": "BatchNumber", + <#if reflexMvtStockInterface.batch_1 == ""> + "Value": { "String" : "no batch"} + <#else> + "Value": { "String" : "${line_without_detail.batch_1}"} + + }, + { + "Key": "HeldForSpecificCode", + <#if line_without_detail.hold_for_specific_code == "true"> + "Value": { "Bool" : "True"} + <#else> + "Value": { "Bool" : "False"} + }, + + { + <#assign manufacturing_date = line_without_detail.ipg_date_of_manufacture_date?datetime(rfx_date_format_default)?iso_utc /> + "Key": "ManufacturingDate", + "Value": "Timestamp": { + "AuthorTimeZone": "${time_zone_rfx}", + "DateTime": "${manufacturing_date}" + } + } + + ] --> "SegmentationKeys": [ ] \ No newline at end of file