RDV
This commit is contained in:
parent
0113829f9b
commit
be4dcf11f6
@ -29,7 +29,13 @@
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrCarrierApt_AppointmentCarrierExpected.ftl">
|
||||
}
|
||||
},
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCustomFieldsUpdated>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl">
|
||||
},
|
||||
]
|
||||
<#break>
|
||||
<#case "U">
|
||||
|
||||
48
RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl
Normal file
48
RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl
Normal file
@ -0,0 +1,48 @@
|
||||
[
|
||||
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) />
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||
"RefID": "${carrier_apt.appointment_reference?json_string}",
|
||||
<#else>
|
||||
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
||||
"RefID": "${carrier_apt.appointment_reference?json_string}${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}",
|
||||
<#else>
|
||||
"RefID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}",
|
||||
</#if>
|
||||
</#if>
|
||||
"RefDate": {
|
||||
"DateTime": "${ref_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
},
|
||||
"CustomFields": [
|
||||
{
|
||||
"Key": "depot",
|
||||
"Value": "${carrier_apt.physical_depot?json_string}"
|
||||
},
|
||||
{
|
||||
"Key": "year",
|
||||
"Value": "${carrier_apt.year_number?json_string}"
|
||||
},
|
||||
{
|
||||
"Key": "number",
|
||||
"Value": "${carrier_apt.appointment_number?json_string}"
|
||||
},
|
||||
{
|
||||
"Key": "reference",
|
||||
"Value": "${carrier_apt.appointment_reference?json_string}"
|
||||
},
|
||||
{
|
||||
"Key": "carrier",
|
||||
"Value": "${carrier_apt.planned_carrier?json_string}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Payload":{
|
||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -27,38 +27,65 @@
|
||||
<#case "CommissionsUpdated">
|
||||
<#assign appointment = eventRP.data />
|
||||
[
|
||||
<#if appointment.appointmentCustomFields?? && appointment.appointmentCustomFields?has_content>
|
||||
{
|
||||
<#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_association>
|
||||
<#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_number>
|
||||
"apiRestReflexID" : "${apiRestReflexID}",
|
||||
"datas" :
|
||||
<#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl">
|
||||
<#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 />
|
||||
[
|
||||
{
|
||||
<#assign apiRestReflexID = ApiRestReflexID.appointment_put_update>
|
||||
"apiRestReflexID" : "${apiRestReflexID}",
|
||||
"datas" :
|
||||
<#include "RPtoRFX_CarrierAppointmentSlotUpdated.ftl">
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
<#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 />
|
||||
[
|
||||
{
|
||||
<#assign apiRestReflexID = ApiRestReflexID.appointment_put_update>
|
||||
"apiRestReflexID" : "${apiRestReflexID}",
|
||||
"datas" :
|
||||
<#include "RPtoRFX_CarrierAppointmentCanceled.ftl">
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
<#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>
|
||||
|
||||
@ -1,32 +0,0 @@
|
||||
{
|
||||
"id" : {"refid" : "${eventRP.refid?json_string}"},
|
||||
"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",
|
||||
"planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime,time_zone_rfx)}",
|
||||
"planned_load_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime?datetime.iso,appointment.Slot.DurationInSeconds?number)?iso_nz(time_zone_rfx)}",
|
||||
<#break>
|
||||
<#case "APPOINTMENT_TYPE_UNLOADING">
|
||||
"unloading_appointment" : "true",
|
||||
"load_appointment" : "false",
|
||||
"planned_unloading_start_datetime" : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime,time_zone_rfx)}",
|
||||
"planned_unloading_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime?datetime.iso,appointment.Slot.DurationInSeconds?number)?iso_nz(time_zone_rfx)}",
|
||||
<#break>
|
||||
<#default>
|
||||
<#stop "appointment.AppointmentType not implemented" >
|
||||
</#switch>
|
||||
"status": {
|
||||
"status_code": "999",
|
||||
"cancellation_reason_code": "ACS"
|
||||
}
|
||||
}
|
||||
}
|
||||
17
RPtoRFX_CarrierAppointmentCanceledByNumberftl
Normal file
17
RPtoRFX_CarrierAppointmentCanceledByNumberftl
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"id" : {"refid" : "${eventRP.refid?json_string}"},
|
||||
"route" : "rest/public/v1/physical_depots/{physical_depot_code}/appointment_years/{appointment_year}/appointment_numbers/{appointment_number}/status",
|
||||
"method" : "PUT",
|
||||
"uri_substitutions": {
|
||||
"physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}",
|
||||
"appointment_year":"${appointment.appointmentCustomFields.year?json_string}",
|
||||
"appointment_number":"${appointment.appointmentCustomFields.number?json_string}"
|
||||
},
|
||||
"payload" :
|
||||
{
|
||||
"status": {
|
||||
"status_code": "999",
|
||||
"cancellation_reason_code": "ACS"
|
||||
}
|
||||
}
|
||||
}
|
||||
16
RPtoRFX_CarrierAppointmentCanceledByRef.ftl
Normal file
16
RPtoRFX_CarrierAppointmentCanceledByRef.ftl
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"id" : {"refid" : "${eventRP.refid?json_string}"},
|
||||
"route" : "rest/public/v1/physical_depots/{physical_depot_code}/carrier_appointments/{appointment_reference}/status",
|
||||
"method" : "PUT",
|
||||
"uri_substitutions": {
|
||||
"physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}",
|
||||
"appointment_reference":"${eventRP.refid?json_string}"
|
||||
},
|
||||
"payload" :
|
||||
{
|
||||
"status": {
|
||||
"status_code": "999",
|
||||
"cancellation_reason_code": "ACS"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
{
|
||||
"id" : {"refid" : "${eventRP.refid?json_string}"},
|
||||
"route" : "rest/public/v1/physical_depots/{physical_depot_code}/appointment_years/{appointment_year}/appointment_numbers/{appointment_number}/physical_receipt_associations",
|
||||
"method" : "POST",
|
||||
"uri_substitutions": {
|
||||
"physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}",
|
||||
"appointment_year":"${appointment.appointmentCustomFields.year?json_string}",
|
||||
"appointment_number":"${appointment.appointmentCustomFields.number?json_string}"
|
||||
},
|
||||
"payload" :
|
||||
{
|
||||
<#if appointment.Commissions??>
|
||||
<#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING">
|
||||
"physical_receipt_list": [
|
||||
<#list eventRP.executionflowCustomFields.entrySet() as custom>
|
||||
{
|
||||
"receipt_activity": "${custom.value.activity_code?json_string}",
|
||||
"originator_code": "${custom.value.originator_code?json_string}",
|
||||
"physical_receipt_reference": "${custom.value.reference?json_string}",
|
||||
"receipt_year": "${custom.value.order_year?json_string}",
|
||||
"receipt_number": "${custom.value.order_number?json_string}"
|
||||
}
|
||||
<#sep>,</#sep>
|
||||
</#list>
|
||||
]
|
||||
<#else>
|
||||
<#if appointment.AppointmentType == "APPOINTMENT_TYPE_LOADING">
|
||||
"appointment_designation":"LOADING"
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
}
|
||||
}
|
||||
32
RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl
Normal file
32
RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl
Normal file
@ -0,0 +1,32 @@
|
||||
{
|
||||
"id" : {"refid" : "${eventRP.refid?json_string}"},
|
||||
"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":"${appointment.appointmentCustomFields.year?json_string}",
|
||||
"appointment_number":"${appointment.appointmentCustomFields.number?json_string}"
|
||||
},
|
||||
"payload" :
|
||||
{
|
||||
<#switch appointment.AppointmentType>
|
||||
<#case "APPOINTMENT_TYPE_LOADING">
|
||||
|
||||
"unloading_appointment" : "false",
|
||||
"load_appointment" : "true",
|
||||
"planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime,time_zone_rfx)}",
|
||||
"planned_load_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime?datetime.iso,appointment.Slot.DurationInSeconds?number)?iso_nz(time_zone_rfx)}"
|
||||
|
||||
<#break>
|
||||
|
||||
<#case "APPOINTMENT_TYPE_UNLOADING">
|
||||
"unloading_appointment" : "true",
|
||||
"load_appointment" : "false",
|
||||
"planned_unloading_start_datetime" : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime,time_zone_rfx)}",
|
||||
"planned_unloading_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime?datetime.iso,appointment.Slot.DurationInSeconds?number)?iso_nz(time_zone_rfx)}"
|
||||
<#break>
|
||||
<#default>
|
||||
<#stop "appointment.AppointmentType not implemented" >
|
||||
</#switch>
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user