You've already forked reflex-wms-connector
SCPN1-10100
This commit is contained in:
@@ -27,7 +27,7 @@
|
|||||||
<#case "CommissionsUpdated">
|
<#case "CommissionsUpdated">
|
||||||
<#assign appointment = eventRP.data />
|
<#assign appointment = eventRP.data />
|
||||||
[ <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING">
|
[ <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING">
|
||||||
<#if eventRP.addedCommissions?? && eventRP.addedCommissions!="">
|
<#if eventRP.addedCommissions?? && eventRP.addedCommissions!="">
|
||||||
<#if eventRP.appointmentCustomFields?has_content>
|
<#if eventRP.appointmentCustomFields?has_content>
|
||||||
{
|
{
|
||||||
<#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_number>
|
<#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_number>
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
<#if eventRP.removedCommissions?? && eventRP.removedCommissions!="">
|
<#if eventRP.removedCommissions?? && eventRP.removedCommissions!="">
|
||||||
<#if eventRP.addedCommissions?? && eventRP.addedCommissions!="">
|
<#if eventRP.addedCommissions?? && eventRP.addedCommissions!="">
|
||||||
,
|
,
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
<#if eventRP.appointmentCustomFields?has_content>
|
<#if eventRP.appointmentCustomFields?has_content>
|
||||||
{
|
{
|
||||||
@@ -66,7 +66,21 @@
|
|||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
<#else>
|
<#else>
|
||||||
<#stop "Unsupported Appointment Type for Commissions Update">
|
<#if eventRP.appointmentCustomFields?has_content>
|
||||||
|
{
|
||||||
|
<#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_number>
|
||||||
|
"apiRestReflexID" : "${apiRestReflexID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RPtoRFX_CarrierAppointmentUpdatedByNumber.ftl">
|
||||||
|
}
|
||||||
|
<#else>
|
||||||
|
{
|
||||||
|
<#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_ref>
|
||||||
|
"apiRestReflexID" : "${apiRestReflexID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RPtoRFX_CarrierAppointmentUpdatedByRef.ftl">
|
||||||
|
}
|
||||||
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|||||||
40
RPtoRFX_CarrierAppointmentUpdatedByNumber.ftl
Normal file
40
RPtoRFX_CarrierAppointmentUpdatedByNumber.ftl
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
"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}",
|
||||||
|
"method" : "PUT",
|
||||||
|
"uri_substitutions": {
|
||||||
|
"physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}",
|
||||||
|
"appointment_year":"${eventRP.appointmentCustomFields.year?json_string}",
|
||||||
|
"appointment_number":"${eventRP.appointmentCustomFields.number?json_string}"
|
||||||
|
},
|
||||||
|
"payload" :
|
||||||
|
{
|
||||||
|
<#-- <#switch appointment.AppointmentType>
|
||||||
|
<#case "APPOINTMENT_TYPE_LOADING">
|
||||||
|
"unloading_appointment" : "false",
|
||||||
|
"load_appointment" : "true",
|
||||||
|
<#if appointment.TimeZone?? && appointment.TimeZone!="">
|
||||||
|
"planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}",
|
||||||
|
"planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}",
|
||||||
|
<#else>
|
||||||
|
"planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,time_zone_rfx),time_zone_rfx)}",
|
||||||
|
"planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}",
|
||||||
|
</#if>
|
||||||
|
<#break>
|
||||||
|
<#case "APPOINTMENT_TYPE_UNLOADING">
|
||||||
|
"unloading_appointment" : "true",
|
||||||
|
"load_appointment" : "false",
|
||||||
|
<#if appointment.TimeZone?? && appointment.TimeZone!="">
|
||||||
|
"planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}",
|
||||||
|
"planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}",
|
||||||
|
<#else>
|
||||||
|
"planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,time_zone_rfx),time_zone_rfx)}",
|
||||||
|
"planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}",
|
||||||
|
</#if>
|
||||||
|
<#break>
|
||||||
|
<#default>
|
||||||
|
<#stop "appointment.AppointmentType not implemented" >
|
||||||
|
</#switch>-->
|
||||||
|
"appointment_designation":"${(appointment.Reason!"")!?json_string}"
|
||||||
|
}
|
||||||
|
}
|
||||||
39
RPtoRFX_CarrierAppointmentUpdatedByRef.ftl
Normal file
39
RPtoRFX_CarrierAppointmentUpdatedByRef.ftl
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
{
|
||||||
|
"id" : {"refid" : "${eventRP.refid?json_string}","actorID":"${RPtoRFXprefixDepot(eventRP.actor)}"},
|
||||||
|
"route" : "rest/public/v1/physical_depots/{physical_depot_code}/carrier_appointments/{appointment_reference}",
|
||||||
|
"method" : "PUT",
|
||||||
|
"uri_substitutions": {
|
||||||
|
"physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}",
|
||||||
|
"appointment_reference":"${eventRP.refid?json_string}"
|
||||||
|
},
|
||||||
|
"payload" :
|
||||||
|
{
|
||||||
|
<#-- <#switch appointment.AppointmentType>
|
||||||
|
<#case "APPOINTMENT_TYPE_LOADING">
|
||||||
|
"unloading_appointment" : "false",
|
||||||
|
"load_appointment" : "true",
|
||||||
|
<#if appointment.TimeZone?? && appointment.TimeZone!="">
|
||||||
|
"planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}",
|
||||||
|
"planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}",
|
||||||
|
<#else>
|
||||||
|
"planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,time_zone_rfx),time_zone_rfx)}",
|
||||||
|
"planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}",
|
||||||
|
</#if>
|
||||||
|
<#break>
|
||||||
|
<#case "APPOINTMENT_TYPE_UNLOADING">
|
||||||
|
"unloading_appointment" : "true",
|
||||||
|
"load_appointment" : "false",
|
||||||
|
<#if appointment.TimeZone?? && appointment.TimeZone!="">
|
||||||
|
"planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}",
|
||||||
|
"planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}",
|
||||||
|
<#else>
|
||||||
|
"planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,time_zone_rfx),time_zone_rfx)}",
|
||||||
|
"planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}",
|
||||||
|
</#if>
|
||||||
|
<#break>
|
||||||
|
<#default>
|
||||||
|
<#stop "appointment.AppointmentType not implemented" >
|
||||||
|
</#switch> -->
|
||||||
|
"appointment_designation":"${(appointment.Reason!"")!?json_string}"
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user