diff --git a/RFXtoRP_HsaLstCarSta.ftl b/RFXtoRP_HsaLstCarSta.ftl deleted file mode 100644 index a8aa244..0000000 --- a/RFXtoRP_HsaLstCarSta.ftl +++ /dev/null @@ -1,89 +0,0 @@ -<#-- **** input parameters ***** --> -<#-- input : message RFX --> -<#-- project : projectId in ReflexPlatform --> -<#-- organisation : organisationtId in ReflexPlatform --> -<#include "ActorPrefix.ftl"> -<#include "HfRpConfig.ftl"> -<#include "ReflexUtils.ftl"> - -<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> -<#assign projectRP = project> - -<#assign organisationRP = organisation> - -<#assign aDateTime = .now> - -<#switch cloudEventMsg.action> - <#case "C"> - <#case "U"> - <#-- *********************************************** Action = Update ******************** --> - <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> - <#assign carrier_apt_status = JsonUtil.jsonToMap(dataRfx)> - <#if !carrier_apt_status.status??> - <#stop 'the updated appointment Status not initialized'> - - [ - { - <#switch carrier_apt_status.status.carrier_status_code> - <#case "010"> <#--Carrier Expected --> - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierExpected> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsaLstCarSta_CarrierExpected.ftl"> - <#break> - <#case "020"> <#--Carrier Arrived--> - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierArrived> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsaLstCarSta_CarrierArrived.ftl"> - <#break> - <#case "040"> <#--Unloading Started --> - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentUnloadingStarted> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsaLstCarSta_UnloadingStarted.ftl"> - <#break> - <#case "050"> <#--Unloading Completed--> - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentUnloadingCompleted> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsaLstCarSta_UnloadingCompleted.ftl"> - <#break> - <#case "060"> <#--Loading Started--> - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentLoadingStarted> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsaLstCarSta_LoadingStarted.ftl"> - <#break> - <#case "070"> <#--Loading Completed--> - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentLoadingCompleted> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsaLstCarSta_LoadingCompleted.ftl"> - <#break> - <#case "090"> <#--Carrier Departed--> - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierDeparted> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsaLstCarSta_CarrierDeparted.ftl"> - <#break> - - <#default> - <#stop 'this updated appointment Status not implemented'> - - - - } - ] - <#break> - -<#case "D"> - <#-- *********************************************** Action = Delete ******************** --> - <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> - <#assign carrier_apt_status = JsonUtil.jsonToMap(dataRfx)> - <#stop 'Delete Appointment Status not implemented' > - <#break> - <#default> - <#stop > - - diff --git a/RFXtoRP_HsaLstCarSta_CarrierArrived.ftl b/RFXtoRP_HsaLstCarSta_CarrierArrived.ftl deleted file mode 100644 index 1cd4134..0000000 --- a/RFXtoRP_HsaLstCarSta_CarrierArrived.ftl +++ /dev/null @@ -1,30 +0,0 @@ -[ - <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) /> - { - "Header": { - "ProjectID": "${projectRP}" - }, - "ID": { - <#if carrier_apt_status.constant_appointment?? && carrier_apt_status.constant_appointment== "true"> - <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference!=""> - "RefID": "${carrier_apt_status.appointment_reference?json_string}-${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}", - <#else> - "RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}", - - <#else> - <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !=""> - "RefID": "${carrier_apt_status.appointment_reference?json_string}", - <#else> - "RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}", - - - "RefDate": { - "DateTime": "${ref_datetime}", - "AuthorTimeZone": "${time_zone_rfx}" - } - }, - "Payload":{ - "ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}" - } - } -] \ No newline at end of file diff --git a/RFXtoRP_HsaLstCarSta_CarrierDeparted.ftl b/RFXtoRP_HsaLstCarSta_CarrierDeparted.ftl deleted file mode 100644 index c5648cd..0000000 --- a/RFXtoRP_HsaLstCarSta_CarrierDeparted.ftl +++ /dev/null @@ -1,30 +0,0 @@ -[ - <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) /> - { - "Header": { - "ProjectID": "${projectRP}" - }, - "ID": { - <#if carrier_apt_status.constant_appointment?? && carrier_apt_status.constant_appointment== "true"> - <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference!=""> - "RefID": "${carrier_apt_status.appointment_reference?json_string}-${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}", - <#else> - "RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}", - - <#else> - <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !=""> - "RefID": "${carrier_apt_status.appointment_reference?json_string}", - <#else> - "RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}", - - - "RefDate": { - "DateTime": "${ref_datetime}", - "AuthorTimeZone": "${time_zone_rfx}" - } - }, - "Payload":{ - "ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}" - } - } -] \ No newline at end of file diff --git a/RFXtoRP_HsaLstCarSta_CarrierExpected.ftl b/RFXtoRP_HsaLstCarSta_CarrierExpected.ftl deleted file mode 100644 index 424c2ef..0000000 --- a/RFXtoRP_HsaLstCarSta_CarrierExpected.ftl +++ /dev/null @@ -1,31 +0,0 @@ -[ - <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) /> - <#assign ref_datetime2 = AddSecondsToDatetime(ref_datetime?datetime.iso, 1)?iso_utc /> - { - "Header": { - "ProjectID": "${projectRP}" - }, - "ID": { - <#if carrier_apt_status.constant_appointment?? && carrier_apt_status.constant_appointment== "true"> - <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference!=""> - "RefID": "${carrier_apt_status.appointment_reference?json_string}-${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}", - <#else> - "RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}", - - <#else> - <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !=""> - "RefID": "${carrier_apt_status.appointment_reference?json_string}", - <#else> - "RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}", - - - "RefDate": { - "DateTime": "${ref_datetime2}", - "AuthorTimeZone": "${time_zone_rfx}" - } - }, - "Payload":{ - "ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}" - } - } -] \ No newline at end of file diff --git a/RFXtoRP_HsaLstCarSta_LoadingCompleted.ftl b/RFXtoRP_HsaLstCarSta_LoadingCompleted.ftl deleted file mode 100644 index 4fe7837..0000000 --- a/RFXtoRP_HsaLstCarSta_LoadingCompleted.ftl +++ /dev/null @@ -1,30 +0,0 @@ -[ - <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) /> - { - "Header": { - "ProjectID": "${projectRP}" - }, - "ID": { - <#if carrier_apt_status.constant_appointment?? && carrier_apt_status.constant_appointment== "true"> - <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference!=""> - "RefID": "${carrier_apt_status.appointment_reference?json_string}-${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}", - <#else> - "RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}", - - <#else> - <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !=""> - "RefID": "${carrier_apt_status.appointment_reference?json_string}", - <#else> - "RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}", - - - "RefDate": { - "DateTime": "${ref_datetime}", - "AuthorTimeZone": "${time_zone_rfx}" - } - }, - "Payload":{ - "ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}" - } - } -] \ No newline at end of file diff --git a/RFXtoRP_HsaLstCarSta_LoadingStarted.ftl b/RFXtoRP_HsaLstCarSta_LoadingStarted.ftl deleted file mode 100644 index 4fe7837..0000000 --- a/RFXtoRP_HsaLstCarSta_LoadingStarted.ftl +++ /dev/null @@ -1,30 +0,0 @@ -[ - <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) /> - { - "Header": { - "ProjectID": "${projectRP}" - }, - "ID": { - <#if carrier_apt_status.constant_appointment?? && carrier_apt_status.constant_appointment== "true"> - <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference!=""> - "RefID": "${carrier_apt_status.appointment_reference?json_string}-${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}", - <#else> - "RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}", - - <#else> - <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !=""> - "RefID": "${carrier_apt_status.appointment_reference?json_string}", - <#else> - "RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}", - - - "RefDate": { - "DateTime": "${ref_datetime}", - "AuthorTimeZone": "${time_zone_rfx}" - } - }, - "Payload":{ - "ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}" - } - } -] \ No newline at end of file diff --git a/RFXtoRP_HsaLstCarSta_UnloadingCompleted.ftl b/RFXtoRP_HsaLstCarSta_UnloadingCompleted.ftl deleted file mode 100644 index 4fe7837..0000000 --- a/RFXtoRP_HsaLstCarSta_UnloadingCompleted.ftl +++ /dev/null @@ -1,30 +0,0 @@ -[ - <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) /> - { - "Header": { - "ProjectID": "${projectRP}" - }, - "ID": { - <#if carrier_apt_status.constant_appointment?? && carrier_apt_status.constant_appointment== "true"> - <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference!=""> - "RefID": "${carrier_apt_status.appointment_reference?json_string}-${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}", - <#else> - "RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}", - - <#else> - <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !=""> - "RefID": "${carrier_apt_status.appointment_reference?json_string}", - <#else> - "RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}", - - - "RefDate": { - "DateTime": "${ref_datetime}", - "AuthorTimeZone": "${time_zone_rfx}" - } - }, - "Payload":{ - "ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}" - } - } -] \ No newline at end of file diff --git a/RFXtoRP_HsaLstCarSta_UnloadingStarted.ftl b/RFXtoRP_HsaLstCarSta_UnloadingStarted.ftl deleted file mode 100644 index 4fe7837..0000000 --- a/RFXtoRP_HsaLstCarSta_UnloadingStarted.ftl +++ /dev/null @@ -1,30 +0,0 @@ -[ - <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) /> - { - "Header": { - "ProjectID": "${projectRP}" - }, - "ID": { - <#if carrier_apt_status.constant_appointment?? && carrier_apt_status.constant_appointment== "true"> - <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference!=""> - "RefID": "${carrier_apt_status.appointment_reference?json_string}-${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}", - <#else> - "RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}", - - <#else> - <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !=""> - "RefID": "${carrier_apt_status.appointment_reference?json_string}", - <#else> - "RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}", - - - "RefDate": { - "DateTime": "${ref_datetime}", - "AuthorTimeZone": "${time_zone_rfx}" - } - }, - "Payload":{ - "ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}" - } - } -] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt.ftl b/RFXtoRP_HsrCarrierApt.ftl deleted file mode 100644 index 8060999..0000000 --- a/RFXtoRP_HsrCarrierApt.ftl +++ /dev/null @@ -1,150 +0,0 @@ -<#-- **** input parameters ***** --> -<#-- input : message HARDIS-WMS --> -<#-- project : projectId in ReflexPlatform --> -<#-- organisation : organisationtId in ReflexPlatform --> -<#include "ActorPrefix.ftl"> -<#include "HfRpConfig.ftl"> -<#include "ReflexUtils.ftl"> - -<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> -<#assign projectRP = project> -<#assign organisationRP = organisation> -<#assign partnerApplicationRP = partnerApplication> - -<#assign aDateTime = .now> - -<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> -<#assign carrier_apt = JsonUtil.jsonToMap(dataRfx)> - -<#switch cloudEventMsg.action> - <#case "C"> - <#-- *********************************************** Action = CREATE or UPDATE ******************** --> - [ - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.BookingForceBookAppointment> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierExpected> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrCarrierApt_CarrierExpected.ftl"> - } - ] - <#break> - <#case "U"> - <#-- *********************************************** Action = Update ********************--> - [ - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCustomFieldsUpdated> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.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")> - [ - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.BookingForceCancelAppointment> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrCarrierApt_BookingForceCancelAppointment.ftl"> - } - ] - <#else> - <#if carrier_apt.status?? && carrier_apt.status.status_code=="100"> <#--Carrier Arrived--> - [ - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierArrived> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrCarrierApt_CarrierArrived.ftl"> - } - ] - <#else> - <#if carrier_apt.status?? && carrier_apt.status.status_code=="210"> <#--Unloading Started --> - [ - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentUnloadingStarted> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrCarrierApt_UnloadingStarted.ftl"> - } - ] - <#else> - <#if carrier_apt.status?? && carrier_apt.status.status_code=="290"><#--Unloading Completed--> - [ - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentUnloadingCompleted> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrCarrierApt_UnloadingCompleted.ftl"> - } - ] - <#else> - <#if carrier_apt.status?? && carrier_apt.status.status_code=="310"><#--Loading Started--> - [ - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentLoadingStarted> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrCarrierApt_LoadingStarted.ftl"> - } - ] - <#else> - <#if carrier_apt.status?? && carrier_apt.status.status_code=="390"><#--Loading Completed--> - [ - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentLoadingCompleted> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrCarrierApt_LoadingCompleted.ftl"> - } - ] - <#else> - <#if carrier_apt.status?? && carrier_apt.status.status_code=="500"><#--Carrier Departed--> - [ - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierDeparted> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrCarrierApt_CarrierDeparted.ftl"> - } - ] - <#else> - [ - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.BookingWMSUpdateAppointment> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl"> - } - ] - - - - - - - - ] - <#break> -<#case "D"> - <#-- *********************************************** Action = Delete ******************** --> - [ - <#-- Ajout des lignes--> - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.BookingForceCancelAppointment> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrCarrierApt_BookingForceCancelAppointment.ftl"> - } - ] - <#break> - <#default> - <#stop > - - diff --git a/RFXtoRP_HsrCarrierApt_AppointmentCarrierInformationUpdated.ftl b/RFXtoRP_HsrCarrierApt_AppointmentCarrierInformationUpdated.ftl deleted file mode 100644 index 9ae2079..0000000 --- a/RFXtoRP_HsrCarrierApt_AppointmentCarrierInformationUpdated.ftl +++ /dev/null @@ -1,9 +0,0 @@ - <#-- 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"> - }, ---> \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_AppointmentCarrierInformationUpdatedToConfigure.ftl b/RFXtoRP_HsrCarrierApt_AppointmentCarrierInformationUpdatedToConfigure.ftl deleted file mode 100644 index 39cf8d2..0000000 --- a/RFXtoRP_HsrCarrierApt_AppointmentCarrierInformationUpdatedToConfigure.ftl +++ /dev/null @@ -1,42 +0,0 @@ -<#-- - [ - { - "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}" - - <#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}" - - - }, - "Payload": { - "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" - } - } - ] - } -} -] ---> \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl b/RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl deleted file mode 100644 index 0fbed91..0000000 --- a/RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl +++ /dev/null @@ -1,60 +0,0 @@ -[ - <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) /> - { - "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}", - - <#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}", - - - "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}" - }, - { - "Key": "loading", - "Value": "${carrier_apt.load_appointment?json_string}" - }, - { - "Key": "unloading", - "Value": "${carrier_apt.unloading_appointment?json_string}" - } - ] - }, - "Payload":{ - "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" - } - } -] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_AppointmentMetadataUpdated.ftl b/RFXtoRP_HsrCarrierApt_AppointmentMetadataUpdated.ftl deleted file mode 100644 index 8769708..0000000 --- a/RFXtoRP_HsrCarrierApt_AppointmentMetadataUpdated.ftl +++ /dev/null @@ -1,9 +0,0 @@ - <#-- A décommenter si besoin de les utiliser--> - <#-- Uncomment if you need to use them--> - <#--{ - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentMetaDataUpdated> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrCarrierApt_AppointmentMetadataUpdatedToConfigure.ftl"> - }, ---> \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_AppointmentMetadataUpdatedToConfigure.ftl b/RFXtoRP_HsrCarrierApt_AppointmentMetadataUpdatedToConfigure.ftl deleted file mode 100644 index 4f2bec9..0000000 --- a/RFXtoRP_HsrCarrierApt_AppointmentMetadataUpdatedToConfigure.ftl +++ /dev/null @@ -1,42 +0,0 @@ -<#-- - [ - { - "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}" - - <#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}" - - - }, - "Payload": { - "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", - <#--To configure--> -<#-- "MetaData": [ - { - "Key": "string", - "Value": { - "Bool": "true / false", - "Float": 3.1415, - "Int": 42, - "String": "Hello World !", - "Timestamp": { - "AuthorTimeZone": "Europe/Paris", - "DateTime": "2023-01-01T00:00:00Z" - } - } - ] - } -} -] ---> \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl deleted file mode 100644 index 5c64918..0000000 --- a/RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl +++ /dev/null @@ -1,194 +0,0 @@ -[ - <#assign creation_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) /> - { - "Header":{ - "ProjectID": "${projectRP}:${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" - }, - "ID":{ - "RefDate": { - "DateTime": "${creation_datetime}", - "AuthorTimeZone": "${time_zone_rfx}" - }, - <#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}", - - <#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}", - - - "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}" - }, - { - "Key": "loading", - "Value": "${carrier_apt.load_appointment?json_string}" - }, - { - "Key": "unloading", - "Value": "${carrier_apt.unloading_appointment?json_string}" - } - ] - }, - "Payload": { - "TimeZone":"${time_zone_rfx}", - <#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" > - - <#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" > - <#else> - <#if (duration == 0)> - <#assign duration = 1 /> - - - <#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" > - - <#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_load_start_datetime or planned_load_end_datetime field of appointmend are not valid" > - <#else> - <#if (duration == 0)> - <#assign duration = 1 /> - - - <#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" > - - <#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" > - <#else> - <#if (duration == 0)> - <#assign duration = 1 /> - - - <#else> - <#stop "Appointment type not supported" > - - - - "AppointmentType": "${appointmentType}", - "Emails": ["${carrier_apt.creation_user_email?json_string}"], - - <#include "RFXtoRP_HsrCarrierApt_SegmentationSelections.ftl">, - <#include "RFXtoRP_HsrCarrierApt_CarrierInformation.ftl">, - <#include "RFXtoRP_HsrCarrierApt_MetadataAppointment.ftl">, - <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0)> - "Unloading" : - { - "Projects" : [{ - "Commissions": [ - <#list carrier_apt.physical_receipt_list?filter(l ->l??) as physical_receipt> - { - "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", - <#if physical_receipt.physical_receipt_reference?? && physical_receipt.physical_receipt_reference!=""> - "OrderID": "${physical_receipt.physical_receipt_reference?json_string}", - "ExecutionflowID":"${physical_receipt.physical_receipt_reference?json_string}", - <#else> - "OrderID": "${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year}${physical_receipt.receipt_number}", - "ExecutionflowID": "${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year?json_string}${physical_receipt.receipt_number?json_string}", - - "ExecutionflowID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year?json_string}${physical_receipt.receipt_number?json_string}", - "ProjectID": "${projectRP}", - "PartnerAppID": "${partnerApplicationRP}", - "OrganisationID": "${organisationRP}" - }<#sep>, - - ], - "ProjectID" : "${projectRP}" - }] - }, - <#else> - <#if appointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING> - "Unloading" : - <#else> - "Loading" : - - { - "Projects" : [{ - "Commissions": [{ - "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", - "ProjectID": "${projectRP}", - "PartnerAppID": "${partnerApplicationRP}", - "OrganisationID": "${organisationRP}" - }], - "ProjectID" : "${projectRP}" - }] - }, - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> - "Reason": "UNLOADING AND LOADING / ${carrier_apt.appointment_designation?json_string}", - <#else> - <#if carrier_apt.appointment_designation?? && carrier_apt.appointment_designation!=""> - "Reason": "${carrier_apt.appointment_designation?json_string}", - <#else> - <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "Reason": "${carrier_apt.appointment_reference?json_string}", - <#else> - "Reason": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", - - - - - "Slot": { - <#-- 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" > - - "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" > - - "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" > - - "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" - <#else> - <#stop "Appointment type not supported" > - - - - } - } - } -] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_BookingForceCancelAppointment.ftl b/RFXtoRP_HsrCarrierApt_BookingForceCancelAppointment.ftl deleted file mode 100644 index f86f788..0000000 --- a/RFXtoRP_HsrCarrierApt_BookingForceCancelAppointment.ftl +++ /dev/null @@ -1,58 +0,0 @@ -<#assign update_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) /> -[ - { - "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}", - - <#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}", - - - "RefDate": { - "DateTime": "${update_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}" - }, - { - "Key": "loading", - "Value": "${carrier_apt.load_appointment?json_string}" - }, - { - "Key": "unloading", - "Value": "${carrier_apt.unloading_appointment?json_string}" - } - ] - - }, - "Header": { - "ProjectID": "${projectRP}:${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" - } - } -] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl deleted file mode 100644 index 69ae69a..0000000 --- a/RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl +++ /dev/null @@ -1,197 +0,0 @@ -[ - { - <#assign update_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) /> - - "Header":{ - "ProjectID": "${projectRP}:${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" - }, - "ID":{ - "RefDate": { - "DateTime": "${update_datetime}", - "AuthorTimeZone": "${time_zone_rfx}" - }, - <#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}", - - <#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}", - - - "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}" - }, - { - "Key": "loading", - "Value": "${carrier_apt.load_appointment?json_string}" - }, - { - "Key": "unloading", - "Value": "${carrier_apt.unloading_appointment?json_string}" - } - ] - }, - "Payload": { - <#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" > - - <#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" > - - <#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" > - - <#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" > - - <#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" > - - <#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" > - - <#else> - <#stop "Appointment type not supported" > - - - - "TimeZone":"${time_zone_rfx}", - <#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"))> - "Unloading" : - { - "Projects" : [ - { - "Commissions": [ - <#list carrier_apt.physical_receipt_list?filter(l ->l??) as physical_receipt> - { - "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", - <#if physical_receipt.physical_receipt_reference?? && physical_receipt.physical_receipt_reference!=""> - "OrderID": "${physical_receipt.physical_receipt_reference?json_string}", - "ExecutionflowID":"${physical_receipt.physical_receipt_reference?json_string}", - <#else> - "OrderID": "${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year}${physical_receipt.receipt_number}", - "ExecutionflowID": "${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year?json_string}${physical_receipt.receipt_number?json_string}", - - "ProjectID": "${projectRP}", - "PartnerAppID": "${partnerApplicationRP}", - "OrganisationID": "${organisationRP}" - }<#sep>, - - ], - "ProjectID" : "${projectRP}" - }] - }, - "Reason": "", - <#else> - <#if appointmentType == AppointmentType.APPOINTMENT_TYPE_LOADING> - "Loading" : - { - "Projects" : [ - { - "Commissions": [ - { - "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", - "ProjectID": "${projectRP}", - "PartnerAppID": "${partnerApplicationRP}", - "OrganisationID": "${organisationRP}" - } - ], - "ProjectID" : "${projectRP}" - }] - }, - <#else> - <#if appointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING> - "Unloading" : - { - "Projects" : [ - { - "Commissions": [ - { - "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", - "ProjectID": "${projectRP}", - "PartnerAppID": "${partnerApplicationRP}", - "OrganisationID": "${organisationRP}" - } - ], - "ProjectID" : "${projectRP}" - }] - }, - - - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> - "Reason": "UNLOADING AND LOADING / ${carrier_apt.appointment_designation?json_string}", - <#else> - <#if carrier_apt.appointment_designation?? && carrier_apt.appointment_designation!=""> - "Reason": "${carrier_apt.appointment_designation?json_string}", - <#else> - <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "Reason": "${carrier_apt.appointment_reference?json_string}", - <#else> - "Reason": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", - - - - - "Slot": { - <#-- 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" > - - "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" > - - "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" > - - "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" - <#else> - <#stop "Appointment type not supported" > - - - - } - } - } -] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_CarrierArrived.ftl b/RFXtoRP_HsrCarrierApt_CarrierArrived.ftl deleted file mode 100644 index 7284ee7..0000000 --- a/RFXtoRP_HsrCarrierApt_CarrierArrived.ftl +++ /dev/null @@ -1,30 +0,0 @@ -[ - <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) /> - { - "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}", - - <#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}", - - - "RefDate": { - "DateTime": "${ref_datetime}", - "AuthorTimeZone": "${time_zone_rfx}" - } - }, - "Payload":{ - "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" - } - } -] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_CarrierDeparted.ftl b/RFXtoRP_HsrCarrierApt_CarrierDeparted.ftl deleted file mode 100644 index 7284ee7..0000000 --- a/RFXtoRP_HsrCarrierApt_CarrierDeparted.ftl +++ /dev/null @@ -1,30 +0,0 @@ -[ - <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) /> - { - "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}", - - <#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}", - - - "RefDate": { - "DateTime": "${ref_datetime}", - "AuthorTimeZone": "${time_zone_rfx}" - } - }, - "Payload":{ - "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" - } - } -] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_CarrierExpected.ftl b/RFXtoRP_HsrCarrierApt_CarrierExpected.ftl deleted file mode 100644 index dbb8910..0000000 --- a/RFXtoRP_HsrCarrierApt_CarrierExpected.ftl +++ /dev/null @@ -1,31 +0,0 @@ -[ - <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) /> - <#assign ref_datetime2 = AddSecondsToDatetime(ref_datetime?datetime.iso, 1)?iso_utc /> - { - "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}", - - <#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}", - - - "RefDate": { - "DateTime": "${ref_datetime2}", - "AuthorTimeZone": "${time_zone_rfx}" - } - }, - "Payload":{ - "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" - } - } -] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_CarrierInformation.ftl b/RFXtoRP_HsrCarrierApt_CarrierInformation.ftl deleted file mode 100644 index df7f552..0000000 --- a/RFXtoRP_HsrCarrierApt_CarrierInformation.ftl +++ /dev/null @@ -1,3 +0,0 @@ -"CarrierInformation": [ - - ] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_LoadingCompleted.ftl b/RFXtoRP_HsrCarrierApt_LoadingCompleted.ftl deleted file mode 100644 index 7284ee7..0000000 --- a/RFXtoRP_HsrCarrierApt_LoadingCompleted.ftl +++ /dev/null @@ -1,30 +0,0 @@ -[ - <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) /> - { - "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}", - - <#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}", - - - "RefDate": { - "DateTime": "${ref_datetime}", - "AuthorTimeZone": "${time_zone_rfx}" - } - }, - "Payload":{ - "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" - } - } -] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_LoadingStarted.ftl b/RFXtoRP_HsrCarrierApt_LoadingStarted.ftl deleted file mode 100644 index 7284ee7..0000000 --- a/RFXtoRP_HsrCarrierApt_LoadingStarted.ftl +++ /dev/null @@ -1,30 +0,0 @@ -[ - <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) /> - { - "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}", - - <#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}", - - - "RefDate": { - "DateTime": "${ref_datetime}", - "AuthorTimeZone": "${time_zone_rfx}" - } - }, - "Payload":{ - "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" - } - } -] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_MetadataAppointment.ftl b/RFXtoRP_HsrCarrierApt_MetadataAppointment.ftl deleted file mode 100644 index cdc9ee0..0000000 --- a/RFXtoRP_HsrCarrierApt_MetadataAppointment.ftl +++ /dev/null @@ -1,5 +0,0 @@ - -"MetaData": [ -] - - diff --git a/RFXtoRP_HsrCarrierApt_SegmentationSelections.ftl b/RFXtoRP_HsrCarrierApt_SegmentationSelections.ftl deleted file mode 100644 index ef3e619..0000000 --- a/RFXtoRP_HsrCarrierApt_SegmentationSelections.ftl +++ /dev/null @@ -1,6 +0,0 @@ - - -"SegmentationKeys": [ - ] - - diff --git a/RFXtoRP_HsrCarrierApt_UnloadingCompleted.ftl b/RFXtoRP_HsrCarrierApt_UnloadingCompleted.ftl deleted file mode 100644 index 5ac8b1c..0000000 --- a/RFXtoRP_HsrCarrierApt_UnloadingCompleted.ftl +++ /dev/null @@ -1,30 +0,0 @@ -[ - <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) /> - { - "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}", - - <#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}", - - - "RefDate": { - "DateTime": "${ref_datetime}", - "AuthorTimeZone": "${time_zone_rfx}" - } - }, - "Payload":{ - "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" - } - } -] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_UnloadingStarted.ftl b/RFXtoRP_HsrCarrierApt_UnloadingStarted.ftl deleted file mode 100644 index 7284ee7..0000000 --- a/RFXtoRP_HsrCarrierApt_UnloadingStarted.ftl +++ /dev/null @@ -1,30 +0,0 @@ -[ - <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) /> - { - "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}", - - <#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}", - - - "RefDate": { - "DateTime": "${ref_datetime}", - "AuthorTimeZone": "${time_zone_rfx}" - } - }, - "Payload":{ - "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" - } - } -] \ No newline at end of file diff --git a/RFXtoRP_RestResponse.ftl b/RFXtoRP_RestResponse.ftl index d4b338e..74bce6a 100644 --- a/RFXtoRP_RestResponse.ftl +++ b/RFXtoRP_RestResponse.ftl @@ -199,321 +199,8 @@ <#include "RFXtoRP_RestResponseAllocationError.ftl"> } ] - - <#break> - <#-- *********************************************** Appointment_post_create ******************** --> - <#case "appointment_post_create"> - <#switch restResponsetMsg.status!no_status> - <#case no_status> - [ - { - <#if restResponsetMsg.body?? > - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#else> - <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> - - <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#assign event = "RP_APPOINTMENT_EVENT" /> - <#include "RFXtoRP_PlatformLogCreate.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentAllocationError> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_RestResponseAppointmentAllocationError.ftl"> - } - ] - <#break> - <#case 200> - <#case 201> - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)> - <#if preparationOrderPostResponse.status?? && (preparationOrderPostResponse.status == "SUCCESS" || preparationOrderPostResponse.status == "WARN") > - [ - { - <#stop > - } - ] - <#else> - [ - { - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#assign event = "RP_APPOINTMENT_EVENT" /> - <#include "RFXtoRP_PlatformLogCreate.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentAllocationError> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_RestResponseAppointmentAllocationError.ftl"> - } - ] - - <#break> - <#default> - [ - { - <#if restResponsetMsg.body?? > - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#else> - <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> - - <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#assign event = "RP_APPOINTMENT_EVENT" /> - <#include "RFXtoRP_PlatformLogCreate.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentAllocationError> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_RestResponseAppointmentAllocationError.ftl"> - } - ] - - <#break> - <#-- *********************************************** ApiRestID = appointment_put_update_ref ******************** --> - <#case "appointment_put_update_by_ref"> - <#case "appointment_put_update_by_number"> - <#switch restResponsetMsg.status!no_status> - <#case no_status> - [ - { - <#if restResponsetMsg.body?? > - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#else> - <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> - - <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#assign event = "RP_APPOINTMENT_EVENT" /> - <#include "RFXtoRP_PlatformLogCreate.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentAllocationError> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_RestResponseAppointmentAllocationError.ftl"> - } - ] - <#break> - <#case 200> - <#case 201> - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)> - <#if preparationOrderPostResponse.status?? && (preparationOrderPostResponse.status == "SUCCESS" || preparationOrderPostResponse.status == "WARN") > - [ - { - <#stop > - } - ] - <#else> - [ - { - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#assign event = "RP_APPOINTMENT_EVENT" /> - <#include "RFXtoRP_PlatformLogCreate.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentAllocationError> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_RestResponseAppointmentAllocationError.ftl"> - } - ] - - <#break> - <#default> - [ - { - <#if restResponsetMsg.body?? > - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#else> - <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> - - <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#assign event = "RP_APPOINTMENT_EVENT" /> - <#include "RFXtoRP_PlatformLogCreate.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentAllocationError> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_RestResponseAppointmentAllocationError.ftl"> - } - ] - - <#break> - <#-- *********************************************** ApiRestID = canceled ******************** --> - <#case "status_appointment_put_update_by_ref"> - <#case "status_appointment_put_update_by_number"> - <#switch restResponsetMsg.status!no_status> - <#case no_status> - [ - { - <#if restResponsetMsg.body?? > - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#else> - <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> - - <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#assign event = "RP_APPOINTMENT_EVENT" /> - <#include "RFXtoRP_PlatformLogCreate.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentAllocationError> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_RestResponseAppointmentAllocationError.ftl"> - } - ] - <#break> - <#case 200> - <#case 201> - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)> - <#if preparationOrderPostResponse.status?? && (preparationOrderPostResponse.status == "SUCCESS" || preparationOrderPostResponse.status == "WARN") > - [ - { - <#stop > - } - ] - <#else> - [ - { - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#assign event = "RP_APPOINTMENT_EVENT" /> - <#include "RFXtoRP_PlatformLogCreate.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentAllocationError> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_RestResponseAppointmentAllocationError.ftl"> - } - ] - - <#break> - <#default> - [ - { - <#if restResponsetMsg.body?? > - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#else> - <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> - - <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#assign event = "RP_APPOINTMENT_EVENT" /> - <#include "RFXtoRP_PlatformLogCreate.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentAllocationError> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_RestResponseAppointmentAllocationError.ftl"> - } - ] - - <#break> - <#-- *********************************************** ApiRestID = appointment_post_physical_receipt_associations/dissociations ******************** --> - <#case "appointment_post_physical_receipt_associations_by_ref"> - <#case "appointment_post_physical_receipt_associations_by_number"> - <#case "appointment_post_physical_receipt_dissociations_by_ref"> - <#case "appointment_post_physical_receipt_dissociations_by_number"> - <#switch restResponsetMsg.status!no_status> - <#case no_status> - [ - { - <#if restResponsetMsg.body?? > - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#else> - <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> - - <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#assign event = "RP_APPOINTMENT_EVENT" /> - <#include "RFXtoRP_PlatformLogCreate.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentAllocationError> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_RestResponseAppointmentAllocationError.ftl"> - } - ] - <#break> - <#case 200> - <#case 201> - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)> - <#if preparationOrderPostResponse.status?? && (preparationOrderPostResponse.status == "SUCCESS" || preparationOrderPostResponse.status == "WARN") > - [ - { - <#stop > - } - ] - <#else> - [ - { - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#assign event = "RP_APPOINTMENT_EVENT" /> - <#include "RFXtoRP_PlatformLogCreate.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentAllocationError> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_RestResponseAppointmentAllocationError.ftl"> - } - ] - - <#break> - <#default> - [ - { - <#if restResponsetMsg.body?? > - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#else> - <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> - - <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#assign event = "RP_APPOINTMENT_EVENT" /> - <#include "RFXtoRP_PlatformLogCreate.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentAllocationError> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_RestResponseAppointmentAllocationError.ftl"> - } - ] - - <#break> + + <#break> <#-- *********************************************** default ******************** --> <#default> <#stop> diff --git a/RFXtoRP_RestResponseAppointmentAllocationError.ftl b/RFXtoRP_RestResponseAppointmentAllocationError.ftl deleted file mode 100644 index c21fc3f..0000000 --- a/RFXtoRP_RestResponseAppointmentAllocationError.ftl +++ /dev/null @@ -1,22 +0,0 @@ -<#include "HfRpConfig.ftl"> -<#include "ReflexUtils.ftl"> -<#include "ActorPrefix.ftl"> -[ - { - "Header": { - "ProjectID": "${projectRP}" - }, - "ID": { - "RefID": "${id.refid!"no RefID"?trim?json_string}", - "RefDate": { - "DateTime": "${aDateTime?iso_utc}", - "AuthorTimeZone": "${time_zone_rfx}" - } - }, - - "Payload": { - "ActorID":"${RFXtoRPprefixDepot(id.actorID)?trim?json_string}" - } - - } -] diff --git a/RPtoRFX_AppointmentEvent.ftl b/RPtoRFX_AppointmentEvent.ftl deleted file mode 100644 index ae4a149..0000000 --- a/RPtoRFX_AppointmentEvent.ftl +++ /dev/null @@ -1,136 +0,0 @@ -<#-- **** 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 "Updated"> - <#assign AddComma = false /> - <#assign appointment = eventRP.data /> - - <#-- processing is stopped because the Updated event contains no relevant change to forward to the WMS. --> - <#if !(eventRP.commissionsUpdated!false) && !(eventRP.reasonUpdated!false) && !(eventRP.slotUpdated!false) && !(eventRP.carrierInformationUpdated!false)> - <#stop> - - [ - <#if appointment?? && (!(appointment.WMSCreated??) || !appointment.WMSCreated) && appointment.Status?? && appointment.Status.Current?? && appointment.Status.Current.StatusCode?? && appointment.Status.Current.StatusCode == AppointmentStatusCode.APPOINTMENT_0150_ALLOCATION_ERROR> - { - <#assign apiRestReflexID = ApiRestReflexID.appointment_post_create> - "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_CarrierAppointmentCreated.ftl"> - } - <#else> - <#if eventRP.commissionsUpdated> - <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING && eventRP.addedUnloadCommissions?? && eventRP.addedUnloadCommissions != ""> - <#if eventRP.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_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl"> - } - - <#assign AddComma = true /> - - <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING && eventRP.removedUnloadCommissions?? && eventRP.removedUnloadCommissions!=""> - <#if AddComma == true> - , - - - <#if eventRP.appointmentCustomFields?has_content> - { - <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_dissociations_by_number> - "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl"> - } - <#else> - { - <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_dissociations_by_ref> - "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl"> - } - - <#assign AddComma = true /> - - - <#-- *********************************************** Action = reasonUpdated or slotUpdated ******************** --> - <#if eventRP.reasonUpdated || eventRP.slotUpdated || eventRP.carrierInformationUpdated> - <#if AddComma == true> - , - - <#if eventRP.appointmentCustomFields?has_content> - { - <#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_number> - "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl"> - } - <#else> - { - <#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_ref> - "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl"> - } - - <#assign AddComma = true /> - - - ] - <#break> -<#-- *********************************************** Action = SlotUpdated ******************** --> - <#case "Canceled"> - <#assign appointment = eventRP.data /> - [ - <#if eventRP.appointmentCustomFields?has_content> - { - <#assign apiRestReflexID = ApiRestReflexID.status_appointment_put_update_by_number> - "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_CarrierAppointmentCanceledByNumber.ftl"> - } - <#else> - { - <#assign apiRestReflexID = ApiRestReflexID.status_appointment_put_update_by_ref> - "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_CarrierAppointmentCanceledByRef.ftl"> - } - - ] - <#break> -<#default> - <#stop > - - - diff --git a/RPtoRFX_CarrierAppointmentCanceledByNumber.ftl b/RPtoRFX_CarrierAppointmentCanceledByNumber.ftl deleted file mode 100644 index 91a5e6c..0000000 --- a/RPtoRFX_CarrierAppointmentCanceledByNumber.ftl +++ /dev/null @@ -1,15 +0,0 @@ -{ - "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}/status", - "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" : - { - "status_code": "999", - <#include "RPtoRFX_CarrierAppointmentCancellationCode.ftl"> - } - } \ No newline at end of file diff --git a/RPtoRFX_CarrierAppointmentCanceledByRef.ftl b/RPtoRFX_CarrierAppointmentCanceledByRef.ftl deleted file mode 100644 index f32cb7a..0000000 --- a/RPtoRFX_CarrierAppointmentCanceledByRef.ftl +++ /dev/null @@ -1,14 +0,0 @@ -{ - "id" : {"refid" : "${eventRP.refid?json_string}","actorID":"${RPtoRFXprefixDepot(eventRP.actor)}"}, - "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_code": "999", - <#include "RPtoRFX_CarrierAppointmentCancellationCode.ftl"> - } - } \ No newline at end of file diff --git a/RPtoRFX_CarrierAppointmentCancellationCode.ftl b/RPtoRFX_CarrierAppointmentCancellationCode.ftl deleted file mode 100644 index c9262b8..0000000 --- a/RPtoRFX_CarrierAppointmentCancellationCode.ftl +++ /dev/null @@ -1,2 +0,0 @@ -<#-- To custom with cancellation reason code, the reason code must be cancellation type--> -"cancellation_reason_code": "" \ No newline at end of file diff --git a/RPtoRFX_CarrierAppointmentCreated.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl deleted file mode 100644 index dfffa15..0000000 --- a/RPtoRFX_CarrierAppointmentCreated.ftl +++ /dev/null @@ -1,70 +0,0 @@ -{ - "id" : {"refid" : "${eventRP.refid?json_string}","actorID":"${RPtoRFXprefixDepot(eventRP.actor)}"}, - "route" : "rest/public/v1/physical_depots/{physical_depot_code}/carrier_appointments", - "method" : "POST", - "uri_substitutions": { - "physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}" - }, - "payload" : - { - "appointment_reference": "${eventRP.refid?json_string}", - <#switch appointment.AppointmentType> - <#case AppointmentType.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)}", - - <#break> - <#case AppointmentType.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)}", - - <#break> - <#default> - <#stop "appointment.AppointmentType not implemented" > - - <#include "RPtoRFX_CarrierAppointmentDefaultData.ftl"> - <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING > - <#if appointment.Unloading?? && appointment.Unloading.Projects?? && - appointment.Unloading.Projects[0]?? && - appointment.Unloading.Projects[0].Commissions?? && - appointment.Unloading.Projects[0].Commissions[0]?? && - appointment.Unloading.Projects[0].Commissions[0].ExecutionflowID?? && - appointment.Unloading.Projects[0].Commissions[0].ExecutionflowID!="" > - "physical_receipt_list": [ - <#list appointment.Unloading.Projects[0].Commissions?filter(l ->l.ExecutionflowID?? && l.ExecutionflowID !="") as commission> - <#list eventRP.executionflowCustomFields.entrySet()?filter(l ->l.key == commission.ExecutionflowID && l.value?? && l.value?has_content) 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>, - - ], - <#else> - "appointment_designation":"${(appointment.Reason!"")!?json_string}", - - <#else> - <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_LOADING> - "appointment_designation":"${(appointment.Reason!"")?json_string}", - - - "constant_appointment": "false" - } - } diff --git a/RPtoRFX_CarrierAppointmentDataUpdated.ftl b/RPtoRFX_CarrierAppointmentDataUpdated.ftl deleted file mode 100644 index 93b4aa7..0000000 --- a/RPtoRFX_CarrierAppointmentDataUpdated.ftl +++ /dev/null @@ -1,21 +0,0 @@ -<#-- 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 your SK is : - Boolean : .Bool - Float : .Float - Timestamp : .Timestamp.DateTime or .Timestamp.AuthorTimeZone - Int : .Int - String : .String ---> \ No newline at end of file diff --git a/RPtoRFX_CarrierAppointmentDefaultData.ftl b/RPtoRFX_CarrierAppointmentDefaultData.ftl deleted file mode 100644 index f4a57b4..0000000 --- a/RPtoRFX_CarrierAppointmentDefaultData.ftl +++ /dev/null @@ -1,41 +0,0 @@ -<#-- 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 your SK is : - Boolean : .Bool - Float : .Float - Timestamp : .Timestamp.DateTime or .Timestamp.AuthorTimeZone - Int : .Int - String : .String ---> - -<#-- Note : you can send url path of appointment to WMS, using this below code --> - -<#-- - <#assign appointmentPathURL = JsonUtil.getAppointmentPathURL(eventRP.site,eventRP.refid)> - <#assign payLoad = '{ "Header": {"ProjectID": "${projectRP!""}"},"IsOnce": false,"IsPublic": true,"TimeToLive": "0","URL": "${appointmentPathURL}"}' /> - <#assign projectGetTinyURL = QueryApiReflexPlatformID.ProjectGetTinyURL> - <#assign response = QueryApiReflexPlatformCall.call(projectGetTinyURL,payLoad) /> - <#assign tinyURL = JsonUtil.jsonToMap(response)> - - <#if tinyURL?? && tinyURL.TinyURL?? > - "comment_list": [ - { - "line_number": 1, - "group_code": "SCN", - "text": "${tinyURL.TinyURL.URL?json_string}" - } - ], - ---> \ No newline at end of file diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl deleted file mode 100644 index 2d532b1..0000000 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl +++ /dev/null @@ -1,32 +0,0 @@ -{ - "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_associations", - "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 addedCommissions = eventRP.addedUnloadCommissions /> - <#else> - <#assign addedCommissions = eventRP.addedLoadCommissions /> - - - "physical_receipt_list": [ - <#list addedCommissions?filter(l -> l.ExecutionflowID??) as addedCommission> - { - "receipt_activity": "${executionflowCustomFields[addedCommission.ExecutionflowID].activity_code?json_string}", - "originator_code": "${executionflowCustomFields[addedCommission.ExecutionflowID].originator_code?json_string}", - "physical_receipt_reference": "${executionflowCustomFields[addedCommission.ExecutionflowID].reference?json_string}", - "receipt_year": "${executionflowCustomFields[addedCommission.ExecutionflowID].order_year?json_string}", - "receipt_number": "${executionflowCustomFields[addedCommission.ExecutionflowID].order_number?json_string}" - } - <#sep>, - - ] - } - } diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl deleted file mode 100644 index 0fef024..0000000 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl +++ /dev/null @@ -1,31 +0,0 @@ -{ - "id" : {"refid" : "${eventRP.refid?json_string}","actorID":"${RPtoRFXprefixDepot(eventRP.actor)}"}, - "route" : "rest/public/v1/physical_depots/{physical_depot_code}/carrier_appointments/{appointment_reference}/physical_receipt_associations", - "method" : "POST", - "uri_substitutions": { - "physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}", - "appointment_reference":"${eventRP.refid?json_string}" - }, - "payload" : - { - <#assign executionflowCustomFields = eventRP.executionflowCustomFields > - <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING> - <#assign addedCommissions = eventRP.addedUnloadCommissions /> - <#else> - <#assign addedCommissions = eventRP.addedLoadCommissions /> - - - "physical_receipt_list": [ - <#list addedCommissions?filter(l -> l.ExecutionflowID??) as addedCommission> - { - "receipt_activity": "${executionflowCustomFields[addedCommission.ExecutionflowID].activity_code?json_string}", - "originator_code": "${executionflowCustomFields[addedCommission.ExecutionflowID].originator_code?json_string}", - "physical_receipt_reference": "${executionflowCustomFields[addedCommission.ExecutionflowID].reference?json_string}", - "receipt_year": "${executionflowCustomFields[addedCommission.ExecutionflowID].order_year?json_string}", - "receipt_number": "${executionflowCustomFields[addedCommission.ExecutionflowID].order_number?json_string}" - } - <#sep>, - - ] - } - } diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl deleted file mode 100644 index 2f70e6c..0000000 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl +++ /dev/null @@ -1,32 +0,0 @@ -{ - "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 /> - - - "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>, - - ] - } - } diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl deleted file mode 100644 index 20735f9..0000000 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl +++ /dev/null @@ -1,31 +0,0 @@ -{ - "id" : {"refid" : "${eventRP.refid?json_string}","actorID":"${RPtoRFXprefixDepot(eventRP.actor)}"}, - "route" : "rest/public/v1/physical_depots/{physical_depot_code}/carrier_appointments/{appointment_reference}/physical_receipt_dissociations", - "method" : "POST", - "uri_substitutions": { - "physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}", - "appointment_reference":"${eventRP.refid?json_string}" - }, - "payload" : - { - <#assign executionflowCustomFields = eventRP.executionflowCustomFields > - <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING> - <#assign removedCommissions = eventRP.removedUnloadCommissions /> - <#else> - <#assign removedCommissions = eventRP.removedLoadCommissions /> - - - "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>, - - ] - } - } diff --git a/RPtoRFX_CarrierAppointmentReasonUpdatedByNumber.ftl b/RPtoRFX_CarrierAppointmentReasonUpdatedByNumber.ftl deleted file mode 100644 index f2ba79a..0000000 --- a/RPtoRFX_CarrierAppointmentReasonUpdatedByNumber.ftl +++ /dev/null @@ -1,38 +0,0 @@ -{ - "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" : - { - "unloading_appointment" : "${eventRP.appointmentCustomFields.unloading!"false"?json_string}", - "load_appointment" : "${eventRP.appointmentCustomFields.loading!"false"?json_string}", - <#switch appointment.AppointmentType> - <#case AppointmentType.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)}", - - <#break> - <#case AppointmentType.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)}", - - <#break> - <#default> - <#stop "appointment.AppointmentType not implemented" > - - "appointment_designation":"${(appointment.Reason!"")!?json_string}" - } - } diff --git a/RPtoRFX_CarrierAppointmentReasonUpdatedByRef.ftl b/RPtoRFX_CarrierAppointmentReasonUpdatedByRef.ftl deleted file mode 100644 index 1ccf476..0000000 --- a/RPtoRFX_CarrierAppointmentReasonUpdatedByRef.ftl +++ /dev/null @@ -1,39 +0,0 @@ -{ - "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 AppointmentType.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)}", - - <#break> - <#case AppointmentType.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)}", - - <#break> - <#default> - <#stop "appointment.AppointmentType not implemented" > - - "appointment_designation":"${(appointment.Reason!"")!?json_string}" - } - } diff --git a/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl deleted file mode 100644 index 5c8ff23..0000000 --- a/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl +++ /dev/null @@ -1,39 +0,0 @@ -{ - "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!"false"?json_string}", - "load_appointment" : "${eventRP.appointmentCustomFields.loading!"false"?json_string}", - <#switch appointment.AppointmentType> - <#case AppointmentType.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)}", - - <#break> - <#case AppointmentType.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)}", - - <#break> - <#default> - <#stop "appointment.AppointmentType not implemented" > - - "appointment_designation":"${(appointment.Reason!"")!?json_string}" - } - } diff --git a/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl deleted file mode 100644 index 6b514c6..0000000 --- a/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl +++ /dev/null @@ -1,40 +0,0 @@ -{ - "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" : - { - <#include "RPtoRFX_CarrierAppointmentDataUpdated.ftl"> - <#switch appointment.AppointmentType> - <#case AppointmentType.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)}", - - <#break> - <#case AppointmentType.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)}", - - <#break> - <#default> - <#stop "appointment.AppointmentType not implemented" > - - "appointment_designation":"${(appointment.Reason!"")!?json_string}" - } - }