SCPN1-10100
This commit is contained in:
parent
4e436a918d
commit
45aac87589
@ -37,6 +37,7 @@
|
|||||||
<#include "RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl">
|
<#include "RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl">
|
||||||
},
|
},
|
||||||
<#include "RFXtoRP_HsrCarrierApt_AppointmentMetadataUpdated.ftl">
|
<#include "RFXtoRP_HsrCarrierApt_AppointmentMetadataUpdated.ftl">
|
||||||
|
<#include "RFXtoRP_HsrCarrierApt_AppointmentCarrierInformationUpdated.ftl">
|
||||||
<#if carrier_apt.status?? && (carrier_apt.status.status_code=="999" || carrier_apt.status.status_code=="040" || carrier_apt.status.status_code=="030")>
|
<#if carrier_apt.status?? && (carrier_apt.status.status_code=="999" || carrier_apt.status.status_code=="040" || carrier_apt.status.status_code=="030")>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@ -107,7 +108,6 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#else>
|
<#else>
|
||||||
<#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0) && ((carrier_apt.unloading_appointment =="true" && carrier_apt.load_appointment =="false") || (carrier_apt.unloading_appointment =="false" && carrier_apt.load_appointment =="true"))>
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.SiteWMSUpdateAppointment>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.SiteWMSUpdateAppointment>
|
||||||
@ -116,16 +116,6 @@
|
|||||||
<#include "RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl">
|
<#include "RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#else>
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.SiteForceRescheduleAppointment>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl">
|
|
||||||
}
|
|
||||||
]
|
|
||||||
</#if>
|
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
@ -138,7 +128,7 @@
|
|||||||
<#case "D">
|
<#case "D">
|
||||||
<#-- *********************************************** Action = Delete ******************** -->
|
<#-- *********************************************** Action = Delete ******************** -->
|
||||||
[
|
[
|
||||||
<#-- Ajout des lignes-->
|
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.SiteCancelAppointment>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.SiteCancelAppointment>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
|||||||
@ -0,0 +1,9 @@
|
|||||||
|
<#-- A décommenter si besoin de les utiliser-->
|
||||||
|
<#-- Uncomment if you need to use them-->
|
||||||
|
<#--{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierInformationUpdated>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrCarrierApt_AppointmentCarrierInformationUpdatedToConfigure.ftl">
|
||||||
|
},
|
||||||
|
-->
|
||||||
@ -0,0 +1,42 @@
|
|||||||
|
<#--
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"RefID": "${carrier_apt.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
}
|
||||||
|
"Payload": {
|
||||||
|
"ActorID": "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
||||||
|
<#--To configure-->
|
||||||
|
<#-- "CarrierInformation": [
|
||||||
|
{
|
||||||
|
"Key": "string",
|
||||||
|
"Value": {
|
||||||
|
"Bool": "true / false",
|
||||||
|
"Float": 3.1415,
|
||||||
|
"Int": 42,
|
||||||
|
"String": "Hello World !",
|
||||||
|
"Timestamp": {
|
||||||
|
"AuthorTimeZone": "Europe/Paris",
|
||||||
|
"DateTime": "2023-01-01T00:00:00Z"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
-->
|
||||||
@ -42,6 +42,14 @@
|
|||||||
{
|
{
|
||||||
"Key": "carrier",
|
"Key": "carrier",
|
||||||
"Value": "${carrier_apt.planned_carrier?json_string}"
|
"Value": "${carrier_apt.planned_carrier?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "loading",
|
||||||
|
"Value": "${carrier_apt.load_appointment?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "unloading",
|
||||||
|
"Value": "${carrier_apt.unloading_appointment?json_string}"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@ -7,15 +7,15 @@
|
|||||||
"ID": {
|
"ID": {
|
||||||
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
"AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
"RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
<#else>
|
<#else>
|
||||||
"AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
</#if>
|
</#if>
|
||||||
<#else>
|
<#else>
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
"AppointmentID": "${carrier_apt.appointment_reference?json_string}",
|
"RefID": "${carrier_apt.appointment_reference?json_string}",
|
||||||
<#else>
|
<#else>
|
||||||
"AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
}
|
}
|
||||||
|
|||||||
@ -75,6 +75,14 @@
|
|||||||
{
|
{
|
||||||
"Key": "carrier",
|
"Key": "carrier",
|
||||||
"Value": "${carrier_apt.planned_carrier?json_string}"
|
"Value": "${carrier_apt.planned_carrier?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "loading",
|
||||||
|
"Value": "${carrier_apt.load_appointment?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "unloading",
|
||||||
|
"Value": "${carrier_apt.unloading_appointment?json_string}"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
<#include "RFXtoRP_HsrCarrierApt_SegmentationSelections.ftl">,
|
<#include "RFXtoRP_HsrCarrierApt_SegmentationSelections.ftl">,
|
||||||
|
|||||||
@ -50,7 +50,7 @@
|
|||||||
</#if>
|
</#if>
|
||||||
<#else>
|
<#else>
|
||||||
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN>
|
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN>
|
||||||
<#assign duration = 0 /> <#-- à confirmer -->
|
<#assign duration = 0 />
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
@ -77,9 +77,17 @@
|
|||||||
{
|
{
|
||||||
"Key": "carrier",
|
"Key": "carrier",
|
||||||
"Value": "${carrier_apt.planned_carrier?json_string}"
|
"Value": "${carrier_apt.planned_carrier?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "loading",
|
||||||
|
"Value": "${carrier_apt.load_appointment?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "unloading",
|
||||||
|
"Value": "${carrier_apt.unloading_appointment?json_string}"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
<#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0)>
|
<#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0) && ((carrier_apt.unloading_appointment =="true" && carrier_apt.load_appointment =="false") || (carrier_apt.unloading_appointment =="false" && carrier_apt.load_appointment =="true"))>
|
||||||
"Commissions": [
|
"Commissions": [
|
||||||
<#list carrier_apt.physical_receipt_list?filter(l ->l??) as physical_receipt>
|
<#list carrier_apt.physical_receipt_list?filter(l ->l??) as physical_receipt>
|
||||||
{
|
{
|
||||||
@ -95,13 +103,6 @@
|
|||||||
</#list>
|
</#list>
|
||||||
],
|
],
|
||||||
<#else>
|
<#else>
|
||||||
"Commissions": [
|
|
||||||
{
|
|
||||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
|
||||||
"ProjectID": "${projectRP}",
|
|
||||||
<#include "RFXtoRP_HsrCarrierApt_Quantities.ftl">
|
|
||||||
}
|
|
||||||
],
|
|
||||||
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
||||||
"Reason": "UNLOADING AND LOADING / ${carrier_apt.appointment_designation?json_string}",
|
"Reason": "UNLOADING AND LOADING / ${carrier_apt.appointment_designation?json_string}",
|
||||||
<#else>
|
<#else>
|
||||||
|
|||||||
@ -1,84 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
<#assign creation_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) />
|
|
||||||
"Header":{
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
|
||||||
"AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
|
||||||
<#else>
|
|
||||||
"AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
|
||||||
"AppointmentID": "${carrier_apt.appointment_reference?json_string}",
|
|
||||||
<#else>
|
|
||||||
"AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
|
||||||
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false">
|
|
||||||
<#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") || carrier_apt.planned_unloading_end_datetime?starts_with("00") || carrier_apt.planned_unloading_end_datetime?contains("-00-")>
|
|
||||||
<#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend is not initialized" >
|
|
||||||
</#if>
|
|
||||||
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
|
||||||
<#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_unloading_end_datetime?datetime.iso) />
|
|
||||||
<#if (duration <= 0)>
|
|
||||||
<#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" >
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" >
|
|
||||||
<#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-") || carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-")>
|
|
||||||
<#stop "planned_load_start_datetime or planned_load_end_datetime field of appointmend is not initialized" >
|
|
||||||
</#if>
|
|
||||||
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_LOADING>
|
|
||||||
<#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_load_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) />
|
|
||||||
<#if (duration <= 0)>
|
|
||||||
<#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" >
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
|
||||||
<#if carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-") || carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") >
|
|
||||||
<#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend is not initialized" >
|
|
||||||
</#if>
|
|
||||||
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
|
||||||
<#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) />
|
|
||||||
<#if (duration <= 0)>
|
|
||||||
<#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend are not valid" >
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN>
|
|
||||||
<#assign duration = 0 /> <#-- à confirmer -->
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
"Slots": [{
|
|
||||||
<#-- calcul de de la durée en fonction des start et end time-->
|
|
||||||
"DurationInSeconds": "${duration}",
|
|
||||||
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false" >
|
|
||||||
<#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-")>
|
|
||||||
<#stop "planned_unloading_start_datetime field of appointmend is not initialized" >
|
|
||||||
</#if>
|
|
||||||
"StartDateTime": "${carrier_apt.planned_unloading_start_datetime}"
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true">
|
|
||||||
<#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-")>
|
|
||||||
<#stop "planned_load_start_datetime field of appointmend is not initialized" >
|
|
||||||
</#if>
|
|
||||||
"StartDateTime": "${carrier_apt.planned_load_start_datetime}"
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
|
||||||
<#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-")>
|
|
||||||
<#stop "planned_unloading_start_datetime field of appointmend is not initialized" >
|
|
||||||
</#if>
|
|
||||||
"StartDateTime": "${carrier_apt.planned_unloading_start_datetime}"
|
|
||||||
<#else>
|
|
||||||
<#stop "Appointment type not supported" >
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
}]
|
|
||||||
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@ -66,12 +66,28 @@
|
|||||||
</#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_CarrierAppointmentReasonUpdatedByNumber.ftl">
|
||||||
|
}
|
||||||
|
<#else>
|
||||||
|
{
|
||||||
|
<#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_ref>
|
||||||
|
"apiRestReflexID" : "${apiRestReflexID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RPtoRFX_CarrierAppointmentReasonUpdatedByRef.ftl">
|
||||||
|
}
|
||||||
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
<#-- *********************************************** Action = SlotUpdated ******************** -->
|
<#-- *********************************************** Action = SlotUpdated or CarrierInformationUpdated or ReasonUpdated******************** -->
|
||||||
<#case "SlotUpdated">
|
<#case "SlotUpdated">
|
||||||
|
<#case "CarrierInformationUpdated">
|
||||||
|
<#case "ReasonUpdated">
|
||||||
<#assign appointment = eventRP.data />
|
<#assign appointment = eventRP.data />
|
||||||
[
|
[
|
||||||
<#if eventRP.appointmentCustomFields?has_content>
|
<#if eventRP.appointmentCustomFields?has_content>
|
||||||
@ -79,19 +95,19 @@
|
|||||||
<#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_number>
|
<#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_number>
|
||||||
"apiRestReflexID" : "${apiRestReflexID}",
|
"apiRestReflexID" : "${apiRestReflexID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl">
|
<#include "RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl">
|
||||||
}
|
}
|
||||||
<#else>
|
<#else>
|
||||||
{
|
{
|
||||||
<#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_ref>
|
<#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_ref>
|
||||||
"apiRestReflexID" : "${apiRestReflexID}",
|
"apiRestReflexID" : "${apiRestReflexID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl">
|
<#include "RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl">
|
||||||
}
|
}
|
||||||
</#if>
|
</#if>
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
<#-- *********************************************** Action = SlotUpdated ******************** -->
|
<#-- *********************************************** Action = Canceled ******************** -->
|
||||||
<#case "Canceled">
|
<#case "Canceled">
|
||||||
<#assign appointment = eventRP.data />
|
<#assign appointment = eventRP.data />
|
||||||
[
|
[
|
||||||
|
|||||||
21
RPtoRFX_CarrierAppointmentDataUpdated.ftl
Normal file
21
RPtoRFX_CarrierAppointmentDataUpdated.ftl
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<#-- Note : you can use Order Line Metadata, using the define map : Line_MetaData_Map -->
|
||||||
|
<#-- Note : you can use Order Line Segmentation keys, using the define map : SegmentationKeys_Map -->
|
||||||
|
|
||||||
|
<#-- How to use MD or SK map
|
||||||
|
<#if appointment.CarrierInformation??>
|
||||||
|
<#assign CarrierInformation_Map = JsonUtil.sequenceToMap(appointment.CarrierInformation, "Key", "Value") />
|
||||||
|
<#if CarrierInformation_Map["Immatriculation"]??>
|
||||||
|
<#assign registration_number1 = CarrierInformation_Map["Immatriculation"].String!""/>
|
||||||
|
"registration_number":"${registration_number1}",
|
||||||
|
<#else>
|
||||||
|
"registration_number":"no plate number",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
If your SK is :
|
||||||
|
Boolean : .Bool
|
||||||
|
Float : .Float
|
||||||
|
Timestamp : .Timestamp.DateTime or .Timestamp.AuthorTimeZone
|
||||||
|
Int : .Int
|
||||||
|
String : .String
|
||||||
|
-->
|
||||||
@ -9,10 +9,10 @@
|
|||||||
},
|
},
|
||||||
"payload" :
|
"payload" :
|
||||||
{
|
{
|
||||||
<#switch appointment.AppointmentType>
|
"unloading_appointment" : "${eventRP.appointmentCustomFields.unloading?json_string}",
|
||||||
|
"load_appointment" : "${eventRP.appointmentCustomFields.loading?json_string}",
|
||||||
|
<#switch appointment.AppointmentType>
|
||||||
<#case "APPOINTMENT_TYPE_LOADING">
|
<#case "APPOINTMENT_TYPE_LOADING">
|
||||||
"unloading_appointment" : "false",
|
|
||||||
"load_appointment" : "true",
|
|
||||||
<#if appointment.TimeZone?? && appointment.TimeZone!="">
|
<#if appointment.TimeZone?? && appointment.TimeZone!="">
|
||||||
"planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}",
|
"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)}",
|
"planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}",
|
||||||
@ -22,8 +22,6 @@
|
|||||||
</#if>
|
</#if>
|
||||||
<#break>
|
<#break>
|
||||||
<#case "APPOINTMENT_TYPE_UNLOADING">
|
<#case "APPOINTMENT_TYPE_UNLOADING">
|
||||||
"unloading_appointment" : "true",
|
|
||||||
"load_appointment" : "false",
|
|
||||||
<#if appointment.TimeZone?? && appointment.TimeZone!="">
|
<#if appointment.TimeZone?? && appointment.TimeZone!="">
|
||||||
"planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}",
|
"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)}",
|
"planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}",
|
||||||
39
RPtoRFX_CarrierAppointmentReasonUpdatedByRef.ftl
Normal file
39
RPtoRFX_CarrierAppointmentReasonUpdatedByRef.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}"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,39 @@
|
|||||||
|
{
|
||||||
|
"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" :
|
||||||
|
{
|
||||||
|
<#include "RPtoRFX_CarrierAppointmentDataUpdated.ftl">
|
||||||
|
"unloading_appointment" : "${eventRP.appointmentCustomFields.unloading?json_string}",
|
||||||
|
"load_appointment" : "${eventRP.appointmentCustomFields.loading?json_string}",
|
||||||
|
<#switch appointment.AppointmentType>
|
||||||
|
<#case "APPOINTMENT_TYPE_LOADING">
|
||||||
|
<#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">
|
||||||
|
<#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}"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -8,6 +8,7 @@
|
|||||||
},
|
},
|
||||||
"payload" :
|
"payload" :
|
||||||
{
|
{
|
||||||
|
<#include "RPtoRFX_CarrierAppointmentDataUpdated.ftl">
|
||||||
<#switch appointment.AppointmentType>
|
<#switch appointment.AppointmentType>
|
||||||
<#case "APPOINTMENT_TYPE_LOADING">
|
<#case "APPOINTMENT_TYPE_LOADING">
|
||||||
"unloading_appointment" : "false",
|
"unloading_appointment" : "false",
|
||||||
Loading…
x
Reference in New Issue
Block a user