Files
reflex-wms-connector/RFXtoRP_HsrPrepa_HandlingunitHUsAdded.ftl
2026-08-27 14:41:37 +02:00

53 lines
1.8 KiB
Java

<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
[
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID": {
"RefDate": {
"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": {
"ContainerType": "${preparation_line.despatched_hds_list[0].hd_type_code}",
"Length": {
"Unit": "${length_unit_rfx}",
"Value": ${preparation_line.despatched_hds_list[0].hd_type_depth}
},
"Weight": {
"Unit": "${weight_unit_rfx}",
"Value": ${preparation_line.despatched_hds_list[0].hd_gross_weight}
},
"Width": {
"Unit": "${length_unit_rfx}",
"Value": ${preparation_line.despatched_hds_list[0].hd_type_width}
}
}
</#if>,
<#-- HU Metadata inclusin inclusion -->
<#include "RFXtoRP_HsrPrepa_HUsAdded_Metadata.ftl">
}
}
]