Compare commits

..

1 Commits

Author SHA1 Message Date
19ed52e148 Release 1.2.4+1 2023-11-23 09:19:31 +00:00
46 changed files with 229 additions and 325 deletions

View File

@@ -22,12 +22,10 @@
},
"Goods": {
"ItemID": "${stock.item_code?trim?json_string}",
"ItemID": "${stock.item_code}",
"LVBranchID": "${stock.item_logistical_variant_code}",
<#assign priority_date = stock.priority_date?datetime(rfx_date_format_default)?iso_utc />
<#if (stock.priority_date!="") && (stock.priority_date?starts_with("00")== false) >
"PriorityDate" : "${priority_date}",
</#if>
"PriorityDate" : "${priority_date}",
<#-- Segmentation keys inclusion -->
<#include "RFXtoRP_HfDtlStockLs_StockSnapshotted_SegmentationKeys.ftl">

View File

@@ -24,5 +24,5 @@ ${output}
<#break>
<#default>
<#stop >
<#stop>
</#switch>

View File

@@ -9,9 +9,7 @@
<#case "C">
<#case "U">
<#case "D">
<#stop "no generic FTL file available yet for LV types">
<#break>

View File

@@ -4,7 +4,7 @@
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${carrier.carrier_code?trim?json_string}"
"RefID": "${carrier.carrier_code}"
},
"Payload": {
@@ -35,19 +35,16 @@
<#-- if Reflex WMS address is not structured -->
<#else>
<#if carrier.address??>
"Name": "${carrier.address.company_name?json_string}",
"StreetAddressOne" : "${carrier.address.address_1?json_string}",
"StreetAddressTwo" : "${carrier.address.address_2?json_string}",
"StreetAddressThree" : "${carrier.address.address_3?json_string}"
</#if>
"Name": "${carrier.address.company_name?json_string}",
"StreetAddressOne" : "${carrier.address.address_1?json_string}",
"StreetAddressTwo" : "${carrier.address.address_2?json_string}",
"StreetAddressThree" : "${carrier.address.address_3?json_string}"
</#if>
},
<#if carrier.address??>
"Phones": ["${carrier.address.telephone?json_string}",
"Phones": ["${carrier.address.telephone?json_string}",
"${carrier.address.other_number?json_string}"
],
</#if>
"Typology": "TYPOLOGY_CARRIER"
}
}

View File

@@ -4,7 +4,7 @@
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${carrier.carrier_code?trim?json_string}"
"RefID": "${carrier.carrier_code}"
},
"Payload": {}

View File

@@ -4,7 +4,7 @@
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${actor.code?trim?json_string}"
"RefID": "${actor.code}"
},
"Payload": {
@@ -35,20 +35,18 @@
<#-- if Reflex WMS is not structured -->
<#else>
<#if actor.address?? >
"Name": "${actor.address.company_name?json_string}",
"StreetAddressOne" : "${actor.address.address_1?json_string}",
"StreetAddressTwo" : "${actor.address.address_2?json_string}",
"StreetAddressThree" : "${actor.address.address_3?json_string}"
</#if>
"Name": "${actor.address.company_name?json_string}",
"StreetAddressOne" : "${actor.address.address_1?json_string}",
"StreetAddressTwo" : "${actor.address.address_2?json_string}",
"StreetAddressThree" : "${actor.address.address_3?json_string}"
</#if>
},
<#if actor.address?? >
"Phones": ["${actor.address.telephone?json_string}",
"Phones": ["${actor.address.telephone?json_string}",
"${actor.address.other_number?json_string}"
],
</#if>
"Typology": "TYPOLOGY_UNKNOWN"
}
}

View File

@@ -4,7 +4,7 @@
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${actor.code?trim?json_string}"
"RefID": "${actor.code}"
},
"Payload": {}

View File

@@ -45,20 +45,21 @@
>
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsReceived>
<#assign apiReflexPlatformID = ApiReflexPlatformID.GoodsReceived>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaIpgMove_GoodsReceived.ftl">
}
]
<#else>
<#-- Case of IPG move type volontarilly ignored-->
<#stop>
<#stop "Move type not supported">
</#if>
</#if>
<#else>
<#-- cases of an IPG move with quantity = 0 (weight modification)-->
<#stop>
<#-- cases of an IPG move with quantity = 0 (weight modification))-->
<#stop "move ignored quantity = 0">
</#if>
<#break>

View File

@@ -8,7 +8,7 @@
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${reflexMvtStockInterface.hd_number?trim?json_string}"
"RefID": "${reflexMvtStockInterface.hd_number}"
},
"Payload": {
"ReceivedContents" :[
@@ -18,20 +18,16 @@
"AuthorTimeZone": "${time_zone_rfx}"
},
"Goods": {
"ItemID": "${reflexMvtStockInterface.item_code?trim?json_string}",
"LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}",
"ItemID": "${reflexMvtStockInterface.item_code}",
"LVBranchID": "${reflexMvtStockInterface.lv_code}",
"PriorityDate": "${priority_date}",
<#-- Goods received Segmentation Keys inclusion -->
<#include "RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl">
},
<#if reflexMvtStockInterface.receipt_reference!="">
"ExecutionflowID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}",
<#else>
"ExecutionflowID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}",
</#if>
"ExecutionflowID": "${reflexMvtStockInterface.receipt_reference}",
"LineID": "${reflexMvtStockInterface.receipt_line_number}",
"ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}",
"ActorID": "${reflexMvtStockInterface.physical_depot_code}",
"Quantity": {
"LVID": "${quantity_in_base_lv_RP_Cst}",
"Value": ${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs}

View File

@@ -23,27 +23,27 @@
},
"Payload": {
"Goods": {
"ItemID": "${reflexMvtStockInterface.item_code?trim?json_string}",
"ItemID": "${reflexMvtStockInterface.item_code}",
"PriorityDate": "${ipg_priority_datetime}",
<#-- Segmentation keys inclusions -->
<#include "RFXtoRP_HsaIpgMove_StockMoved_SegmentationKeys.ftl">,
"LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}"
"LVBranchID": "${reflexMvtStockInterface.lv_code}"
},
"ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}",
"ActorID": "${reflexMvtStockInterface.physical_depot_code}",
"Movement": {
"DateTime": {
"DateTime": "${generation_date}",
"AuthorTimeZone": "${time_zone_rfx}"
},
"Author": "ReflexWMS-${reflexMvtStockInterface.ipg_move_creation_user_code?json_string}",
"Author": "ReflexWMS-${reflexMvtStockInterface.ipg_move_creation_user_code}",
"ExternalMoveRef" : "${reflexMvtStockInterface.ipg_move_year_number} - ${reflexMvtStockInterface.ipg_move_number}",
"Type": "${MoveType_KV[reflexMvtStockInterface.ipg_move_type]!reflexMvtStockInterface.ipg_move_type}",
"Reason": "${reflexMvtStockInterface.miscellaneous_receipts_despatches_code?json_string}",
"ExternalInfo" : "${reflexMvtStockInterface.stock_move_reference?json_string}",
"Reason": "${reflexMvtStockInterface.miscellaneous_receipts_despatches_code}",
"ExternalInfo" : "${reflexMvtStockInterface.stock_move_reference}",
<#if reflexMvtStockInterface.ipg_move_operation_year_number!= 0>
"OperationReference": "${reflexMvtStockInterface.ipg_move_operation_year_number} - ${reflexMvtStockInterface.ipg_move_operation_number}",
</#if>

View File

@@ -5,7 +5,7 @@
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${lv.item_code?trim?json_string}"
"RefID": "${lv.item_code}"
},
"Payload": {
"RemovedLogisticVariantIDs":["${lv.logistical_variant_code}"]

View File

@@ -5,19 +5,19 @@
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${lv.item_code?trim?json_string}"
"RefID": "${lv.item_code}"
},
"Payload": {
"LogisticVariants": [
{
"LVID": "${lv.logistical_variant_code?json_string}",
"Name" : "${lv.lv_type_code?json_string}",
"LVID": "${lv.logistical_variant_code}",
"Name" : "${lv.lv_type_code}",
<#if lv.id_list??>
"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}",
"Value": "${id.logistical_variant_ID_code}"
}<#sep>,</#sep>
</#list>
],
@@ -29,7 +29,7 @@
"IsBaseLogisticVariant": ${lv.base_lv},
<#if lv.base_lv != "true">
"RefLV": "${lv.subpackaging_lv_code?json_string}",
"RefLV": "${lv.subpackaging_lv_code}",
</#if>
"QuantityInRefLV": ${lv.quantity_in_subpackaging_lv},

View File

@@ -6,7 +6,7 @@
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${item.item_code?trim?json_string}"
"RefID": "${item.item_code}"
},
"Payload": {
"DescriptionsByLanguage": [{
@@ -32,15 +32,15 @@
<#list item.logistical_variant_list as logistical_variant>
{
"LVID": "${logistical_variant.logistical_variant_code?json_string}",
"Name" : "${logistical_variant.lv_type_code?json_string}",
"LVID": "${logistical_variant.logistical_variant_code}",
"Name" : "${logistical_variant.lv_type_code}",
<#if logistical_variant.id_list??>
"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}",
"Value": "${id.logistical_variant_ID_code}"
}<#sep>,</#sep>
</#list>
],
@@ -52,7 +52,7 @@
"IsBaseLogisticVariant": ${logistical_variant.base_lv},
<#if logistical_variant.base_lv != "true">
"RefLV": "${logistical_variant.subpackaging_lv_code?json_string}",
"RefLV": "${logistical_variant.subpackaging_lv_code}",
</#if>
"QuantityInRefLV": ${logistical_variant.quantity_in_subpackaging_lv},

View File

@@ -5,7 +5,7 @@
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${item.item_code?trim?json_string}"
"RefID": "${item.item_code}"
},
"Payload": {}
}

View File

@@ -16,7 +16,7 @@
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign preparationStatusInterface = JsonUtil.jsonToMap(dataRfx) />
[
<#--**Pick batch runned (200) **-->
<#--**Pick batch runned (100) **-->
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "200" >
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationExpected>
@@ -61,7 +61,8 @@
<#include "RFXtoRP_HsaProStatus_ExecutionflowCancelled.ftl">
}
<#else>
<#stop>
<#stop "Reflex WMS status not supported on Reflex Platform">
</#if>
</#if>
</#if>
</#if>

View File

@@ -8,7 +8,7 @@
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
"RefID": "${preparationStatusInterface.preparation_order_originator_reference}",
"RefDate": {
"DateTime": "${preparation_status_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"

View File

@@ -7,7 +7,7 @@
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
"RefID": "${preparationStatusInterface.preparation_order_originator_reference}",
"RefDate": {
"DateTime": "${preparation_status_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"

View File

@@ -7,7 +7,7 @@
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
"RefID": "${preparationStatusInterface.preparation_order_originator_reference}",
"RefDate": {
"DateTime": "${preparation_status_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"

View File

@@ -7,7 +7,7 @@
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
"RefID": "${preparationStatusInterface.preparation_order_originator_reference}",
"RefDate": {
"DateTime": "${preparation_status_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"

View File

@@ -7,7 +7,7 @@
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
"RefID": "${preparationStatusInterface.preparation_order_originator_reference}",
"RefDate": {
"DateTime": "${preparation_status_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"

View File

@@ -4,7 +4,7 @@
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${actor.code?trim?json_string}"
"RefID": "${actor.code}"
},
"Payload": {
@@ -34,20 +34,16 @@
<#-- if Reflex WMS address is not structured -->
<#else>
<#if actor.optional_attributes?? >
"Name": "${actor.optional_attributes.company_name?json_string}",
"StreetAddressOne" : "${actor.optional_attributes.address_1?json_string}",
"StreetAddressTwo" : "${actor.optional_attributes.address_2?json_string}",
"StreetAddressThree" : "${actor.optional_attributes.address_3?json_string}"
</#if>
"Name": "${actor.optional_attributes.company_name?json_string}",
"StreetAddressOne" : "${actor.optional_attributes.address_1?json_string}",
"StreetAddressTwo" : "${actor.optional_attributes.address_2?json_string}",
"StreetAddressThree" : "${actor.optional_attributes.address_3?json_string}"
</#if>
},
<#if actor.optional_attributes?? >
"Phones": ["${actor.optional_attributes.telephone?json_string}",
"${actor.optional_attributes.other_number?json_string}"
],
</#if>
"Phones": ["${actor.optional_attributes.telephone?json_string}",
"${actor.optional_attributes.other_number?json_string}"
],
"Typology": "TYPOLOGY_UNKNOWN"
}
}

View File

@@ -4,7 +4,7 @@
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${actor.code?trim?json_string}"
"RefID": "${actor.code}"
},
"Payload": {}

View File

@@ -4,7 +4,7 @@
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${depot.physical_depot_code?trim?json_string}"
"RefID": "${depot.physical_depot_code}"
},
"Payload": {

View File

@@ -4,7 +4,7 @@
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${depot.physical_depot_code?trim?json_string}"
"RefID": "${depot.physical_depot_code}"
},
"Payload": {}

View File

@@ -10,51 +10,49 @@
<#assign aDateTime = .now>
<#switch cloudEventMsg.action>
<#case "C">
<#--<#case "U">
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign preparationOrder = JsonUtil.jsonToMap(dataRfx)>
<#if preparationOrder.total_lv_validated !=0>
[
<#case "C">
<#--<#case "U">
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign preparationOrder = JsonUtil.jsonToMap(dataRfx)>
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsPrepared>
<#assign apiReflexPlatformID = ApiReflexPlatformID.GoodsPrepared>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_GoodsPrepared.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_HandlingUnitDispatched.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>
<#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>
</#list>
</#list>
]
<#else>
<#stop "no confirmed quantity for the preparation - preparation closed">
</#if>
<#break>
<#break>
<#case "D">
<#-- *********************************************** Action = DELETE ******************** -->
<#stop "event not supported (Case D)">
<#break>
<#case "D">
<#-- *********************************************** Action = DELETE ******************** -->
<#stop "event not supported (Case D)">
<#break>
<#default>
<#stop "event not supported">
<#default>
<#stop "event not supported">
</#switch>

View File

@@ -30,34 +30,34 @@
"PreparedContents" :[
{
"Goods": {
"ItemID": "${preparation_line.item_code?trim?json_string}",
"LVBranchID": "${preparation_line.item_lv_code?json_string}",
"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 = despatched_ipg.ipg_sell_by_date?datetime(rfx_date_format_default)?iso_utc />
<#-- <#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": "1970-01-01T00:00:00Z",
</#if>
"PriorityDate": "error_date",
</#if>
</#if>
</#if>
@@ -67,13 +67,9 @@
<#-- 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}",
<#else>
"LineID": "${preparation_line.pro_line_number!0}",
</#if>
"ActorID": "${preparationOrder.physical_depot_code?trim?json_string}",
"ExecutionflowID": "${preparation_line.preparation_order_originator_reference}",
"LineID": "${preparation_line.pro_line_number}",
"ActorID": "${preparationOrder.physical_depot_code}",
"Quantity": {
"LVID": "${quantity_in_base_lv_RP_Cst}",
"Value": ${despatched_ipg.quantity_lvs}

View File

@@ -7,7 +7,7 @@
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${despatched_ipg.consignment_unit_id?trim?json_string}"
"RefID": "${despatched_ipg.consignment_unit_id}"
},
"Payload": {
<#if despatched_ipg.carton_number != "000000000000000000">

View File

@@ -14,14 +14,14 @@
<#case "U">
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
<#assign 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">
<#if order.preparation_type_code == "010" || order.preparation_type_code == "030">
<#-- Only if preparation order not confirmed -->
<#if preparation_order.preparation_order_confirmed == "false" >
<#if order.preparation_order_confirmed == "false" >
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
@@ -32,9 +32,6 @@
<#else>
<#stop "preparation order type not supported">
</#if>
<#else>
<#stop "PRO reference is empty">
</#if>
}
@@ -44,7 +41,7 @@
<#case "D">
<#-- *********************************************** Action = DELETE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
<#assign order = JsonUtil.jsonToMap(dataRfx)>
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>

View File

@@ -1,13 +1,13 @@
<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
<#assign preparation_status_datetime = RfxDateTimetoUTC(preparation_order.modification_datetime,time_zone_offset_rfx) />
<#assign preparation_status_datetime = RfxDateTimetoUTC(order.modification_datetime,time_zone_offset_rfx) />
[
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${preparation_order.originator_reference?trim?json_string}",
"RefID": "${order.originator_reference}",
"RefDate": {
"DateTime": "${preparation_status_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"

View File

@@ -2,13 +2,13 @@
<#include "ReflexUtils.ftl">
[
{
<#assign planned_final_delivery_start_datetime = RfxDateTimetoUTC(preparation_order.planned_final_delivery_start_datetime,time_zone_offset_rfx) />
<#assign pro_creation_datetime = RfxDateTimetoUTC(preparation_order.creation_datetime,time_zone_offset_rfx) />
<#assign planned_final_delivery_start_datetime = RfxDateTimetoUTC(order.planned_final_delivery_start_datetime,time_zone_offset_rfx) />
<#assign pro_creation_datetime = RfxDateTimetoUTC(order.creation_datetime,time_zone_offset_rfx) />
"Header": {
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${preparation_order.originator_reference?trim?json_string}",
"RefID": "${order.originator_reference}",
"RefDate": {
"DateTime": "${pro_creation_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"
@@ -21,66 +21,47 @@
},
<#-- Header Metadata inclusion -->
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_HeaderMetadata.ftl">,
<#-- Add transport grade code
<#if preparation_order.transport_grade_code!="">
"CarrierService":"${preparation_order.transport_grade_code?trim?json_string}",
</#if> -->
"ShipFrom": {
"ActorID": "${preparation_order.physical_depot_code?trim?json_string}"
"ActorID": "${order.physical_depot_code}"
},
"ShipFromAcked": true,
"ShipTo": {
<#if
<#-- preparation_order.address.type_code == "" &&
preparation_order.address.title_code == "" &&
preparation_order.address.first_name == "" &&
preparation_order.address.last_name == "" &&
preparation_order.address.mail_address == "" &&
preparation_order.address.contact_type_code == "" &&
preparation_order.address.mobile_phone_number == "" &&
preparation_order.address.land_line_phone_number == "" &&
preparation_order.address.fax_number == "" && -->
preparation_order.address.address_type_code == "" &&
preparation_order.address.name_or_company_name == "" &&
preparation_order.address.additional_address_data_1 == "" &&
preparation_order.address.additional_address_data_2 == "" &&
preparation_order.address.post_code_area_name == "" &&
preparation_order.address.territorial_division_code == "" &&
preparation_order.address.postal_code == "" &&
preparation_order.address.iso_country_code == "">
"ActorID": "${preparation_order.end_consignee_code}"
<#if order.address.type_code == "" && order.address.title_code == "" && order.address.first_name == "" && order.address.last_name == "" && order.address.mail_address == "" && order.address.contact_type_code == "" && order.address.mobile_phone_number == "" && order.address.land_line_phone_number == "" && order.address.fax_number == "" && order.address.address_type_code == "" && order.address.name_or_company_name == "" && order.address.additional_address_data_1 == "" && order.address.additional_address_data_2 == "" && order.address.post_code_area_name == "" && order.address.territorial_division_code == "" && order.address.postal_code == "" && order.address.iso_country_code == "">
"ActorID": "${order.end_consignee_code}"
<#else>
"Actor":
{
"Name" : "${preparation_order.address.name_or_company_name?json_string!""}",
"Name" : "${order.address.name_or_company_name!""}",
"Address" :
{
"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!""}"
"City" : "${order.address.post_code_area_name!""}",
"CountryCode" : "${order.address.iso_country_code!""}",
"PostalCode" : "${order.address.postal_code!""}",
"StreetAddressOne" : "${order.address.street_and_number_and_po_box!""}",
"StreetAddressTwo" : "${order.address.additional_address_data_1!""}",
"StreetAddressThree" : "${order.address.additional_address_data_2!""}"
}
},
"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" : "${order.address.first_name!""}",
"LastName" : "${order.address.last_name!""}",
"Emails" : ["${order.address.mail_address!""}"],
"Phones" : ["${order.address.mobile_phone_number!""}","${order.address.land_line_phone_number!""}", "${order.address.fax_number!""}" ]
}
</#if>
},
<#if preparation_order.line_list??>
<#if order.line_list??>
"Lines" : [
<#list preparation_order.line_list as preparation_order_line >
<#list order.line_list as line>
{
<#if (preparation_order_line.originator_reference_line_number!0) != 0>
"LineID": "${preparation_order_line.originator_reference_line_number}",
<#if (line.originator_reference_line_number!0) != 0>
"LineID": "${line.originator_reference_line_number}",
<#else>
"LineID": "${preparation_order_line.preparation_order_line_number!0}",
"LineID": "${line.preparation_order_line_number!0}",
</#if>
<#-- Line Metadata inclusion -->
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_LineMetadata.ftl">,
@@ -89,10 +70,10 @@
{
"Goods":
{
"ItemID": "${preparation_order_line.item_code?trim?json_string!"0"}",
"LVBranchID": "${preparation_order_line.item_lv_code?json_string!"0"}",
<#if (preparation_order_line.optional_attributes.forced_priority_date?length != 0) && (preparation_order_line.optional_attributes.forced_priority_date?starts_with("00") == false)>
<#assign forced_priority_date = preparation_order_line.optional_attributes.forced_priority_date?datetime(rfx_date_format_default)?iso_utc />
"ItemID": "${line.item_code!"0"}",
"LVBranchID": "${line.item_lv_code!"0"}",
<#if (line.optional_attributes.forced_priority_date?length != 0) && (line.optional_attributes.forced_priority_date?starts_with("00") == false)>
<#assign forced_priority_date = line.optional_attributes.forced_priority_date?datetime(rfx_date_format_default)?iso_utc />
"PriorityDate": "${forced_priority_date}",
</#if>
@@ -103,7 +84,7 @@
"Quantity" :
{
"LVID": "${quantity_in_base_lv_RP_Cst}",
"Value": "${preparation_order_line.base_lv_quantity_to_prepare!0}"
"Value": "${line.base_lv_quantity_to_prepare!0}"
}
}
}<#sep>,</#sep>

View File

@@ -5,7 +5,7 @@
"MetaData": [
{
"Key": "OrderType",
"Value": { "String" : "${preparation_order.optional_attributes.reason_code}"}
"Value": { "String" : "${order.optional_attributes.reason_code}"}
}
],
-->

View File

@@ -4,18 +4,18 @@
"SegmentationKeys": [
{
"Key": "Grade",
"Value": { "String" : "${preparation_order_line.grade_code_to_prepare}"}
"Value": { "String" : "${line.grade_code_to_prepare}"}
},
{
"Key": "Owner",
"Value": { "String" : "${preparation_order_line.owner_code_to_prepare}"}
"Value": { "String" : "${line.owner_code_to_prepare}"}
},
{
"Key": "BatchNumber",
<#if reflexMvtStockInterface.batch_1 == "">
"Value": { "String" : "no batch"}
<#else>
"Value": { "String" : "${preparation_order_line.batch_1}"}
"Value": { "String" : "${line.batch_1}"}
</#if>
}
]

View File

@@ -15,7 +15,7 @@
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
<#if receipt.receipt_reference ?? && receipt.receipt_reference!="">
<#if receipt.receipt_type = "030">
<#stop "ignored message because receipt type = transfert">
<#else>
@@ -36,9 +36,6 @@
}
]
</#if>
<#else>
<#stop "Receipt reference is empty">
</#if>
<#break>
<#case "U">
<#-- *********************************************** Action = UPDATE ******************** -->

View File

@@ -8,7 +8,7 @@
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${receipt.receipt_reference?trim?json_string}",
"RefID": "${receipt.receipt_reference}",
"RefDate": {
"DateTime": "${receipt_status_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"

View File

@@ -8,7 +8,7 @@
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${receipt.receipt_reference?trim?json_string}",
"RefID": "${receipt.receipt_reference}",
"RefDate": {
"DateTime": "${receipt_creation_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"
@@ -25,16 +25,16 @@
"ShipFrom":
{
"ActorID": "${receipt.original_code?trim?json_string}"
"ActorID": "${receipt.original_code}"
},
"ShipTo" :
{
"ActorID": "${receipt.physical_depot_code?trim?json_string}"
"ActorID": "${receipt.physical_depot_code}"
},
"ShipToAcked": true,
<#if receipt.carrier_informations.carrier_code != "">
"Carrier" : {"ActorID": "${receipt.carrier_informations.carrier_code?trim?json_string}"},
"Carrier" : {"ActorID": "${receipt.carrier_informations.carrier_code}"},
</#if>
@@ -49,15 +49,15 @@
{
"Goods":
{
"ItemID": "${line.item_code?trim?json_string!"0"}",
"LVBranchID": "${line.item_lv_code?json_string!"0"}",
"ItemID": "${line.item_code!"0"}",
"LVBranchID": "${line.item_lv_code!"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)>
<#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}",
</#if>
<#else>
<#stop >
<#stop "line with detail">
</#if>
<#-- Segmentation Keys inclusion -->
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl">

View File

@@ -7,7 +7,7 @@
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${receipt.receipt_reference?trim?json_string}",
"RefID": "${receipt.receipt_reference}",
"RefDate": {
"DateTime": "${receipt_status_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"

View File

@@ -8,7 +8,7 @@
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${receipt.receipt_reference?trim?json_string}",
"RefID": "${receipt.receipt_reference}",
"RefDate": {
"DateTime": "${receipt_status_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"

View File

@@ -43,11 +43,7 @@
<#default>
[
{
<#if restResponsetMsg.body?? >
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#else>
<#assign restResponseBody = "{}" />
</#if>
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
@@ -61,7 +57,7 @@
<#switch restResponsetMsg.status>
<#case 200>
<#case 201>
<#-- *********************************************** ApiRestID = receipts_post ******************** -->
<#-- *********************************************** ApiRestID = preparation_orders_post ******************** -->
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)>
<#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" >
@@ -89,11 +85,7 @@
<#default>
[
{
<#if restResponsetMsg.body?? >
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#else>
<#assign restResponseBody = "{}" />
</#if>
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :

View File

@@ -28,7 +28,6 @@
"intermediate_consignee": "false",
"protected": "${protected_flag}",
"automatic_generation": "${automatic_generation_flag}",
"deactivate": "false",
"optional_attributes": {
"apt_with_end_consignee": "${apt_with_end_consignee_flag}",
"apt_with_intermediate": "false",
@@ -36,13 +35,13 @@
},
<#if executionflow.ShipTo.ActorID == "">
"address": {
"first_name": "${executionflow.ShipTo.Contact.FirstName!""?json_string}",
"last_name" :"${executionflow.ShipTo.Contact.Lastname!""?json_string}",
"first_name": "${executionflow.ShipTo.Contact.FirstName!""}",
"last_name" :"${executionflow.ShipTo.Contact.Lastname!""}",
"mail_address": "${executionflow.ShipTo.Actor.Emails[0]!""}",
"mobile_phone_number": "${executionflow.ShipTo.Actor.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}",
"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!""}",
"iso_country_code": "${executionflow.ShipTo.Actor.Address.CountryCode!""}"
},
@@ -67,13 +66,13 @@
"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"
"substitution_possible": "false",
"base_lv_quantity": "true",
-->
}<#sep>,</#sep>

View File

@@ -2,22 +2,14 @@
<#-- How to use MD Header map
Example :
<#assign pick_sequence_code = Header_MetaData_Map["OrderType"].String!""/>
If your MD is :
Boolean : .Bool
Float : .Float
Timestamp : .Timestamp.DateTime or .Timestamp.AuthorTimeZone
Int : .Int
String : .String
<#assign pick_sequence_code = Header_MetaData_Map["OrderType"]!""/>
-->
<#assign activity_code = ""/>
<#assign originator_code = ""/>
<#assign preparation_type_code = ""/>
<#assign requested_delivery_date_type = ""/>
<#assign activity_code = "PEN"/>
<#assign originator_code = "50000189"/>
<#assign preparation_type_code = "010"/>
<#assign requested_delivery_date_type = "010"/>
<#assign consolidated_delivery_flag ="false"/>
<#assign pick_sequence_code = ""/>
<#assign protected_flag ="false"/>

View File

@@ -3,14 +3,7 @@
<#-- How to use MD or SK map
Example :
<#assign owner_code_to_prepare = SegmentationKeys_Map["Owner"].String!""/>
If your SK is :
Boolean : .Bool
Float : .Float
Timestamp : .Timestamp.DateTime or .Timestamp.AuthorTimeZone
Int : .Int
String : .String
<#assign owner_code_to_prepare = SegmentationKeys_Map["Owner"]!""/>
-->
<#assign owner_code_to_prepare = SegmentationKeys_Map["myOwner"]!""/>

View File

@@ -19,26 +19,30 @@
"carrier_code" : "${executionflow.Carrier.ActorID!""}",
<#if executionflow.RequestedMilestones?? && executionflow.RequestedMilestones.RequestedDeliveryDateTime??>
"receipt_datetime": "${executionflow.RequestedMilestones.RequestedDeliveryDateTime.DateTime}",
"receipt_datetime": "${executionflow.RequestedMilestones.RequestedDeliveryDateTime.DateTime}",
<#else>
"receipt_datetime": "${aDateTime?iso_utc}",
"receipt_datetime": "${aDateTime?iso_utc}",
</#if>
"carrier_appointment_made": "false",
"receipt_in_cross_docking": "false",
"dock_occupation_duration": 1,
<#--
"carrier_appointment_made": "false",
"receipt_in_cross_docking": "false",
"dock_occupation_duration": 10,
-->
<#if executionflow.Lines??>
"line_list": [
<#list executionflow.Lines as line>
"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>
<#if line.RequestedContent.Goods.SegmentationKeys??>
<#assign SegmentationKeys_Map = JsonUtil.sequenceToMap(line.RequestedContent.Goods.SegmentationKeys, "Key", "Value") />
</#if>
<#if line.MetaData??>
<#assign Line_MetaData_Map = JsonUtil.sequenceToMap(line.MetaData, "Key", "Value") />
</#if>
<#if line.RequestedContent.Goods.SegmentationKeys??>
<#assign SegmentationKeys_Map = JsonUtil.sequenceToMap(line.RequestedContent.Goods.SegmentationKeys, "Key", "Value") />
</#if>
<#include "RPtoRFX_Receipt_DefaultLineData.ftl">
{
"receipt_reference_line_no": ${line.LineID?number},
"item_code": "${line.RequestedContent.Goods.ItemID!""}",
@@ -47,16 +51,19 @@
"owner_code": "${owner_code}",
"grade_code": "${grade_code}",
"batch_1": "${batch_1!""}",
<#--
"optional_attributes": {
<#--"held_for_check": "false",
"held_for_check": "false",
"held _for_repacking": "false",
"hold_code": "false", -->
"hold_for_specific_code": "false"
}
<#--"quality_control_attributes": {
"qcf_to_create_for_receipt_line": "false",
"hold_for_specific_code": "false",
"hold_code": "false"
},
-->
"quality_control_attributes": {
<#--"qcf_to_create_for_receipt_line": "false",-->
"exclude_item_from_inspection": "false"
} -->
}
}<#sep>,</#sep>
</#list>

View File

@@ -2,18 +2,11 @@
<#-- How to use MD Header map
Example :
<#assign receipt_type = Header_MetaData_Map["OrderType"].String!""/>
If your MD is :
Boolean : .Bool
Float : .Float
Timestamp : .Timestamp.DateTime or .Timestamp.AuthorTimeZone
Int : .Int
String : .String
<#assign receipt_type = Header_MetaData_Map["OrderType"]!""/>
-->
<#assign activity_code = ""/>
<#assign originator_code = ""/>
<#assign receipt_type = ""/>
<#assign receipt_reason_code = ""/>
<#assign work_mode_code = ""/>
<#assign activity_code = "PEN"/>
<#assign originator_code = "STANDARD"/>
<#assign receipt_type = "010"/>
<#assign receipt_reason_code = "REC"/>
<#assign work_mode_code = "LPA"/>

View File

@@ -3,17 +3,10 @@
<#-- How to use MD or SK map
Example :
<#assign owner_code = SegmentationKeys_Map["Owner"].String!""/>
If your SK is :
Boolean : .Bool
Float : .Float
Timestamp : .Timestamp.DateTime or .Timestamp.AuthorTimeZone
Int : .Int
String : .String
<#assign owner_code = SegmentationKeys_Map["Owner"]!""/>
-->
<#assign owner_code = ""/>
<#assign grade_code = ""/>
<#assign batch_1 = ""/>
<#assign owner_code = "PEN"/>
<#assign grade_code = "STD"/>
<#assign batch_1 = "STD"/>

View File

@@ -6,23 +6,4 @@
<#return (datetimeUTC)>
</#function>
<#-- --------------------------------------------------------------------------------------- -->
<#-- Split email reflex into json array string -->
<#-- Example : splitemail "john.doe@hardis-group.com,; name@hardis-group.com" -->
<#-- return "["john.doe@hardis-group.com","name@hardis-group.com"]" -->
<#-- --------------------------------------------------------------------------------------- -->
<#function splitEmailsIntoArray emails >
<#local str = "[">
<#list emails?split(";|,| |à|/","r")?filter(l -> l != "") as email>
<#if email?matches("^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$")>
<#if str != "[">
<#local str += ",">
</#if>
<#local str += "\"">
<#local str += email>
<#local str += "\"">
</#if>
</#list>
<#local str += "]">
<#return (str)>
</#function>

View File

@@ -1 +1 @@
1.2.12+2
1.2.4+1