You've already forked reflex-wms-connector
Compare commits
10 Commits
develop-Ap
...
develop
| Author | SHA1 | Date | |
|---|---|---|---|
| 779b37f88b | |||
| 6da49ba885 | |||
| cd086049e4 | |||
| 045c471a97 | |||
| ecaf4421a6 | |||
| f5258cb504 | |||
| edeb9db5b9 | |||
| b24a45baef | |||
| f111fdf1c4 | |||
| fe54b3d038 |
@@ -14,8 +14,7 @@
|
||||
|
||||
<#switch cloudEventMsg.action>
|
||||
<#case "C">
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#-- *********************************************** Action = CREATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign carrier = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
@@ -27,7 +26,19 @@
|
||||
}
|
||||
]
|
||||
<#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">
|
||||
<#-- *********************************************** Action = DELETE ******************************* -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
|
||||
49
RFXtoRP_HsaCarrier_ActorWMSUpdated.ftl
Normal file
49
RFXtoRP_HsaCarrier_ActorWMSUpdated.ftl
Normal 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>
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -14,7 +14,6 @@
|
||||
|
||||
<#switch cloudEventMsg.action>
|
||||
<#case "C">
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
|
||||
@@ -28,7 +27,19 @@
|
||||
]
|
||||
|
||||
<#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">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
|
||||
49
RFXtoRP_HsaCons_ActorWMSUpdated.ftl
Normal file
49
RFXtoRP_HsaCons_ActorWMSUpdated.ftl
Normal 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>
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -9,7 +9,56 @@
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"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": {
|
||||
"Reference":"${reflexMvtStockInterface.hd_number?trim?json_string}",
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
|
||||
<#switch cloudEventMsg.action>
|
||||
<#case "C">
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
|
||||
@@ -27,7 +26,19 @@
|
||||
}
|
||||
]
|
||||
<#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">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
|
||||
49
RFXtoRP_HsaSup_ActorWMSUpdated.ftl
Normal file
49
RFXtoRP_HsaSup_ActorWMSUpdated.ftl
Normal 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>
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -11,7 +11,6 @@
|
||||
|
||||
<#switch cloudEventMsg.action>
|
||||
<#case "C">
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
||||
@@ -24,7 +23,19 @@
|
||||
}
|
||||
]
|
||||
<#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">
|
||||
<#-- *********************************************** Action = DELETE *************************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
|
||||
51
RFXtoRP_HsrDepot_ActorWMSUpdated.ftl
Normal file
51
RFXtoRP_HsrDepot_ActorWMSUpdated.ftl
Normal 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>
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -15,7 +15,13 @@
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"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}",
|
||||
</#if>
|
||||
"RefDate": {
|
||||
"DateTime": "${dispatched3_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
|
||||
@@ -15,7 +15,13 @@
|
||||
}
|
||||
},
|
||||
"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}"
|
||||
</#if>
|
||||
<#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" >
|
||||
,
|
||||
"HUCarrier":{
|
||||
|
||||
@@ -13,7 +13,13 @@
|
||||
{
|
||||
"Header": {"ProjectID": "${projectRP}"},
|
||||
"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}",
|
||||
</#if>
|
||||
"RefDate": {
|
||||
"DateTime": "${dispatched_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
|
||||
@@ -15,10 +15,23 @@
|
||||
"DateTime": "${packing_datetime}"
|
||||
},
|
||||
<#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}"
|
||||
</#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>
|
||||
"RefID": "${despatched_ipg.hd_number}"
|
||||
</#if>
|
||||
</#if>
|
||||
},
|
||||
|
||||
"Payload": {
|
||||
|
||||
@@ -10,12 +10,24 @@
|
||||
"AuthorTimeZone": "${time_zone_rfx}",
|
||||
"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}"
|
||||
</#if>
|
||||
},
|
||||
|
||||
"Payload": {
|
||||
|
||||
"Reference": "${despatched_ipg.hd_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]??>
|
||||
,
|
||||
"Information": {
|
||||
@@ -36,8 +48,6 @@
|
||||
</#if>,
|
||||
<#-- HU Metadata inclusin inclusion -->
|
||||
<#include "RFXtoRP_HsrPrepa_HUsAdded_Metadata.ftl">
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -52,10 +52,22 @@
|
||||
},
|
||||
"Payload": {
|
||||
<#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}"
|
||||
</#if>
|
||||
<#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>
|
||||
"HandlingunitID": "${despatched_ipg.hd_number}"
|
||||
</#if>
|
||||
<#assign hd_numberHmap += {despatched_ipg.hd_number,despatched_ipg.hd_number}>
|
||||
</#if>
|
||||
<#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" >
|
||||
|
||||
@@ -37,7 +37,18 @@
|
||||
{
|
||||
"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!="" && 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}",
|
||||
@@ -140,6 +151,47 @@
|
||||
{
|
||||
"Header": {"ProjectID": "${projectRP}"},
|
||||
"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!="">
|
||||
"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>
|
||||
@@ -226,6 +278,47 @@
|
||||
{
|
||||
"Header": {"ProjectID": "${projectRP}"},
|
||||
"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}",
|
||||
"RefDate": {
|
||||
"DateTime": "${receipt_creation_datetime}",
|
||||
|
||||
Reference in New Issue
Block a user