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": { "Goods": {
"ItemID": "${stock.item_code?trim?json_string}", "ItemID": "${stock.item_code}",
"LVBranchID": "${stock.item_logistical_variant_code}", "LVBranchID": "${stock.item_logistical_variant_code}",
<#assign priority_date = stock.priority_date?datetime(rfx_date_format_default)?iso_utc /> <#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}", "PriorityDate" : "${priority_date}",
</#if>
<#-- Segmentation keys inclusion --> <#-- Segmentation keys inclusion -->
<#include "RFXtoRP_HfDtlStockLs_StockSnapshotted_SegmentationKeys.ftl"> <#include "RFXtoRP_HfDtlStockLs_StockSnapshotted_SegmentationKeys.ftl">

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -10,16 +10,14 @@
<#assign aDateTime = .now> <#assign aDateTime = .now>
<#switch cloudEventMsg.action> <#switch cloudEventMsg.action>
<#case "C"> <#case "C">
<#--<#case "U"> <#--<#case "U">
<#-- *********************************************** Action = CREATE or UPDATE ******************** --> <#-- *********************************************** Action = CREATE or UPDATE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign preparationOrder = JsonUtil.jsonToMap(dataRfx)> <#assign preparationOrder = JsonUtil.jsonToMap(dataRfx)>
<#if preparationOrder.total_lv_validated !=0>
[ [
{ {
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsPrepared> <#assign apiReflexPlatformID = ApiReflexPlatformID.GoodsPrepared>
"apiReflexPlatformID" : "${apiReflexPlatformID}", "apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" : "datas" :
<#include "RFXtoRP_HsrPrepa_GoodsPrepared.ftl"> <#include "RFXtoRP_HsrPrepa_GoodsPrepared.ftl">
@@ -30,6 +28,7 @@
"datas" : "datas" :
<#include "RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl"> <#include "RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl">
} }
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list??) as preparation_line> <#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list??) as preparation_line>
<#list preparation_line.despatched_ipg_list as despatched_ipg> <#list preparation_line.despatched_ipg_list as despatched_ipg>
<#if despatched_ipg.consignment_unit_id != ""> <#if despatched_ipg.consignment_unit_id != "">
@@ -45,16 +44,15 @@
</#list> </#list>
</#list> </#list>
] ]
<#else> <#break>
<#stop "no confirmed quantity for the preparation - preparation closed">
</#if>
<#break> <#case "D">
<#case "D"> <#-- *********************************************** Action = DELETE ******************** -->
<#-- *********************************************** Action = DELETE ******************** --> <#stop "event not supported (Case D)">
<#stop "event not supported (Case D)"> <#break>
<#break>
<#default>
<#stop "event not supported"> <#default>
<#stop "event not supported">
</#switch> </#switch>

View File

@@ -30,34 +30,34 @@
"PreparedContents" :[ "PreparedContents" :[
{ {
"Goods": { "Goods": {
"ItemID": "${preparation_line.item_code?trim?json_string}", "ItemID": "${preparation_line.item_code}",
"LVBranchID": "${preparation_line.item_lv_code?json_string}", "LVBranchID": "${preparation_line.item_lv_code}",
<#if (despatched_ipg.ipg_manufacture_date?length != 0) && (despatched_ipg.ipg_manufacture_date?starts_with("00") == false)> <#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 /> <#assign priority_date = despatched_ipg.ipg_manufacture_date?datetime(rfx_date_format_default)?iso_utc />
"PriorityDate": "${priority_date}", "PriorityDate": "${priority_date}",
<#else> <#else>
<#if (despatched_ipg.ipg_receipt_date?length != 0) && (despatched_ipg.ipg_receipt_date?starts_with("00")== false)> <#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 /> <#assign priority_date = despatched_ipg.ipg_receipt_date?datetime(rfx_date_format_default)?iso_utc />
"PriorityDate": "${priority_date}", "PriorityDate": "${priority_date}",
<#else> <#else>
<#if (despatched_ipg.ipg_best_before_date?length != 0) && (despatched_ipg.ipg_best_before_date?starts_with("00")== false)> <#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 /> <#assign priority_date = despatched_ipg.ipg_best_before_date?datetime(rfx_date_format_default)?iso_utc />
"PriorityDate": "${priority_date}", "PriorityDate": "${priority_date}",
<#else> <#else>
<#if (despatched_ipg.ipg_sell_by_date?length != 0) && (despatched_ipg.ipg_sell_by_date?starts_with("00")== false)> <#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 /> <#assign priority_date = despatched_ipg.ipg_sell_by_date?datetime(rfx_date_format_default)?iso_utc />
"PriorityDate": "${priority_date}", "PriorityDate": "${priority_date}",
<#else> <#else>
<#if (despatched_ipg.ipg_use_by_date?length != 0) && (despatched_ipg.ipg_use_by_date?starts_with("00")== false)> <#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 /> <#assign priority_date = despatched_ipg.ipg_use_by_date?datetime(rfx_date_format_default)?iso_utc />
"PriorityDate": "${priority_date}", "PriorityDate": "${priority_date}",
<#else> <#else>
<#if (preparationOrder.stock_despatch_at_preparation_datetime?length != 0) && (preparationOrder.stock_despatch_at_preparation_datetime?starts_with("00")== false)> "PriorityDate": "error_date",
<#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>
</#if> </#if>
</#if> </#if>
</#if> </#if>
@@ -67,13 +67,9 @@
<#-- Segmentation Keys inclusion --> <#-- Segmentation Keys inclusion -->
<#include "RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl"> <#include "RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl">
}, },
"ExecutionflowID": "${preparation_line.preparation_order_originator_reference?trim?json_string}", "ExecutionflowID": "${preparation_line.preparation_order_originator_reference}",
<#if (preparation_line.pro_originator_reference_line_number!0) != 0> "LineID": "${preparation_line.pro_line_number}",
"LineID": "${preparation_line.pro_originator_reference_line_number}", "ActorID": "${preparationOrder.physical_depot_code}",
<#else>
"LineID": "${preparation_line.pro_line_number!0}",
</#if>
"ActorID": "${preparationOrder.physical_depot_code?trim?json_string}",
"Quantity": { "Quantity": {
"LVID": "${quantity_in_base_lv_RP_Cst}", "LVID": "${quantity_in_base_lv_RP_Cst}",
"Value": ${despatched_ipg.quantity_lvs} "Value": ${despatched_ipg.quantity_lvs}

View File

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

View File

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

View File

@@ -1,13 +1,13 @@
<#include "HfRpConfig.ftl"> <#include "HfRpConfig.ftl">
<#include "ReflexUtils.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": { "Header": {
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"ID": { "ID": {
"RefID": "${preparation_order.originator_reference?trim?json_string}", "RefID": "${order.originator_reference}",
"RefDate": { "RefDate": {
"DateTime": "${preparation_status_datetime}", "DateTime": "${preparation_status_datetime}",
"AuthorTimeZone": "${time_zone_rfx}" "AuthorTimeZone": "${time_zone_rfx}"

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -3,14 +3,7 @@
<#-- How to use MD or SK map <#-- How to use MD or SK map
Example : Example :
<#assign owner_code_to_prepare = SegmentationKeys_Map["Owner"].String!""/> <#assign owner_code_to_prepare = SegmentationKeys_Map["Owner"]!""/>
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["myOwner"]!""/> <#assign owner_code_to_prepare = SegmentationKeys_Map["myOwner"]!""/>

View File

@@ -23,9 +23,12 @@
<#else> <#else>
"receipt_datetime": "${aDateTime?iso_utc}", "receipt_datetime": "${aDateTime?iso_utc}",
</#if> </#if>
<#--
"carrier_appointment_made": "false", "carrier_appointment_made": "false",
"receipt_in_cross_docking": "false", "receipt_in_cross_docking": "false",
"dock_occupation_duration": 1, "dock_occupation_duration": 10,
-->
<#if executionflow.Lines??> <#if executionflow.Lines??>
"line_list": [ "line_list": [
@@ -39,6 +42,7 @@
<#assign SegmentationKeys_Map = JsonUtil.sequenceToMap(line.RequestedContent.Goods.SegmentationKeys, "Key", "Value") /> <#assign SegmentationKeys_Map = JsonUtil.sequenceToMap(line.RequestedContent.Goods.SegmentationKeys, "Key", "Value") />
</#if> </#if>
<#include "RPtoRFX_Receipt_DefaultLineData.ftl"> <#include "RPtoRFX_Receipt_DefaultLineData.ftl">
{ {
"receipt_reference_line_no": ${line.LineID?number}, "receipt_reference_line_no": ${line.LineID?number},
"item_code": "${line.RequestedContent.Goods.ItemID!""}", "item_code": "${line.RequestedContent.Goods.ItemID!""}",
@@ -47,16 +51,19 @@
"owner_code": "${owner_code}", "owner_code": "${owner_code}",
"grade_code": "${grade_code}", "grade_code": "${grade_code}",
"batch_1": "${batch_1!""}", "batch_1": "${batch_1!""}",
<#--
"optional_attributes": { "optional_attributes": {
<#--"held_for_check": "false", "held_for_check": "false",
"held _for_repacking": "false", "held _for_repacking": "false",
"hold_code": "false", --> "hold_for_specific_code": "false",
"hold_for_specific_code": "false" "hold_code": "false"
} },
<#--"quality_control_attributes": { -->
"qcf_to_create_for_receipt_line": "false", "quality_control_attributes": {
<#--"qcf_to_create_for_receipt_line": "false",-->
"exclude_item_from_inspection": "false" "exclude_item_from_inspection": "false"
} --> }
}<#sep>,</#sep> }<#sep>,</#sep>
</#list> </#list>

View File

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

View File

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

View File

@@ -6,23 +6,4 @@
<#return (datetimeUTC)> <#return (datetimeUTC)>
</#function> </#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