Files
reflex-wms-connector/RPtoRFX_CarrierAppointmentAnticipatedReceiptDissociationByNumber.ftl
2026-06-15 14:55:12 +02:00

34 lines
1.7 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_dissociations",
"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 removedCommissions = eventRP.removedUnloadCommissions />
<#else>
<#assign removedCommissions = eventRP.removedLoadCommissions />
</#if>
"anticipated_receipt_list": [
<#list removedCommissions?filter(l -> l.OrderID??) as removedCommission>
{
"activity": "${orderCustomFields[removedCommission.OrderID].activity_code?json_string}",
"originator_code": "${orderCustomFields[removedCommission.OrderID].originator_code?json_string}",
"anticipated_receipt_reference": "${orderCustomFields[removedCommission.OrderID].anticipated_receipt_reference?json_string}",
"planned_receipt_date": "${orderCustomFields[removedCommission.OrderID].planned_receipt_datetime?json_string}",
"anticipated_receipt_year": "${orderCustomFields[removedCommission.OrderID].anticipated_receipt_year?json_string}",
"anticipated_receipt_number": "${orderCustomFields[removedCommission.OrderID].anticipated_receipt_number?json_string}"
}
<#sep>,</#sep>
</#list>
]
}
}