You've already forked reflex-wms-connector
SCPN1-11046
This commit is contained in:
@@ -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)>
|
||||
"ExecutionflowID": "${reflexMvtStockInterface.original_receipt_physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_reference?trim?json_string}",
|
||||
<#else>
|
||||
"ExecutionflowID": "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}",
|
||||
|
||||
@@ -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}"
|
||||
|
||||
@@ -8,14 +8,20 @@
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID":"${despatched_ipg.hd_number}",
|
||||
"RefID": "${despatched_ipg.hd_number}",
|
||||
"RefDate": {
|
||||
"DateTime": "${dispatched_datetime5}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
"Payload": {
|
||||
"HandlingunitID": "${despatched_ipg.hd_number}"
|
||||
<#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,9 +15,22 @@
|
||||
"DateTime": "${packing_datetime}"
|
||||
},
|
||||
<#if despatched_ipg.carton_number != "000000000000000000">
|
||||
"RefID": "${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>
|
||||
"RefID": "${despatched_ipg.carton_number}-${HuCartonCycle.carton_creation_datetime}"
|
||||
</#list>
|
||||
<#else>
|
||||
"RefID": "${despatched_ipg.carton_number}"
|
||||
</#if>
|
||||
<#else>
|
||||
"RefID": "${despatched_ipg.hd_number}"
|
||||
<#-- 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>
|
||||
},
|
||||
|
||||
|
||||
@@ -10,12 +10,24 @@
|
||||
"AuthorTimeZone": "${time_zone_rfx}",
|
||||
"DateTime": "${HUadded_packing_datetime}"
|
||||
},
|
||||
"RefID": "${despatched_ipg.hd_number}"
|
||||
<#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": {
|
||||
|
||||
"IncludedHandlingunitIDs": [ "${despatched_ipg.carton_number}" ]
|
||||
"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,11 +52,23 @@
|
||||
},
|
||||
"Payload": {
|
||||
<#if despatched_ipg.carton_number != "000000000000000000">
|
||||
"HandlingunitID": "${despatched_ipg.carton_number}"
|
||||
<#assign hd_numberHmap += {despatched_ipg.carton_number,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>
|
||||
"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>
|
||||
"HandlingunitID": "${despatched_ipg.hd_number}"
|
||||
<#assign hd_numberHmap += {despatched_ipg.hd_number,despatched_ipg.hd_number}>
|
||||
<#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!="" >
|
||||
,
|
||||
|
||||
Reference in New Issue
Block a user