Files
reflex-wms-connector/RPtoRFX_CarrierAppointmentAnticipatedReceiptAssociationByNumber.ftl
2026-06-11 17:08:26 +02:00

33 lines
1.5 KiB
Java

{
"id" : {"refid" : "${eventRP.refid?json_string}","actorID":"${RPtoRFXprefixDepot(eventRP.actor)}"},
"route" : "rest/public/v1/physical_depots/{physical_depot_code}/appointment_years/{appointment_year}/appointment_numbers/{appointment_number}/anticipated_receipt_associations",
"method" : "POST",
"uri_substitutions": {
"physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}",
"appointment_year":"${eventRP.appointmentCustomFields.year?json_string}",
"appointment_number":"${eventRP.appointmentCustomFields.number?json_string}"
},
"payload" :
{
<#assign orderCustomFields = eventRP.orderCustomFields >
<#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING>
<#assign addedCommissions = eventRP.addedUnloadCommissions />
<#else>
<#assign addedCommissions = eventRP.addedLoadCommissions />
</#if>
"anticipated_receipt_list": [
<#list addedCommissions?filter(l -> l.OrderID??) as addedCommission>
{
"activity": "${orderCustomFields[addedCommission.OrderID].activity_code?json_string}",
"originator_code": "${orderCustomFields[addedCommission.OrderID].originator_code?json_string}",
"anticipated_receipt_reference": "${orderCustomFields[addedCommission.OrderID].anticipated_receipt_reference?json_string}",
"anticipated_receipt_year": "${orderCustomFields[addedCommission.OrderID].anticipated_receipt_year?json_string}",
"anticipated_receipt_number": "${orderCustomFields[addedCommission.OrderID].anticipated_receipt_number?json_string}"
}
<#sep>,</#sep>
</#list>
]
}
}