Compare commits

...

10 Commits

Author SHA1 Message Date
779b37f88b Edit VERSION 2026-09-02 12:32:50 +00:00
6da49ba885 Edit VERSION 2026-09-02 09:54:53 +00:00
cd086049e4 Edit VERSION 2026-09-02 09:47:35 +00:00
045c471a97 Edit VERSION 2026-09-02 09:38:45 +00:00
ecaf4421a6 Edit VERSION 2026-09-02 09:19:07 +00:00
f5258cb504 SCPN1-11199 2026-09-01 17:27:47 +02:00
edeb9db5b9 SCPN1-11197 2026-09-01 15:23:25 +02:00
b24a45baef SCPN1-11046 2026-08-28 16:38:29 +02:00
f111fdf1c4 SCPN1-11046 2026-08-28 15:57:14 +02:00
fe54b3d038 SCPN1-11046 2026-08-27 14:41:37 +02:00
17 changed files with 471 additions and 34 deletions

View File

@@ -14,8 +14,7 @@
<#switch cloudEventMsg.action> <#switch cloudEventMsg.action>
<#case "C"> <#case "C">
<#case "U"> <#-- *********************************************** Action = CREATE ******************** -->
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign carrier = JsonUtil.jsonToMap(dataRfx)> <#assign carrier = JsonUtil.jsonToMap(dataRfx)>
[ [
@@ -27,7 +26,19 @@
} }
] ]
<#break> <#break>
<#case "U">
<#-- *********************************************** Action = UPDATE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign carrier = JsonUtil.jsonToMap(dataRfx)>
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorWMSUpdated>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaCarrier_ActorWMSUpdated.ftl">
}
]
<#break>
<#case "D"> <#case "D">
<#-- *********************************************** Action = DELETE ******************************* --> <#-- *********************************************** Action = DELETE ******************************* -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />

View File

@@ -0,0 +1,49 @@
[
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${RFXtoRPprefixCarrier(carrier.carrier_code?trim?json_string)}"
},
"Payload": {
"Name": "${carrier.carrier_designation?json_string}",
<#include "RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl">,
"Address":
{
<#-- if HARDIS WMS address is structured -->
<#if carrier.carrier_structured_address?? >
"Name": "${carrier.carrier_structured_address.name_or_company?json_string}",
"StreetAddressOne" : "${carrier.carrier_structured_address.street_and_PO?json_string}",
"StreetAddressTwo" : "${carrier.carrier_structured_address.additionnal_data?json_string}",
"PostalCode" : "${carrier.carrier_structured_address.postal_code?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) />
<#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}",
"State": "${carrier.carrier_structured_address.country_designation?json_string}"
<#-- if HARDIS WMS address is not structured -->
<#else>
<#if carrier.address??>
"Name": "${carrier.address.company_name?json_string}",
"StreetAddressOne" : "${carrier.address.address_1?json_string}",
"StreetAddressTwo" : "${carrier.address.address_2?json_string}",
"StreetAddressThree" : "${carrier.address.address_3?json_string}",
"CountryCode" : ""
</#if>
</#if>
}
<#if carrier.address??>
,
"Phones": ["${carrier.address.telephone?json_string}",
"${carrier.address.other_number?json_string}"
]
</#if>
}
}
]

View File

@@ -14,7 +14,6 @@
<#switch cloudEventMsg.action> <#switch cloudEventMsg.action>
<#case "C"> <#case "C">
<#case "U">
<#-- *********************************************** Action = CREATE or UPDATE ******************** --> <#-- *********************************************** Action = CREATE or UPDATE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign actor = JsonUtil.jsonToMap(dataRfx)> <#assign actor = JsonUtil.jsonToMap(dataRfx)>
@@ -28,7 +27,19 @@
] ]
<#break> <#break>
<#case "U">
<#-- *********************************************** Action = UPDATE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorWMSUpdated>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaCons_ActorWMSUpdated.ftl">
}
]
<#break>
<#case "D"> <#case "D">
<#-- *********************************************** Action = DELETE ******************** --> <#-- *********************************************** Action = DELETE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />

View File

@@ -0,0 +1,49 @@
[
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${RFXtoRPprefixConsignee(actor.code?trim?json_string)}"
},
"Payload": {
"Name": "${actor.designation?json_string}",
<#include "RFXtoRP_HsaCons_ActorCreated_Metadata.ftl">,
"Address":
{
<#-- if HARDIS WMS is structured -->
<#if actor.consignee_structured_address??>
"Name": "${actor.consignee_structured_address.name_or_company?json_string}",
"StreetAddressOne" : "${actor.consignee_structured_address.street_and_PO?json_string}",
"StreetAddressTwo" : "${actor.consignee_structured_address.additionnal_data?json_string}",
"PostalCode" : "${actor.consignee_structured_address.postal_code?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) />
<#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}",
"State": "${actor.consignee_structured_address.country_designation?json_string}"
<#-- if HARDIS WMS is not structured -->
<#else>
<#if actor.address?? >
"Name": "${actor.address.company_name?json_string}",
"StreetAddressOne" : "${actor.address.address_1?json_string}",
"StreetAddressTwo" : "${actor.address.address_2?json_string}",
"StreetAddressThree" : "${actor.address.address_3?json_string}",
"CountryCode" : ""
</#if>
</#if>
}
<#if actor.address?? >
,
"Phones": ["${actor.address.telephone?json_string}",
"${actor.address.other_number?json_string}"
]
</#if>
}
}
]

View File

@@ -9,7 +9,56 @@
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"ID": { "ID": {
"RefID": "${reflexMvtStockInterface.hd_number?trim?json_string}" <#-- Test if the Hu reference exists -->
<#assign HuReference="${reflexMvtStockInterface.hd_number?trim?json_string}"/>
<#if reflexMvtStockInterface.ipg_move_type?? && reflexMvtStockInterface.ipg_move_type=="120"> <#-- Transfer -->
<#if reflexMvtStockInterface.origin_order_line_reference?? && reflexMvtStockInterface.origin_order_line_reference!="">
<#assign HuEFID= "${reflexMvtStockInterface.original_receipt_physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.origin_order_line_reference?trim?json_string}"/>
<#else>
<#if reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!="" && !reflexMvtStockInterface.receipt_reference?starts_with(reflexMvtStockInterface.original_receipt_physical_depot_code + reflexMvtStockInterface.activity_code + reflexMvtStockInterface.receipt_year_number)>
<#assign HuEFID= "${reflexMvtStockInterface.original_receipt_physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_reference?trim?json_string}"/>
<#else>
<#assign HuEFID= "R${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_year_number}${reflexMvtStockInterface.receipt_number}"/>
</#if>
</#if>
<#else>
<#if reflexMvtStockInterface.originator_reference?? && reflexMvtStockInterface.originator_reference!="">
<#assign HuEFID= "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.originator_reference}"/>
<#else>
<#assign HuEFID= "R${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_year_number}${reflexMvtStockInterface.receipt_number}"/>
</#if>
</#if>
<#assign payload =
'{"Header":
{"ProjectID": "${projectRP!""}"},
"BlockFilters": [
{
"simpleFilters": [
{
"Attribute": "Payload.Reference",
"Value": "${HuReference}",
"Values": [],
"Operator": "",
"CombinedID": ""
},
{
"Attribute": "Payload.PreparedContents<>.ExecutionflowID",
"Value": "${HuEFID}",
"Values": [],
"Operator": "",
"CombinedID": ""
}
]
}
]}' />
<#assign queryApiReflexPlatformID = QueryApiReflexPlatformID.HandlingunitFind>
<#assign response = QueryApiReflexPlatformCall.call(queryApiReflexPlatformID,payload) />
<#assign HuRP = JsonUtil.jsonToMap(response)>
<#if HuRP?? && HuRP.Objects?? && HuRP.Objects[0]?? && HuRP.Objects[0].ID.RefID?? >
"RefID": "${HuRP.Objects[0].ID.RefID?json_string}"
<#else>
"RefID": "${reflexMvtStockInterface.hd_number?trim?json_string}-${receipt_confirmation_datetime}"
</#if>
}, },
"Payload": { "Payload": {
"Reference":"${reflexMvtStockInterface.hd_number?trim?json_string}", "Reference":"${reflexMvtStockInterface.hd_number?trim?json_string}",

View File

@@ -14,7 +14,6 @@
<#switch cloudEventMsg.action> <#switch cloudEventMsg.action>
<#case "C"> <#case "C">
<#case "U">
<#-- *********************************************** Action = CREATE or UPDATE ******************** --> <#-- *********************************************** Action = CREATE or UPDATE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign actor = JsonUtil.jsonToMap(dataRfx)> <#assign actor = JsonUtil.jsonToMap(dataRfx)>
@@ -27,7 +26,19 @@
} }
] ]
<#break> <#break>
<#case "U">
<#-- *********************************************** Action = UPDATE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorWMSUpdated>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaSup_ActorWMSUpdated.ftl">
}
]
<#break>
<#case "D"> <#case "D">
<#-- *********************************************** Action = DELETE ******************** --> <#-- *********************************************** Action = DELETE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />

View File

@@ -0,0 +1,49 @@
[
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${RFXtoRPprefixSupplier(actor.code?trim?json_string)}"
},
"Payload": {
"Name": "${actor.designation?json_string}",
<#include "RFXtoRP_HsaSup_ActorCreated_Metadata.ftl">,
"Address":
{
<#-- if HARDIS WMS address is structured -->
<#if actor.supplier_structured_address?? >
"Name": "${actor.supplier_structured_address.name_or_company?json_string}",
"StreetAddressOne" : "${actor.supplier_structured_address.street_and_PO?json_string}",
"StreetAddressTwo" : "${actor.supplier_structured_address.additionnal_data?json_string}",
"PostalCode" : "${actor.supplier_structured_address.postal_code?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) />
<#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}",
"State": "${actor.supplier_structured_address.country_designation?json_string}"
<#-- if HARDIS WMS address is not structured -->
<#else>
<#if actor.optional_attributes?? >
"Name": "${actor.optional_attributes.company_name?json_string}",
"StreetAddressOne" : "${actor.optional_attributes.address_1?json_string}",
"StreetAddressTwo" : "${actor.optional_attributes.address_2?json_string}",
"StreetAddressThree" : "${actor.optional_attributes.address_3?json_string}",
"CountryCode" : ""
</#if>
</#if>
}
<#if actor.optional_attributes?? >
,
"Phones": ["${actor.optional_attributes.telephone?json_string}",
"${actor.optional_attributes.other_number?json_string}"
]
</#if>
}
}
]

View File

@@ -11,7 +11,6 @@
<#switch cloudEventMsg.action> <#switch cloudEventMsg.action>
<#case "C"> <#case "C">
<#case "U">
<#-- *********************************************** Action = CREATE or UPDATE ******************** --> <#-- *********************************************** Action = CREATE or UPDATE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign depot = JsonUtil.jsonToMap(dataRfx)> <#assign depot = JsonUtil.jsonToMap(dataRfx)>
@@ -24,7 +23,19 @@
} }
] ]
<#break> <#break>
<#case "U">
<#-- *********************************************** Action = UPDATE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorWMSUpdated>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrDepot_ActorWMSUpdated.ftl">
}
]
<#break>
<#case "D"> <#case "D">
<#-- *********************************************** Action = DELETE *************************** --> <#-- *********************************************** Action = DELETE *************************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />

View File

@@ -0,0 +1,51 @@
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${RFXtoRPprefixDepot(depot.physical_depot_code?trim?json_string)}"
},
"Payload": {
"Name": "${depot.physical_depot_designation?json_string}",
<#include "RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl">,
"Address":
{
<#-- if HARDIS WMS address is structured -->
<#if depot.physical_depot_structured_address?? >
"Name": "${depot.physical_depot_structured_address.name_or_company?json_string}",
"StreetAddressOne" : "${depot.physical_depot_structured_address.street_and_PO?json_string}",
"StreetAddressTwo" : "${depot.physical_depot_structured_address.additionnal_data?json_string}",
"PostalCode" : "${depot.physical_depot_structured_address.postal_code?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) />
<#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}",
"State": "${depot.physical_depot_structured_address.country_designation?json_string}"
<#-- if HARDIS WMS address is not structured -->
<#else>
<#if depot.physical_depot_address??>
"Name": "${depot.physical_depot_address.company_name?json_string}",
"StreetAddressOne" : "${depot.physical_depot_address.address_1?json_string}",
"StreetAddressTwo" : "${depot.physical_depot_address.address_2?json_string}",
"StreetAddressThree" : "${depot.physical_depot_address.address_3?json_string}",
"CountryCode" : ""
</#if>
</#if>
}
<#if depot.physical_depot_address??>
,
"Phones": ["${depot.physical_depot_address.telephone?json_string}",
"${depot.physical_depot_address.other_number?json_string}"
]
</#if>
}
}
]

View File

@@ -15,7 +15,13 @@
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"ID": { "ID": {
<#if preparation_line3.despatched_cartons_list?? && preparation_line3.despatched_cartons_list?size != 0>
<#list preparation_line3.despatched_cartons_list?filter(l -> l?? && l.carton_number==despatched_ipg3.carton_number) as HuCartonCycle>
"RefID": "${despatched_ipg3.carton_number}-${HuCartonCycle.carton_creation_datetime}",
</#list>
<#else>
"RefID": "${despatched_ipg3.carton_number}", "RefID": "${despatched_ipg3.carton_number}",
</#if>
"RefDate": { "RefDate": {
"DateTime": "${dispatched3_datetime}", "DateTime": "${dispatched3_datetime}",
"AuthorTimeZone": "${time_zone_rfx}" "AuthorTimeZone": "${time_zone_rfx}"

View File

@@ -8,14 +8,20 @@
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"ID": { "ID": {
"RefID":"${despatched_ipg.hd_number}", "RefID": "${despatched_ipg.hd_number}",
"RefDate": { "RefDate": {
"DateTime": "${dispatched_datetime5}", "DateTime": "${dispatched_datetime5}",
"AuthorTimeZone": "${time_zone_rfx}" "AuthorTimeZone": "${time_zone_rfx}"
} }
}, },
"Payload": { "Payload": {
<#if preparation_line.despatched_hds_list?? && preparation_line.despatched_hds_list?size != 0>
<#list preparation_line.despatched_hds_list?filter(l -> l?? && l.handling_device_number==despatched_ipg.hd_number) as HuCycle>
"HandlingunitID": "${despatched_ipg.hd_number}-${HuCycle.hd_creation_datetime}"
</#list>
<#else>
"HandlingunitID": "${despatched_ipg.hd_number}" "HandlingunitID": "${despatched_ipg.hd_number}"
</#if>
<#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" > <#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" >
, ,
"HUCarrier":{ "HUCarrier":{

View File

@@ -13,7 +13,13 @@
{ {
"Header": {"ProjectID": "${projectRP}"}, "Header": {"ProjectID": "${projectRP}"},
"ID": { "ID": {
<#if preparation_line.despatched_hds_list?? && preparation_line.despatched_hds_list?size != 0>
<#list preparation_line.despatched_hds_list?filter(l -> l?? && l.handling_device_number==despatched_ipg.hd_number) as HuCycle>
"RefID": "${despatched_ipg.hd_number}-${HuCycle.hd_creation_datetime}",
</#list>
<#else>
"RefID": "${despatched_ipg.hd_number}", "RefID": "${despatched_ipg.hd_number}",
</#if>
"RefDate": { "RefDate": {
"DateTime": "${dispatched_datetime}", "DateTime": "${dispatched_datetime}",
"AuthorTimeZone": "${time_zone_rfx}" "AuthorTimeZone": "${time_zone_rfx}"

View File

@@ -15,10 +15,23 @@
"DateTime": "${packing_datetime}" "DateTime": "${packing_datetime}"
}, },
<#if despatched_ipg.carton_number != "000000000000000000"> <#if despatched_ipg.carton_number != "000000000000000000">
<#if preparation_line.despatched_cartons_list?? && preparation_line.despatched_cartons_list?size != 0>
<#list preparation_line.despatched_cartons_list?filter(l -> l?? && l.carton_number==despatched_ipg.carton_number) as HuCartonCycle>
"RefID": "${despatched_ipg.carton_number}-${HuCartonCycle.carton_creation_datetime}"
</#list>
<#else>
"RefID": "${despatched_ipg.carton_number}" "RefID": "${despatched_ipg.carton_number}"
</#if>
<#else>
<#-- Add HU cycle -->
<#if preparation_line.despatched_hds_list?? && preparation_line.despatched_hds_list?size != 0>
<#list preparation_line.despatched_hds_list?filter(l -> l?? && l.handling_device_number==despatched_ipg.hd_number) as HuCycle>
"RefID": "${despatched_ipg.hd_number}-${HuCycle.hd_creation_datetime}"
</#list>
<#else> <#else>
"RefID": "${despatched_ipg.hd_number}" "RefID": "${despatched_ipg.hd_number}"
</#if> </#if>
</#if>
}, },
"Payload": { "Payload": {

View File

@@ -10,12 +10,24 @@
"AuthorTimeZone": "${time_zone_rfx}", "AuthorTimeZone": "${time_zone_rfx}",
"DateTime": "${HUadded_packing_datetime}" "DateTime": "${HUadded_packing_datetime}"
}, },
<#if preparation_line.despatched_hds_list?? && preparation_line.despatched_hds_list?size != 0>
<#list preparation_line.despatched_hds_list?filter(l -> l?? && l.handling_device_number==despatched_ipg.hd_number) as HuCycle>
"RefID": "${despatched_ipg.hd_number}-${HuCycle.hd_creation_datetime}"
</#list>
<#else>
"RefID": "${despatched_ipg.hd_number}" "RefID": "${despatched_ipg.hd_number}"
</#if>
}, },
"Payload": { "Payload": {
"Reference": "${despatched_ipg.hd_number}",
"IncludedHandlingunitIDs": [ "${despatched_ipg.carton_number}" ] <#if preparation_line.despatched_cartons_list?? && preparation_line.despatched_cartons_list?size != 0>
<#list preparation_line.despatched_cartons_list?filter(l -> l?? && l.carton_number==despatched_ipg.carton_number) as HuCartonCycle>
"IncludedHandlingunitIDs": [ "${despatched_ipg.carton_number}-${HuCartonCycle.carton_creation_datetime}" ]
</#list>
<#else>
"IncludedHandlingunitIDs": [ "${despatched_ipg.carton_number}" ]
</#if>
<#if preparation_line.despatched_hds_list?? && preparation_line.despatched_hds_list[0]??> <#if preparation_line.despatched_hds_list?? && preparation_line.despatched_hds_list[0]??>
, ,
"Information": { "Information": {
@@ -36,8 +48,6 @@
</#if>, </#if>,
<#-- HU Metadata inclusin inclusion --> <#-- HU Metadata inclusin inclusion -->
<#include "RFXtoRP_HsrPrepa_HUsAdded_Metadata.ftl"> <#include "RFXtoRP_HsrPrepa_HUsAdded_Metadata.ftl">
} }
} }
] ]

View File

@@ -52,10 +52,22 @@
}, },
"Payload": { "Payload": {
<#if despatched_ipg.carton_number != "000000000000000000"> <#if despatched_ipg.carton_number != "000000000000000000">
<#if preparation_line.despatched_cartons_list?? && preparation_line.despatched_cartons_list?size != 0>
<#list preparation_line.despatched_cartons_list?filter(l -> l?? && l.carton_number==despatched_ipg.carton_number) as HuCartonCycle>
"HandlingunitID": "${despatched_ipg.carton_number}-${HuCartonCycle.carton_creation_datetime}"
</#list>
<#else>
"HandlingunitID": "${despatched_ipg.carton_number}" "HandlingunitID": "${despatched_ipg.carton_number}"
</#if>
<#assign hd_numberHmap += {despatched_ipg.carton_number,despatched_ipg.carton_number}> <#assign hd_numberHmap += {despatched_ipg.carton_number,despatched_ipg.carton_number}>
<#else>
<#if preparation_line.despatched_hds_list?? && preparation_line.despatched_hds_list?size != 0>
<#list preparation_line.despatched_hds_list?filter(l -> l?? && l.handling_device_number==despatched_ipg.hd_number) as HuCycle>
"HandlingunitID": "${despatched_ipg.hd_number}-${HuCycle.hd_creation_datetime}"
</#list>
<#else> <#else>
"HandlingunitID": "${despatched_ipg.hd_number}" "HandlingunitID": "${despatched_ipg.hd_number}"
</#if>
<#assign hd_numberHmap += {despatched_ipg.hd_number,despatched_ipg.hd_number}> <#assign hd_numberHmap += {despatched_ipg.hd_number,despatched_ipg.hd_number}>
</#if> </#if>
<#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" > <#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" >

View File

@@ -37,7 +37,18 @@
{ {
"Key": "order_number", "Key": "order_number",
"Value": "${receipt.receipt_number}" "Value": "${receipt.receipt_number}"
},
<#if receipt.line_list[0]?? && receipt.line_list[0].line_anticipated?? && receipt.line_list[0].line_anticipated.anticipated_receipt_year!=0 && receipt.line_list[0].line_anticipated.anticipated_receipt_number!=0 >
{
"Key": "anticipated",
"Value": "true"
} }
<#else>
{
"Key": "anticipated",
"Value": "false"
}
</#if>
], ],
<#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="" && receipt.receipt_reference?? && receipt.receipt_reference!=""> <#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="" && receipt.receipt_reference?? && receipt.receipt_reference!="">
"RefID": "${receipt.origin_order_line_depot?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}", "RefID": "${receipt.origin_order_line_depot?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}",
@@ -140,6 +151,47 @@
{ {
"Header": {"ProjectID": "${projectRP}"}, "Header": {"ProjectID": "${projectRP}"},
"ID": { "ID": {
"CustomFields": [
{
"Key": "depot_code",
<#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="">
"Value": "${receipt.origin_order_line_depot?trim?json_string}"
<#else>
"Value": "${receipt.physical_depot_code?trim?json_string}"
</#if>
},
{
"Key": "activity_code",
"Value": "${receipt.activity_code?trim?json_string}"
},
{
"Key": "originator_code",
"Value": "${receipt.originator_code?trim?json_string}"
},
{
"Key": "reference",
"Value": "${receipt.receipt_reference?trim?json_string}"
},
{
"Key": "order_year",
"Value": "${receipt.receipt_year}"
},
{
"Key": "order_number",
"Value": "${receipt.receipt_number}"
},
<#if receipt.line_list[0]?? && receipt.line_list[0].line_anticipated?? && receipt.line_list[0].line_anticipated.anticipated_receipt_year!=0 && receipt.line_list[0].line_anticipated.anticipated_receipt_number!=0 >
{
"Key": "anticipated",
"Value": "true"
}
<#else>
{
"Key": "anticipated",
"Value": "false"
}
</#if>
],
<#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!=""> <#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="">
"RefID": "${receipt.origin_order_line_depot?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt_line.origin_order_line_reference?trim?json_string}", "RefID": "${receipt.origin_order_line_depot?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt_line.origin_order_line_reference?trim?json_string}",
<#else> <#else>
@@ -226,6 +278,47 @@
{ {
"Header": {"ProjectID": "${projectRP}"}, "Header": {"ProjectID": "${projectRP}"},
"ID": { "ID": {
"CustomFields": [
{
"Key": "depot_code",
<#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="">
"Value": "${receipt.origin_order_line_depot?trim?json_string}"
<#else>
"Value": "${receipt.physical_depot_code?trim?json_string}"
</#if>
},
{
"Key": "activity_code",
"Value": "${receipt.activity_code?trim?json_string}"
},
{
"Key": "originator_code",
"Value": "${receipt.originator_code?trim?json_string}"
},
{
"Key": "reference",
"Value": "${receipt.receipt_reference?trim?json_string}"
},
{
"Key": "order_year",
"Value": "${receipt.receipt_year}"
},
{
"Key": "order_number",
"Value": "${receipt.receipt_number}"
},
<#if receipt.line_list[0]?? && receipt.line_list[0].line_anticipated?? && receipt.line_list[0].line_anticipated.anticipated_receipt_year!=0 && receipt.line_list[0].line_anticipated.anticipated_receipt_number!=0 >
{
"Key": "anticipated",
"Value": "true"
}
<#else>
{
"Key": "anticipated",
"Value": "false"
}
</#if>
],
"RefID": "R${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year?trim?json_string}${receipt.receipt_number?trim?json_string}", "RefID": "R${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year?trim?json_string}${receipt.receipt_number?trim?json_string}",
"RefDate": { "RefDate": {
"DateTime": "${receipt_creation_datetime}", "DateTime": "${receipt_creation_datetime}",