94 lines
3.1 KiB
Java
94 lines
3.1 KiB
Java
<#-- **** input parameters ***** -->
|
|
<#-- input : message HARDIS WMS -->
|
|
<#-- project : projectId in HARDIS SC NETWORK -->
|
|
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
|
<#include "HfRpConfig.ftl">
|
|
<#include "ReflexUtils.ftl">
|
|
<#include "ActorPrefix.ftl">
|
|
|
|
<#assign eventRP = JsonUtil.jsonToMap(input)>
|
|
<#assign projectRP = project>
|
|
<#assign organisationRP = organisation>
|
|
|
|
<#switch eventRP.event>
|
|
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
|
<#case "Created">
|
|
<#assign appointment = eventRP.data />
|
|
[
|
|
{
|
|
<#assign apiRestReflexID = ApiRestReflexID.appointment_post_create>
|
|
"apiRestReflexID" : "${apiRestReflexID}",
|
|
"datas" :
|
|
<#include "RPtoRFX_CarrierAppointmentCreated.ftl">
|
|
}
|
|
]
|
|
<#break>
|
|
<#-- *********************************************** Action = CommissionsUpdated ******************** -->
|
|
<#case "CommissionsUpdated">
|
|
<#assign appointment = eventRP.data />
|
|
[
|
|
<#if appointment.appointmentCustomFields?? && appointment.appointmentCustomFields?has_content>
|
|
{
|
|
<#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_number>
|
|
"apiRestReflexID" : "${apiRestReflexID}",
|
|
"datas" :
|
|
<#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl">
|
|
}
|
|
<#else>
|
|
{
|
|
<#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_ref>
|
|
"apiRestReflexID" : "${apiRestReflexID}",
|
|
"datas" :
|
|
<#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRefID.ftl">
|
|
}
|
|
</#if>
|
|
]
|
|
<#break>
|
|
<#-- *********************************************** Action = SlotUpdated ******************** -->
|
|
<#case "SlotUpdated">
|
|
<#assign appointment = eventRP.data />
|
|
[
|
|
<#if appointment.appointmentCustomFields?? && appointment.appointmentCustomFields?has_content>
|
|
{
|
|
<#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_number>
|
|
"apiRestReflexID" : "${apiRestReflexID}",
|
|
"datas" :
|
|
<#include "RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl">
|
|
}
|
|
<#else>
|
|
{
|
|
<#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_ref>
|
|
"apiRestReflexID" : "${apiRestReflexID}",
|
|
"datas" :
|
|
<#include "RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl">
|
|
}
|
|
</#if>
|
|
]
|
|
<#break>
|
|
<#-- *********************************************** Action = SlotUpdated ******************** -->
|
|
<#case "Canceled">
|
|
<#assign appointment = eventRP.data />
|
|
[
|
|
<#if appointment.appointmentCustomFields?? && appointment.appointmentCustomFields?has_content>
|
|
{
|
|
<#assign apiRestReflexID = ApiRestReflexID.appointment_put_status_by_number>
|
|
"apiRestReflexID" : "${apiRestReflexID}",
|
|
"datas" :
|
|
<#include "RPtoRFX_CarrierAppointmentCanceledByNumber.ftl">
|
|
}
|
|
<#else>
|
|
{
|
|
<#assign apiRestReflexID = ApiRestReflexID.appointment_put_status_by_ref>
|
|
"apiRestReflexID" : "${apiRestReflexID}",
|
|
"datas" :
|
|
<#include "RPtoRFX_CarrierAppointmentCanceledByRef.ftl">
|
|
}
|
|
</#if>
|
|
]
|
|
<#break>
|
|
<#default>
|
|
<#stop >
|
|
</#switch>
|
|
|
|
|