Compare commits

..

1 Commits

Author SHA1 Message Date
201e58ed16 Release 1.3.0+1 2024-03-11 17:12:46 +01:00
32 changed files with 354 additions and 514 deletions

View File

@@ -27,9 +27,7 @@
<#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) > <#if (stock.priority_date!="") && (stock.priority_date?starts_with("00")== false) >
"PriorityDate" : "${priority_date}", "PriorityDate" : "${priority_date}",
<#else> </#if>
"PriorityDate": "1970-01-01T00:00:00Z",
</#if>
<#-- Segmentation keys inclusion --> <#-- Segmentation keys inclusion -->
<#include "RFXtoRP_HfDtlStockLs_StockSnapshotted_SegmentationKeys.ftl"> <#include "RFXtoRP_HfDtlStockLs_StockSnapshotted_SegmentationKeys.ftl">

View File

@@ -29,12 +29,7 @@
"StreetAddressTwo" : "${carrier.carrier_structured_address.additionnal_data?json_string}", "StreetAddressTwo" : "${carrier.carrier_structured_address.additionnal_data?json_string}",
"PostalCode" : "${carrier.carrier_structured_address.postal_code?json_string}", "PostalCode" : "${carrier.carrier_structured_address.postal_code?json_string}",
"City" : "${carrier.carrier_structured_address.post_code_area_name?json_string}", "City" : "${carrier.carrier_structured_address.post_code_area_name?json_string}",
<#assign isCountryCode = JsonUtil.isCountryCode(carrier.carrier_structured_address.country_code?upper_case) /> "CountryCode" : "${carrier.carrier_structured_address.country_code?json_string}",
<#if isCountryCode>
"CountryCode" : "${carrier.carrier_structured_address.country_code?upper_case?json_string}",
<#else>
"CountryCode" : "",
</#if>
"ProvinceCode": "${carrier.carrier_structured_address.territorial_div_code?json_string}", "ProvinceCode": "${carrier.carrier_structured_address.territorial_div_code?json_string}",
"State": "${carrier.carrier_structured_address.country_designation?json_string}" "State": "${carrier.carrier_structured_address.country_designation?json_string}"

View File

@@ -29,12 +29,7 @@
"StreetAddressTwo" : "${actor.consignee_structured_address.additionnal_data?json_string}", "StreetAddressTwo" : "${actor.consignee_structured_address.additionnal_data?json_string}",
"PostalCode" : "${actor.consignee_structured_address.postal_code?json_string}", "PostalCode" : "${actor.consignee_structured_address.postal_code?json_string}",
"City" : "${actor.consignee_structured_address.post_code_area_name?json_string}", "City" : "${actor.consignee_structured_address.post_code_area_name?json_string}",
<#assign isCountryCode = JsonUtil.isCountryCode(actor.consignee_structured_address.country_code?upper_case) /> "CountryCode" : "${actor.consignee_structured_address.country_code?json_string}",
<#if isCountryCode>
"CountryCode" : "${actor.consignee_structured_address.country_code?upper_case?json_string}",
<#else>
"CountryCode" : "",
</#if>
"ProvinceCode": "${actor.consignee_structured_address.territorial_div_code?json_string}", "ProvinceCode": "${actor.consignee_structured_address.territorial_div_code?json_string}",
"State": "${actor.consignee_structured_address.country_designation?json_string}" "State": "${actor.consignee_structured_address.country_designation?json_string}"

View File

@@ -12,53 +12,49 @@
<#assign reflexMvtStockInterface = JsonUtil.jsonToMap(dataRfx)> <#assign reflexMvtStockInterface = JsonUtil.jsonToMap(dataRfx)>
<#-- exclusion of the cases of an IPG move with quantity = 0 (weight modification) --> <#-- exclusion of the cases of an IPG move with quantity = 0 (weight modification) -->
<#if reflexMvtStockInterface.ipg_move_quantity_in_base_lvs != 0> <#if reflexMvtStockInterface.ipg_move_quantity_in_base_lvs != 0>
<#-- IPG moves translated into Stock moves -->
<#if reflexMvtStockInterface.ipg_move_type == "130" || <#-- IPG moves translated into Stock moves -->
reflexMvtStockInterface.ipg_move_type == "200" || <#if reflexMvtStockInterface.ipg_move_type == "130" ||
reflexMvtStockInterface.ipg_move_type == "210" || reflexMvtStockInterface.ipg_move_type == "200" ||
reflexMvtStockInterface.ipg_move_type == "220" || reflexMvtStockInterface.ipg_move_type == "210" ||
reflexMvtStockInterface.ipg_move_type == "230" || reflexMvtStockInterface.ipg_move_type == "220" ||
reflexMvtStockInterface.ipg_move_type == "240" || reflexMvtStockInterface.ipg_move_type == "230" ||
reflexMvtStockInterface.ipg_move_type == "260" || reflexMvtStockInterface.ipg_move_type == "240" ||
reflexMvtStockInterface.ipg_move_type == "290" || reflexMvtStockInterface.ipg_move_type == "260" ||
reflexMvtStockInterface.ipg_move_type == "300" || reflexMvtStockInterface.ipg_move_type == "290" ||
reflexMvtStockInterface.ipg_move_type == "350" || reflexMvtStockInterface.ipg_move_type == "300" ||
reflexMvtStockInterface.ipg_move_type == "370" || reflexMvtStockInterface.ipg_move_type == "400" ||
reflexMvtStockInterface.ipg_move_type == "400" || reflexMvtStockInterface.ipg_move_type == "410" ||
reflexMvtStockInterface.ipg_move_type == "410" || reflexMvtStockInterface.ipg_move_type == "420"
reflexMvtStockInterface.ipg_move_type == "420" >
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.StockMoved>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaIpgMove_StockMoved.ftl">
}
]
<#else>
<#-- IPG moves translated into goods received (all type of receipt) -->
<#if reflexMvtStockInterface.ipg_move_type == "100" ||
reflexMvtStockInterface.ipg_move_type == "110" ||
reflexMvtStockInterface.ipg_move_type == "120"
> >
[ [
{ {
<#assign apiReflexPlatformID = ApiReflexPlatformID.MovementCreated> <#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsReceived>
"apiReflexPlatformID" : "${apiReflexPlatformID}", "apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" : "datas" :
<#include "RFXtoRP_HsaIpgMove_StockMoved.ftl"> <#include "RFXtoRP_HsaIpgMove_GoodsReceived.ftl">
} }
] ]
<#else> <#else>
<#-- IPG moves translated into goods received (all type of receipt) --> <#-- Case of IPG move type volontarilly ignored-->
<#if (reflexMvtStockInterface.ipg_move_type == "100" || <#stop>
reflexMvtStockInterface.ipg_move_type == "110" || </#if>
reflexMvtStockInterface.ipg_move_type == "120") >
<#if reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!="">
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsReceived>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaIpgMove_GoodsReceived.ftl">
}
]
<#else>
<#-- Case of IPG move type volontarilly ignored-->
<#stop " Reference receipt is empty">
</#if>
<#else>
<#stop>
</#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)-->

View File

@@ -20,11 +20,7 @@
"Goods": { "Goods": {
"ItemID": "${reflexMvtStockInterface.item_code?trim?json_string}", "ItemID": "${reflexMvtStockInterface.item_code?trim?json_string}",
"LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}", "LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}",
<#if (priority_date!="") && (priority_date?starts_with("00")== false) > "PriorityDate": "${priority_date}",
"PriorityDate": "${priority_date}",
<#else>
"PriorityDate": "1970-01-01T00:00:00Z",
</#if>
<#-- Goods received Segmentation Keys inclusion --> <#-- Goods received Segmentation Keys inclusion -->
<#include "RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl"> <#include "RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl">

View File

@@ -10,8 +10,6 @@
"260":"STOCK_MOVEMENT_TYPE_REQUALIFICATION", "260":"STOCK_MOVEMENT_TYPE_REQUALIFICATION",
"290":"STOCK_MOVEMENT_TYPE_REQUALIFICATION", "290":"STOCK_MOVEMENT_TYPE_REQUALIFICATION",
"300":"STOCK_MOVEMENT_TYPE_REQUALIFICATION", "300":"STOCK_MOVEMENT_TYPE_REQUALIFICATION",
"350":"STOCK_MOVEMENT_TYPE_USE_OF_GOODS",
"370":"STOCK_MOVEMENT_TYPE_USE_OF_GOODS",
"400":"STOCK_MOVEMENT_TYPE_FIX", "400":"STOCK_MOVEMENT_TYPE_FIX",
"410":"STOCK_MOVEMENT_TYPE_FIX", "410":"STOCK_MOVEMENT_TYPE_FIX",
"420":"STOCK_MOVEMENT_TYPE_REQUALIFICATION"}> "420":"STOCK_MOVEMENT_TYPE_REQUALIFICATION"}>
@@ -26,11 +24,7 @@
"Payload": { "Payload": {
"Goods": { "Goods": {
"ItemID": "${reflexMvtStockInterface.item_code?trim?json_string}", "ItemID": "${reflexMvtStockInterface.item_code?trim?json_string}",
<#if (reflexMvtStockInterface.ipg_priority_date!="") && (reflexMvtStockInterface.ipg_priority_date?starts_with("00")== false) > "PriorityDate": "${ipg_priority_datetime}",
"PriorityDate": "${ipg_priority_datetime}",
<#else>
"PriorityDate": "1970-01-01T00:00:00Z",
</#if>
<#-- Segmentation keys inclusions --> <#-- Segmentation keys inclusions -->
<#include "RFXtoRP_HsaIpgMove_StockMoved_SegmentationKeys.ftl">, <#include "RFXtoRP_HsaIpgMove_StockMoved_SegmentationKeys.ftl">,

View File

@@ -16,8 +16,8 @@
"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?json_string!""}",
"Value": "${(id.logistical_variant_ID_code!"")?json_string}" "Value": "${id.logistical_variant_ID_code?json_string!""}"
}<#sep>,</#sep> }<#sep>,</#sep>
</#list> </#list>
], ],

View File

@@ -39,8 +39,8 @@
"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?json_string!""}",
"Value": "${(id.logistical_variant_ID_code!"")?json_string}" "Value": "${id.logistical_variant_ID_code?json_string!""}"
}<#sep>,</#sep> }<#sep>,</#sep>
</#list> </#list>
], ],

View File

@@ -17,55 +17,51 @@
<#assign preparationStatusInterface = JsonUtil.jsonToMap(dataRfx) /> <#assign preparationStatusInterface = JsonUtil.jsonToMap(dataRfx) />
[ [
<#--**Pick batch runned (200) **--> <#--**Pick batch runned (200) **-->
<#if preparationStatusInterface.preparation_order_originator_reference?? && preparationStatusInterface.preparation_order_originator_reference!=""> <#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "200" >
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "200" > {
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationExpected>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaProStatus_PreparationExpected.ftl">
}
<#else>
<#-- ** Collection started (300) and Preparation in progress (400)** -->
<#if preparationStatusInterface.preparation_status_type == "100" && (preparationStatusInterface.preparation_status_code == "300" || preparationStatusInterface.preparation_status_code == "400") >
{ {
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationExpected> <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationStarted>
"apiReflexPlatformID" : "${apiReflexPlatformID}", "apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" : "datas" :
<#include "RFXtoRP_HsaProStatus_PreparationExpected.ftl"> <#include "RFXtoRP_HsaProStatus_PreparationStarted.ftl">
} }
<#else> <#else>
<#-- ** Collection started (300) and Preparation in progress (400)** --> <#-- ****Preparation dispatched (600)** -->
<#if preparationStatusInterface.preparation_status_type == "100" && (preparationStatusInterface.preparation_status_code == "300" || preparationStatusInterface.preparation_status_code == "400") > <#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "600" >
{ {
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationStarted> <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationCompleted>
"apiReflexPlatformID" : "${apiReflexPlatformID}", "apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" : "datas" :
<#include "RFXtoRP_HsaProStatus_PreparationStarted.ftl"> <#include "RFXtoRP_HsaProStatus_PreparationCompleted.ftl">
} },
<#else> {
<#-- ****Preparation dispatched (600)** --> <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowTransportStarted>
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "600" >
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationCompleted>
"apiReflexPlatformID" : "${apiReflexPlatformID}", "apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" : "datas" :
<#include "RFXtoRP_HsaProStatus_PreparationCompleted.ftl"> <#include "RFXtoRP_HsaProStatus_TransportStarted.ftl">
}, }
<#else>
<#-- ****Preparation cancelled (650)**** -->
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "650" >
{ {
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowTransportStarted> <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
"apiReflexPlatformID" : "${apiReflexPlatformID}", "apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" : "datas" :
<#include "RFXtoRP_HsaProStatus_TransportStarted.ftl"> <#include "RFXtoRP_HsaProStatus_ExecutionflowCancelled.ftl">
} }
<#else> <#else>
<#-- ****Preparation cancelled (650)**** --> <#stop>
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "650" >
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaProStatus_ExecutionflowCancelled.ftl">
}
<#else>
<#stop>
</#if>
</#if> </#if>
</#if> </#if>
</#if> </#if>
<#else>
<#stop "PRO reference is empty">
</#if> </#if>
] ]
<#break> <#break>

View File

@@ -28,12 +28,7 @@
"StreetAddressTwo" : "${actor.supplier_structured_address.additionnal_data?json_string}", "StreetAddressTwo" : "${actor.supplier_structured_address.additionnal_data?json_string}",
"PostalCode" : "${actor.supplier_structured_address.postal_code?json_string}", "PostalCode" : "${actor.supplier_structured_address.postal_code?json_string}",
"City" : "${actor.supplier_structured_address.post_code_area_name?json_string}", "City" : "${actor.supplier_structured_address.post_code_area_name?json_string}",
<#assign isCountryCode = JsonUtil.isCountryCode(actor.supplier_structured_address.country_code?upper_case) /> "CountryCode" : "${actor.supplier_structured_address.country_code?json_string}",
<#if isCountryCode>
"CountryCode" : "${actor.supplier_structured_address.country_code?upper_case?json_string}",
<#else>
"CountryCode" : "",
</#if>
"ProvinceCode": "${actor.supplier_structured_address.territorial_div_code?json_string}", "ProvinceCode": "${actor.supplier_structured_address.territorial_div_code?json_string}",
"State": "${actor.supplier_structured_address.country_designation?json_string}" "State": "${actor.supplier_structured_address.country_designation?json_string}"

View File

@@ -28,12 +28,7 @@
"StreetAddressTwo" : "${depot.physical_depot_structured_address.additionnal_data?json_string}", "StreetAddressTwo" : "${depot.physical_depot_structured_address.additionnal_data?json_string}",
"PostalCode" : "${depot.physical_depot_structured_address.postal_code?json_string}", "PostalCode" : "${depot.physical_depot_structured_address.postal_code?json_string}",
"City" : "${depot.physical_depot_structured_address.post_code_area_name?json_string}", "City" : "${depot.physical_depot_structured_address.post_code_area_name?json_string}",
<#assign isCountryCode = JsonUtil.isCountryCode(depot.physical_depot_structured_address.country_code?upper_case) /> "CountryCode" : "${depot.physical_depot_structured_address.country_code?json_string}",
<#if isCountryCode >
"CountryCode" : "${depot.physical_depot_structured_address.country_code?upper_case?json_string}",
<#else>
"CountryCode" : "",
</#if>
"ProvinceCode": "${depot.physical_depot_structured_address.territorial_div_code?json_string}", "ProvinceCode": "${depot.physical_depot_structured_address.territorial_div_code?json_string}",
"State": "${depot.physical_depot_structured_address.country_designation?json_string}" "State": "${depot.physical_depot_structured_address.country_designation?json_string}"

View File

@@ -2,7 +2,7 @@
<#-- input : message RFX --> <#-- input : message RFX -->
<#-- project : projectId in ReflexPlatform --> <#-- project : projectId in ReflexPlatform -->
<#-- organisation : organisationtId in ReflexPlatform --> <#-- organisation : organisationtId in ReflexPlatform -->
<#include "ReflexUtils.ftl">
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project> <#assign projectRP = project>
<#assign organisationRP = organisation> <#assign organisationRP = organisation>
@@ -16,75 +16,75 @@
<#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> <#if preparationOrder.total_lv_validated !=0>
[ [
{ {
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsPrepared> <#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsPrepared>
"apiReflexPlatformID" : "${apiReflexPlatformID}", "apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" : "datas" :
<#include "RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl"> <#include "RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl">
}, },
{ {
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl">
}
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched> <#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" >
"apiReflexPlatformID" : "${apiReflexPlatformID}", ,
"datas" : {
<#include "RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl"> <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCarrierUpdated>
} "apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_CarrierUpdated.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.OrderCarrierUpdated>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl">
}
</#if>
<#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!=""> <#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.ExecutionflowCarrierUpdated> ,
"apiReflexPlatformID" : "${apiReflexPlatformID}", {
"datas" : <#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled>
<#include "RFXtoRP_HsrPrepa_CarrierUpdated.ftl"> "apiReflexPlatformID" : "${apiReflexPlatformID}",
}, "datas" :
{ <#include "RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl">
<#assign apiReflexPlatformID = ApiReflexPlatformID.OrderCarrierUpdated> }
"apiReflexPlatformID" : "${apiReflexPlatformID}", </#if>
"datas" : <#if despatched_ipg.carton_number != "000000000000000000" && despatched_ipg.carton_number!=despatched_ipg.hd_number >
<#include "RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl"> ,
} {
</#if> <#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitHUsAdded>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_HandlingunitHUsAdded.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl">
}
</#if>
<#assign refIDHmap ={}>
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") as preparation_line>
<#list preparation_line.despatched_ipg_list as despatched_ipg>
<#assign HUadded_packing_datetime = RfxDateTimetoUTC(preparation_line.confirmation_datetime,time_zone_offset_rfx) />
<#if despatched_ipg.consignment_unit_id!="">
,
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl">
}
</#if>
<#if despatched_ipg.carton_number != "000000000000000000" && despatched_ipg.carton_number!=despatched_ipg.hd_number >
,
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitHUsAdded>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_HandlingunitHUsAdded.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl">
}
</#if>
</#list>
</#list> </#list>
<#assign refIDHmap ={}> <#-- <#sep>,</#sep> -->
] </#list>
<#else>
<#stop "no confirmed quantity for the preparation - preparation closed">
</#if>
]
<#else>
<#stop "no confirmed quantity for the preparation - preparation closed">
</#if>
<#break> <#break>
<#case "D"> <#case "D">
<#-- *********************************************** Action = DELETE ******************** --> <#-- *********************************************** Action = DELETE ******************** -->

View File

@@ -1,33 +1,23 @@
<#include "HfRpConfig.ftl"> <#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl"> <#include "ReflexUtils.ftl">
[ [
<#assign refIDHmap_local ={}>
<#list preparationOrder.preparation_line_lst?filter(l ->l.preparation_order_originator_reference!="") as preparation_line> {
<#assign OrderOriginReference = preparation_line.preparation_order_originator_reference?trim?json_string> "Header": {
<#if !refIDHmap_local[OrderOriginReference]?? > "ProjectID": "${projectRP}"
<#if refIDHmap_local?size != 0 > },
, "ID":{
</#if> "RefID": "${preparationOrder.preparation_line_lst[0].preparation_order_originator_reference?trim?json_string}"
<#assign refIDHmap_local +={OrderOriginReference,OrderOriginReference}> },
{ "Payload":{
"Header": { "Carrier": {
"ProjectID": "${projectRP}" "ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}"
},
"ID":{
"RefID": "${OrderOriginReference}"
},
"Payload":{
"Carrier": {
"ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}"
}
<#-- Add transport grade code
<#if preparationOrder.transport_grade_code!="">
,
"CarrierService":"${preparationOrder.transport_grade_code?trim?json_string}"
</#if> -->
} }
} <#-- Add transport grade code
</#if> <#if preparationOrder.transport_grade_code!="">
</#list> ,
<#assign refIDHmap_local ={}> "CarrierService":"${preparationOrder.transport_grade_code?trim?json_string}"
</#if> -->
}
}
] ]

View File

@@ -1,29 +1,23 @@
<#include "HfRpConfig.ftl"> <#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl"> <#include "ReflexUtils.ftl">
[ [
<#assign dispatched3_datetime = RfxDateTimetoUTC(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_offset_rfx) /> <#assign dispatched_datetime = RfxDateTimetoUTC(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_offset_rfx) />
<#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_line3> <#list preparation_line.despatched_ipg_list as despatched_ipg>
<#list preparation_line3.despatched_ipg_list?filter(j ->j.carton_number!="000000000000000000") as despatched_ipg3> {
<#if !refIDHmap[despatched_ipg3.carton_number]?? > "Header": {
<#if refIDHmap?size != 0 > "ProjectID": "${projectRP}"
, },
</#if> "ID": {
<#assign refIDHmap += {despatched_ipg3.carton_number,despatched_ipg3.carton_number}> "RefID": "${despatched_ipg.carton_number}",
{ "RefDate": {
"Header": { "DateTime": "${dispatched_datetime}",
"ProjectID": "${projectRP}" "AuthorTimeZone": "${time_zone_rfx}"
}, }
"ID": { },
"RefID": "${despatched_ipg3.carton_number}", "Payload": { }
"RefDate": { }<#sep>,</#sep>
"DateTime": "${dispatched3_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"
}
},
"Payload": { }
}
</#if>
</#list> </#list>
<#sep>,</#sep>
</#list> </#list>
] ]

View File

@@ -1,9 +0,0 @@
<#-- use protobuf of class HsrPrepa to find Reflex WMS fields names -->
<#--
"MetaData" :[
]
-->
"MetaData": [ ]

View File

@@ -2,27 +2,22 @@
<#include "ReflexUtils.ftl"> <#include "ReflexUtils.ftl">
[ [
<#assign dispatched_datetime = RfxDateTimetoUTC(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_offset_rfx) /> <#assign dispatched_datetime = RfxDateTimetoUTC(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_offset_rfx) />
<#assign refIDHmap_local ={}> <#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?? && l.preparation_order_originator_reference!="") as preparation_line>
<#list preparation_line.despatched_ipg_list as despatched_ipg> <#list preparation_line.despatched_ipg_list as despatched_ipg>
<#if !refIDHmap_local[despatched_ipg.hd_number]?? > {
<#if refIDHmap_local?size != 0 > "Header": {
, "ProjectID": "${projectRP}"
</#if> },
<#assign refIDHmap_local +={despatched_ipg.hd_number,despatched_ipg.hd_number}> "ID": {
{ "RefID": "${despatched_ipg.hd_number}",
"Header": {"ProjectID": "${projectRP}"}, "RefDate": {
"ID": { "DateTime": "${dispatched_datetime}",
"RefID": "${despatched_ipg.hd_number}", "AuthorTimeZone": "${time_zone_rfx}"
"RefDate": { }
"DateTime": "${dispatched_datetime}", },
"AuthorTimeZone": "${time_zone_rfx}" "Payload": { }
} }<#sep>,</#sep>
}, </#list>
"Payload": { } <#sep>,</#sep>
}
</#if>
</#list>
</#list> </#list>
<#assign refIDHmap_local ={}>
] ]

View File

@@ -1,17 +1,13 @@
<#include "HfRpConfig.ftl"> <#include "HfRpConfig.ftl">
[ [
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") 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>
<#assign packing_datetime = RfxDateTimetoUTC(preparation_line.confirmation_datetime,time_zone_offset_rfx) />
{ {
"Header": { "Header": {
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"ID": { "ID": {
"RefDate": {
"AuthorTimeZone": "${time_zone_rfx}",
"DateTime": "${packing_datetime}"
},
<#if despatched_ipg.carton_number != "000000000000000000"> <#if despatched_ipg.carton_number != "000000000000000000">
"RefID": "${despatched_ipg.carton_number}" "RefID": "${despatched_ipg.carton_number}"
<#else> <#else>
@@ -22,9 +18,9 @@
"Payload": { "Payload": {
"Information" :{ "Information" :{
<#if despatched_ipg.carton_number != "000000000000000000"> <#if despatched_ipg.carton_number != "000000000000000000">
"ContainerType": "${despatched_ipg.carton_type_code?json_string}" "ContainerType": "${despatched_ipg.carton_type_code}"
<#if preparation_line.despatched_cartons_list?? > <#if preparation_line.despatched_cartons_list?? >
<#list preparation_line.despatched_cartons_list?filter(l -> l?? && l.carton_number==despatched_ipg.carton_number) as dimensionCarton> <#list preparation_line.despatched_cartons_list?filter(l ->l.carton_number==despatched_ipg.carton_number) as dimensionCarton>
, ,
"Length": { "Length": {
"Unit": "${length_unit_rfx}", "Unit": "${length_unit_rfx}",
@@ -47,7 +43,7 @@
<#else> <#else>
"ContainerType": "${despatched_ipg.hd_type_code?json_string}" "ContainerType": "${despatched_ipg.hd_type_code?json_string}"
<#if preparation_line.despatched_hds_list??> <#if preparation_line.despatched_hds_list??>
<#list preparation_line.despatched_hds_list?filter(j -> j?? && j.handling_device_number==despatched_ipg.hd_number) as dimensionHU> <#list preparation_line.despatched_hds_list?filter(j ->j.handling_device_number==despatched_ipg.hd_number) as dimensionHU>
, ,
"Length": { "Length": {
"Unit": "${length_unit_rfx}", "Unit": "${length_unit_rfx}",

View File

@@ -1,22 +1,19 @@
<#include "HfRpConfig.ftl"> <#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl"> <#include "ReflexUtils.ftl">
[ [
{ {
"Header": { "Header": {
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"ID": { "ID": {
"RefDate": {
"AuthorTimeZone": "${time_zone_rfx}",
"DateTime": "${HUadded_packing_datetime}"
},
"RefID": "${despatched_ipg.hd_number}" "RefID": "${despatched_ipg.hd_number}"
}, },
"Payload": { "Payload": {
"IncludedHandlingunitIDs": [ "${despatched_ipg.carton_number}" ] "IncludedHandlingunitIDs": [ "${despatched_ipg.carton_number}" ]
<#if preparation_line.despatched_hds_list?? && preparation_line.despatched_hds_list[0]??> <#if preparation_line.despatched_hds_list?? >
, ,
"Information": { "Information": {
"ContainerType": "${preparation_line.despatched_hds_list[0].hd_type_code}", "ContainerType": "${preparation_line.despatched_hds_list[0].hd_type_code}",
@@ -33,10 +30,7 @@
"Value": ${preparation_line.despatched_hds_list[0].hd_type_width} "Value": ${preparation_line.despatched_hds_list[0].hd_type_width}
} }
} }
</#if>, </#if>
<#-- HU Metadata inclusin inclusion -->
<#include "RFXtoRP_HsrPrepa_HUsAdded_Metadata.ftl">
} }
} }

View File

@@ -1,28 +1,18 @@
<#include "HfRpConfig.ftl"> <#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl"> <#include "ReflexUtils.ftl">
[ [
<#assign refIDHmap_local ={}>
<#list preparationOrder.preparation_line_lst?filter(l ->l.preparation_order_originator_reference!="") as preparation_line> {
<#assign OrderOriginReference = preparation_line.preparation_order_originator_reference?trim?json_string> "Header": {
<#if !refIDHmap_local[OrderOriginReference]?? > "ProjectID": "${projectRP}"
<#if refIDHmap_local?size != 0 > },
, "ID":{
</#if> "RefID": "${preparationOrder.preparation_line_lst[0].preparation_order_originator_reference?trim?json_string}"
<#assign refIDHmap_local +={OrderOriginReference,OrderOriginReference}> },
{ "Payload":{
"Header": { "Carrier": {
"ProjectID": "${projectRP}" "ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}"
},
"ID":{
"RefID": "${OrderOriginReference}"
},
"Payload":{
"Carrier": {
"ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}"
}
} }
} }
</#if> }
</#list>
<#assign refIDHmap_local ={}>
] ]

View File

@@ -16,18 +16,16 @@
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)> <#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
[ [
{
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!=""> <#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 preparation_order.preparation_type_code == "010" || preparation_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 preparation_order.preparation_order_confirmed == "false" >
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected> <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
"apiReflexPlatformID" : "${apiReflexPlatformID}", "apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" : "datas" :
<#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl"> <#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl">
}
<#else> <#else>
<#stop "preparation order already confirmed"> <#stop "preparation order already confirmed">
</#if> </#if>
@@ -38,7 +36,7 @@
<#else> <#else>
<#stop "PRO reference is empty"> <#stop "PRO reference is empty">
</#if> </#if>
}
] ]
<#break> <#break>
@@ -48,16 +46,12 @@
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)> <#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
[ [
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!=""> {
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled> <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
"apiReflexPlatformID" : "${apiReflexPlatformID}", "apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" : "datas" :
<#include "RFXtoRP_HsrPro_ExecutionflowCancelled.ftl"> <#include "RFXtoRP_HsrPro_ExecutionflowCancelled.ftl">
} }
<#else>
<#stop "PRO reference is empty">
</#if>
] ]
<#break> <#break>

View File

@@ -52,23 +52,23 @@
<#else> <#else>
"Actor": "Actor":
{ {
"Name" : "${(preparation_order.address.name_or_company_name!"")?json_string}", "Name" : "${preparation_order.address.name_or_company_name?json_string!""}",
"Address" : "Address" :
{ {
"City" : "${(preparation_order.address.post_code_area_name!"")?json_string}", "City" : "${preparation_order.address.post_code_area_name?json_string!""}",
"CountryCode" : "${preparation_order.address.iso_country_code!""}", "CountryCode" : "${preparation_order.address.iso_country_code!""}",
"PostalCode" : "${preparation_order.address.postal_code!""}", "PostalCode" : "${preparation_order.address.postal_code!""}",
"StreetAddressOne" : "${(preparation_order.address.street_and_number_and_po_box!"")?json_string}", "StreetAddressOne" : "${preparation_order.address.street_and_number_and_po_box?json_string!""}",
"StreetAddressTwo" : "${(preparation_order.address.additional_address_data_1!"")?json_string}", "StreetAddressTwo" : "${preparation_order.address.additional_address_data_1?json_string!""}",
"StreetAddressThree" : "${(preparation_order.address.additional_address_data_2!"")?json_string}" "StreetAddressThree" : "${preparation_order.address.additional_address_data_2?json_string!""}"
} }
}, },
"Contact" : "Contact" :
{ {
"FirstName" : "${(preparation_order.address.first_name!"")?json_string}", "FirstName" : "${preparation_order.address.first_name?json_string!""}",
"LastName" : "${(preparation_order.address.last_name!"")?json_string}", "LastName" : "${preparation_order.address.last_name?json_string!""}",
"Emails" : ${splitEmailsIntoArray((preparation_order.address.mail_address!"")?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}" ] "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!""}" ]
} }
</#if> </#if>
}, },

View File

@@ -45,34 +45,31 @@
<#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_confirmed == "true" >
<#if receipt.receipt_confirmed == "true" > {
{ <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted>
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted> "apiReflexPlatformID" : "${apiReflexPlatformID}",
"apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" :
"datas" : <#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl">
<#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl"> }
}
<#else>
<#if receipt.receipt_type = "030">
<#stop "ignored message because receipt type = transfert">
<#else>
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
}
</#if>
</#if>
<#else> <#else>
<#stop "Receipt reference is empty"> <#if receipt.receipt_type = "030">
<#stop "ignored message because receipt type = transfert">
<#else>
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
}
</#if>
</#if> </#if>
] ]
<#break> <#break>
@@ -82,17 +79,14 @@
<#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!=""> {
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled> <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
"apiReflexPlatformID" : "${apiReflexPlatformID}", "apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" : "datas" :
<#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl"> <#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl">
}
<#else> }
<#stop "Receipt reference is empty">
</#if>
] ]
<#break> <#break>

View File

@@ -51,16 +51,13 @@
{ {
"ItemID": "${line.item_code?trim?json_string!"0"}", "ItemID": "${line.item_code?trim?json_string!"0"}",
"LVBranchID": "${line.item_lv_code?json_string!"0"}", "LVBranchID": "${line.item_lv_code?json_string!"0"}",
<#if (line.line_without_detail?? && line.line_without_detail.priority_date?length != 0) && (line.line_without_detail.priority_date?starts_with("00") == false)> <#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 /> <#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>
<#else> <#else>
<#if (line.line_detail?? && line.line_detail?size == 1 && line.line_detail[0].priority_date?length != 0) && (line.line_detail[0].priority_date?starts_with("00") == false)> <#stop >
<#assign line_detail_priority_date = line.line_detail[0].priority_date?datetime(rfx_date_format_default)?iso_utc />
"PriorityDate": "${line_detail_priority_date}",
<#else>
"PriorityDate": "1970-01-01T00:00:00Z",
</#if>
</#if> </#if>
<#-- Segmentation Keys inclusion --> <#-- Segmentation Keys inclusion -->
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl"> <#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl">

View File

@@ -4,7 +4,7 @@
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"ID": { "ID": {
"RefID": "${id.refid?json_string}" "RefID": "${id.refid}"
}, },
"Payload": { "Payload": {

View File

@@ -4,7 +4,7 @@
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"ID": { "ID": {
"RefID": "${id.refid?json_string}" "RefID": "${id.refid}"
}, },
"Payload": { "Payload": {

View File

@@ -28,33 +28,22 @@
<#include "RFXtoRP_PrepOrder_ShipFromAcked.ftl"> <#include "RFXtoRP_PrepOrder_ShipFromAcked.ftl">
} }
] ]
<#else> <#else>
<#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "WARN"> [
[ {
{ <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipFromAcked> <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
"apiReflexPlatformID" : "${apiReflexPlatformID}", "apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" : "datas" :
<#include "RFXtoRP_PrepOrder_ShipFromAcked.ftl"> <#include "RFXtoRP_PlatformLogCreate.ftl">
} },
] {
<#else> <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
[ "apiReflexPlatformID" : "${apiReflexPlatformID}",
{ "datas" :
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> <#include "RFXtoRP_RestResponseAllocationError.ftl">
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> }
"apiReflexPlatformID" : "${apiReflexPlatformID}", ]
"datas" :
<#include "RFXtoRP_PlatformLogCreate.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_RestResponseAllocationError.ftl">
}
]
</#if>
</#if> </#if>
<#break> <#break>
<#default> <#default>

View File

@@ -2,8 +2,6 @@
<#-- input : message RFX --> <#-- input : message RFX -->
<#-- project : projectId in ReflexPlatform --> <#-- project : projectId in ReflexPlatform -->
<#-- organisation : organisationtId in ReflexPlatform --> <#-- organisation : organisationtId in ReflexPlatform -->
<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
<#assign eventRP = JsonUtil.jsonToMap(input)> <#assign eventRP = JsonUtil.jsonToMap(input)>
<#assign projectRP = project> <#assign projectRP = project>

View File

@@ -1,21 +1,10 @@
<#include "RPtoRFX_PrepOrder_DefaultHeaderData.ftl"> <#include "RPtoRFX_PrepOrder_DefaultHeaderData.ftl">
<#-- Valeurs par défaut Adresse -->
<#-- Default values --> <#assign aDateTime = .now>
<#assign typecode ="010">
<#assign titlecode ="1">
<#assign contacttypecode ="010">
<#assign adresstypecode ="010">
<#-- Si vous utilisez des acteurs non référencés, il faudra créer un destinataire "VIZ" dans Reflex WMS pour utiliser cette fonctionnalité -->
<#-- If you are using unreferenced actors, you will need to create a "VIZ" consignee in Reflex WMS to use this feature -->
<#assign defaultactor ="VIZ">
<#if executionflow.ShipTo.ActorID?? && executionflow.ShipTo.ActorID!="">
<#assign actorID = executionflow.ShipTo.ActorID >
<#else>
<#assign actorID = defaultactor >
</#if>
{ {
"id" : {"refid" : "${executionflow.OrderID?json_string}"}, "id" : {"refid" : "${executionflow.OrderID}"},
"route" : "rest/public/v1/activities/{activity_code}/physical_depots/{physical_depot_code}/originators/{originator_code}/preparation_orders", "route" : "rest/public/v1/activities/{activity_code}/physical_depots/{physical_depot_code}/originators/{originator_code}/preparation_orders",
"method" : "POST", "method" : "POST",
"uri_substitutions": { "uri_substitutions": {
@@ -25,13 +14,13 @@
}, },
"payload" : "payload" :
{ {
"originator_reference": "${executionflow.OrderID?json_string}", "originator_reference": "${executionflow.OrderID}",
"preparation_type_code": "${preparation_type_code}", "preparation_type_code": "${preparation_type_code}",
"end_consignee_code": "${actorID}", "end_consignee_code": "${executionflow.ShipTo.ActorID!""}",
<#if executionflow.RequestedMilestones?? && executionflow.RequestedMilestones.RequestedDeliveryDateTime??> <#if executionflow.RequestedMilestones?? && executionflow.RequestedMilestones.RequestedDeliveryDateTime??>
"requested_delivery_start_datetime": "${DateTimeUTCtoRfxLocale(executionflow.RequestedMilestones.RequestedDeliveryDateTime.DateTime,time_zone_rfx)}", "requested_delivery_start_datetime": "${executionflow.RequestedMilestones.RequestedDeliveryDateTime.DateTime}",
<#else> <#else>
"requested_delivery_start_datetime": "${DateTimeUTCtoRfxLocale(.now?iso_utc?string,time_zone_rfx)}", "requested_delivery_start_datetime": "${aDateTime?iso_utc}",
</#if> </#if>
"requested_delivery_date_type": "${requested_delivery_date_type}", "requested_delivery_date_type": "${requested_delivery_date_type}",
"consolidated_delivery": "${consolidated_delivery_flag}", "consolidated_delivery": "${consolidated_delivery_flag}",
@@ -44,66 +33,53 @@
"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",
"load_grouping": "${load_grouping}" "load_grouping": "${load_grouping}"
} },
<#if actorID == defaultactor > <#if executionflow.ShipTo.ActorID == "">
, "address": {
"address": { "first_name": "${executionflow.ShipTo.Contact.FirstName!""?json_string}",
"type_code": "${typecode}", "last_name" :"${executionflow.ShipTo.Contact.Lastname!""?json_string}",
"title_code" : "${titlecode}", "mail_address": "${executionflow.ShipTo.Actor.Emails[0]!""}",
"contact_type_code" : "${contacttypecode}", "mobile_phone_number": "${executionflow.ShipTo.Actor.Phones[0]!""}",
"address_type_code" : "${adresstypecode}", "street_and_number_and_po_box": "${executionflow.ShipTo.Actor.Address.StreetAddressOne!""?json_string}",
"first_name": "${(executionflow.ShipTo.Contact.FirstName!"")?json_string}", "additional_address_data_1": "${executionflow.ShipTo.Actor.Address.StreetAddressTwo!""?json_string}",
"last_name" :"${(executionflow.ShipTo.Contact.LastName!"")?json_string}", "additional_address_data_2": "${executionflow.ShipTo.Actor.Address.StreetAddressThree!""?json_string}",
"name_or_company_name" : "${(executionflow.ShipTo.Contact.FirstName!"")?json_string} ${(executionflow.ShipTo.Contact.LastName!"")?json_string}", "postal_code": "${executionflow.ShipTo.Actor.Address.PostalCode!""}",
<#if executionflow.ShipTo.Contact.Emails?? && executionflow.ShipTo.Contact.Emails[0]!=""> "iso_country_code": "${executionflow.ShipTo.Actor.Address.CountryCode!""}"
"mail_address": "${executionflow.ShipTo.Contact.Emails[0]}", },
</#if>
<#if executionflow.ShipTo.Contact.Phones?? && executionflow.ShipTo.Contact.Phones[0]!="">
"mobile_phone_number": "${executionflow.ShipTo.Contact.Phones[0]}",
</#if>
"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!"")?json_string}",
"post_code_area_name" : "${(executionflow.ShipTo.Actor.Address.City!"")?json_string}",
"iso_country_code": "${(executionflow.ShipTo.Actor.Address.CountryCode!"")?json_string}"
}
</#if> </#if>
<#if executionflow.Lines??> <#if executionflow.Lines??>
, "line_list": [
"line_list": [ <#list executionflow.Lines as line>
<#list executionflow.Lines as line> <#-- ******* line MetaData and Segmentationkeys to maps ******** -->
<#-- ******* line MetaData and Segmentationkeys to maps ******** --> <#if line.MetaData??>
<#if line.MetaData??> <#assign Line_MetaData_Map = JsonUtil.sequenceToMap(line.MetaData, "Key", "Value") />
<#assign Line_MetaData_Map = JsonUtil.sequenceToMap(line.MetaData, "Key", "Value") /> </#if>
</#if> <#if line.RequestedContent.Goods.SegmentationKeys??>
<#if line.RequestedContent.Goods.SegmentationKeys??> <#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_PrepOrder_DefaultLineData.ftl">
<#include "RPtoRFX_PrepOrder_DefaultLineData.ftl"> {
{ "originator_reference_line_number": ${line.LineID?number},
"originator_reference_line_number": ${line.LineID?number}, "item_code": "${line.RequestedContent.Goods.ItemID!""}",
"item_code": "${line.RequestedContent.Goods.ItemID!""}", "item_lv_code": "${line.RequestedContent.Goods.LVBranchID!""}",
"item_lv_code": "${line.RequestedContent.Goods.LVBranchID!""}", "base_lv_quantity_to_prepare": ${line.RequestedMetrics.QuantityInBaseLV.Value!0},
"base_lv_quantity_to_prepare": ${line.RequestedMetrics.QuantityInBaseLV.Value!0}, "owner_code_to_prepare" :"${owner_code_to_prepare}",
"owner_code_to_prepare" :"${owner_code_to_prepare}", "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",
"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" -->
-->
} }<#sep>,</#sep>
<#sep>,</#sep> </#list>
</#list>
]
</#if> </#if>
]
} }
} }

View File

@@ -23,22 +23,8 @@
<#assign protected_flag ="false"/> <#assign protected_flag ="false"/>
<#assign automatic_generation_flag ="false"/> <#assign automatic_generation_flag ="false"/>
<#assign apt_with_end_consignee_flag="false"/> <#assign apt_with_end_consignee_flag="false"/>
<#assign load_grouping = "DEFAUT"/>
<#-- A supprimer si utilisation de la table de correspondance-->
<#--To be deleted if using the correspondence table-->
<#assign load_grouping = "default">
<#-- Table de correspondance Transporteur/Code regroupement chargement,
affectation à un chargement si paramétrage regroupement chargement+plan de base distribution-->
<#--Carrier / Load Grouping Code Correspondence Table,
Assigning to a load if you set up Load Grouping+Distribution Master Plan-->
<#-- Example -->
<#--<#if executionflow.Carrier.ActorID == "TEST" >
<#assign load_grouping = "TEST">
<#else>
<#assign load_grouping = "default">
</#if>-->

View File

@@ -1,7 +1,7 @@
<#include "RPtoRFX_Receipt_DefaultHeaderData.ftl"> <#include "RPtoRFX_Receipt_DefaultHeaderData.ftl">
<#assign aDateTime = .now>
{ {
"id" : {"refid" : "${executionflow.OrderID?json_string}"}, "id" : {"refid" : "${executionflow.OrderID}"},
"route" : "rest/public/v1/activities/{activity_code}/physical_depots/{physical_depot_code}/originators/{originator_code}/receipts", "route" : "rest/public/v1/activities/{activity_code}/physical_depots/{physical_depot_code}/originators/{originator_code}/receipts",
"method" : "POST", "method" : "POST",
"uri_substitutions": { "uri_substitutions": {
@@ -11,7 +11,7 @@
}, },
"payload" : "payload" :
{ {
"receipt_reference": "${executionflow.OrderID?json_string}", "receipt_reference": "${executionflow.OrderID}",
"receipt_type": "${receipt_type}", "receipt_type": "${receipt_type}",
"receipt_reason_code": "${receipt_reason_code}", "receipt_reason_code": "${receipt_reason_code}",
"work_mode_code" : "${work_mode_code}", "work_mode_code" : "${work_mode_code}",
@@ -19,16 +19,15 @@
"carrier_code" : "${executionflow.Carrier.ActorID!""}", "carrier_code" : "${executionflow.Carrier.ActorID!""}",
<#if executionflow.RequestedMilestones?? && executionflow.RequestedMilestones.RequestedDeliveryDateTime??> <#if executionflow.RequestedMilestones?? && executionflow.RequestedMilestones.RequestedDeliveryDateTime??>
"receipt_datetime": "${DateTimeUTCtoRfxLocale(executionflow.RequestedMilestones.RequestedDeliveryDateTime.DateTime,time_zone_rfx)}", "receipt_datetime": "${executionflow.RequestedMilestones.RequestedDeliveryDateTime.DateTime}",
<#else> <#else>
"receipt_datetime": "${DateTimeUTCtoRfxLocale(.now?iso_utc?string,time_zone_rfx)}", "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": 1,
<#if executionflow.Lines??> <#if executionflow.Lines??>
,
"line_list": [ "line_list": [
<#list executionflow.Lines as line> <#list executionflow.Lines as line>
@@ -63,5 +62,6 @@
</#list> </#list>
] ]
</#if> </#if>
} }
} }

View File

@@ -5,10 +5,6 @@
<#return ((rfxdatetime + offset)?datetime.iso?iso_utc)> <#return ((rfxdatetime + offset)?datetime.iso?iso_utc)>
</#function> </#function>
<#function DateTimeUTCtoRfxLocale dateutc locale >
<#return dateutc?datetime.iso?iso_nz(locale)>
</#function>
<#-- --------------------------------------------------------------------------------------- --> <#-- --------------------------------------------------------------------------------------- -->
<#-- Split email reflex into json array string --> <#-- Split email reflex into json array string -->
<#-- Example : splitemail "john.doe@hardis-group.com,; name@hardis-group.com" --> <#-- Example : splitemail "john.doe@hardis-group.com,; name@hardis-group.com" -->

View File

@@ -1 +1 @@
1.2.23+1 1.3.0+1