Files
reflex-wms-connector/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl
2026-03-31 09:46:33 +02:00

33 lines
1.6 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}/physical_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 executionflowCustomFields = eventRP.executionflowCustomFields >
<#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING>
<#assign removedCommissions = eventRP.removedUnloadCommissions />
<#else>
<#assign removedCommissions = eventRP.removedLoadCommissions />
</#if>
"physical_receipt_list": [
<#list removedCommissions?filter(l -> l.ExecutionflowID??) as removedCommission>
{
"receipt_activity": "${executionflowCustomFields[removedCommission.ExecutionflowID].activity_code?json_string}",
"originator_code": "${executionflowCustomFields[removedCommission.ExecutionflowID].originator_code?json_string}",
"physical_receipt_reference": "${executionflowCustomFields[removedCommission.ExecutionflowID].reference?json_string}",
"receipt_year": "${executionflowCustomFields[removedCommission.ExecutionflowID].order_year?json_string}",
"receipt_number": "${executionflowCustomFields[removedCommission.ExecutionflowID].order_number?json_string}"
}
<#sep>,</#sep>
</#list>
]
}
}