RDV 1.2
This commit is contained in:
parent
59034eeeef
commit
7e0cc94404
@ -1,40 +1,89 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message HARDIS WMS -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
|
<#include "ActorPrefix.ftl">
|
||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
|
|
||||||
<#assign organisationRP = organisation>
|
<#assign organisationRP = organisation>
|
||||||
|
|
||||||
<#assign aDateTime = .now>
|
<#assign aDateTime = .now>
|
||||||
|
|
||||||
<#stop>
|
|
||||||
|
|
||||||
<#switch cloudEventMsg.action>
|
<#switch cloudEventMsg.action>
|
||||||
<#case "C">
|
<#case "C">
|
||||||
<#case "U">
|
<#case "U">
|
||||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
<#-- *********************************************** Action = Update ******************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
||||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
|
||||||
[
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
<#case "D">
|
|
||||||
<#-- *********************************************** Action = DELETE *************************** -->
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
<#assign carrier_apt_status = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
<#if !carrier_apt_status.status??>
|
||||||
{
|
<#stop 'the updated appointment Status not initialized'>
|
||||||
|
</#if>
|
||||||
|
[
|
||||||
|
{
|
||||||
|
<#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>
|
</#switch>
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
]
|
||||||
|
<#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>
|
<#default>
|
||||||
<#stop >
|
<#stop >
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
22
RFXtoRP_HsaLstCarSta_CarrierArrived.ftl
Normal file
22
RFXtoRP_HsaLstCarSta_CarrierArrived.ftl
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
[
|
||||||
|
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) />
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
<#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !="">
|
||||||
|
"RefID": "${carrier_apt_status.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}",
|
||||||
|
</#if>
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${ref_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload":{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
22
RFXtoRP_HsaLstCarSta_CarrierDeparted.ftl
Normal file
22
RFXtoRP_HsaLstCarSta_CarrierDeparted.ftl
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
[
|
||||||
|
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) />
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
<#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !="">
|
||||||
|
"RefID": "${carrier_apt_status.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}",
|
||||||
|
</#if>
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${ref_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload":{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
22
RFXtoRP_HsaLstCarSta_CarrierExpected.ftl
Normal file
22
RFXtoRP_HsaLstCarSta_CarrierExpected.ftl
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
[
|
||||||
|
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) />
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
<#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !="">
|
||||||
|
"RefID": "${carrier_apt_status.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}",
|
||||||
|
</#if>
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${ref_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload":{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
22
RFXtoRP_HsaLstCarSta_LoadingCompleted.ftl
Normal file
22
RFXtoRP_HsaLstCarSta_LoadingCompleted.ftl
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
[
|
||||||
|
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) />
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
<#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !="">
|
||||||
|
"RefID": "${carrier_apt_status.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}",
|
||||||
|
</#if>
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${ref_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload":{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
22
RFXtoRP_HsaLstCarSta_LoadingStarted.ftl
Normal file
22
RFXtoRP_HsaLstCarSta_LoadingStarted.ftl
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
[
|
||||||
|
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) />
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
<#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !="">
|
||||||
|
"RefID": "${carrier_apt_status.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}",
|
||||||
|
</#if>
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${ref_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload":{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
22
RFXtoRP_HsaLstCarSta_UnloadingCompleted.ftl
Normal file
22
RFXtoRP_HsaLstCarSta_UnloadingCompleted.ftl
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
[
|
||||||
|
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) />
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
<#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !="">
|
||||||
|
"RefID": "${carrier_apt_status.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}",
|
||||||
|
</#if>
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${ref_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload":{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
22
RFXtoRP_HsaLstCarSta_UnloadingStarted.ftl
Normal file
22
RFXtoRP_HsaLstCarSta_UnloadingStarted.ftl
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
[
|
||||||
|
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) />
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
<#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !="">
|
||||||
|
"RefID": "${carrier_apt_status.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}",
|
||||||
|
</#if>
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${ref_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload":{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
@ -1,7 +1,10 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message HARDIS WMS -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
|
<#include "ActorPrefix.ftl">
|
||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
@ -9,32 +12,156 @@
|
|||||||
|
|
||||||
<#assign aDateTime = .now>
|
<#assign aDateTime = .now>
|
||||||
|
|
||||||
<#stop>
|
|
||||||
|
|
||||||
<#switch cloudEventMsg.action>
|
<#switch cloudEventMsg.action>
|
||||||
<#case "C">
|
<#case "C">
|
||||||
<#case "U">
|
|
||||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
<#assign carrier_apt = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.SiteForceBookAppointment>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierExpected>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrCarrierApt_AppointmentCarrierExpected.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCustomFieldsUpdated>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl">
|
||||||
|
}
|
||||||
|
]
|
||||||
|
<#break>
|
||||||
|
<#case "U">
|
||||||
|
<#-- *********************************************** Action = Update ********************-->
|
||||||
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
|
<#assign carrier_apt = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
[
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCustomFieldsUpdated>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl">
|
||||||
|
},
|
||||||
|
<#if carrier_apt.status?? && carrier_apt.status.status_code=="999">
|
||||||
|
[
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.SiteCancelAppointment>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrCarrierApt_SiteCancelAppointment.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">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#break>
|
<#else>
|
||||||
|
<#if carrier_apt.status?? && carrier_apt.status.status_code=="210"> <#--Unloading Started -->
|
||||||
<#case "D">
|
[
|
||||||
<#-- *********************************************** Action = DELETE *************************** -->
|
{
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentUnloadingStarted>
|
||||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
"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>
|
||||||
|
<#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0)>
|
||||||
|
[
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.SiteWMSUpdateAppointment>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl">
|
||||||
|
}
|
||||||
|
]
|
||||||
|
<#else>
|
||||||
|
[
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.SiteForceRescheduleAppointment>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl">
|
||||||
|
}
|
||||||
|
]
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
]
|
||||||
|
<#break>
|
||||||
|
<#case "D">
|
||||||
|
<#-- *********************************************** Action = Delete ******************** -->
|
||||||
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
|
<#assign carrier_apt = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
{
|
<#-- Ajout des lignes-->
|
||||||
|
{
|
||||||
}
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.SiteCancelAppointment>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl">
|
||||||
|
}
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop >
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
26
RFXtoRP_HsrCarrierApt_AppointmentCarrierExpected.ftl
Normal file
26
RFXtoRP_HsrCarrierApt_AppointmentCarrierExpected.ftl
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
[
|
||||||
|
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) />
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"RefID": "${carrier_apt.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
||||||
|
"RefID": "${carrier_apt.appointment_reference?json_string}${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${ref_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload":{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
48
RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl
Normal file
48
RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
[
|
||||||
|
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) />
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"RefID": "${carrier_apt.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
||||||
|
"RefID": "${carrier_apt.appointment_reference?json_string}${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${ref_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
},
|
||||||
|
"CustomFields": [
|
||||||
|
{
|
||||||
|
"Key": "depot",
|
||||||
|
"Value": "${carrier_apt.physical_depot?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "year",
|
||||||
|
"Value": "${carrier_apt.year_number?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "number",
|
||||||
|
"Value": "${carrier_apt.appointment_number?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "reference",
|
||||||
|
"Value": "${carrier_apt.appointment_reference?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "carrier",
|
||||||
|
"Value": "${carrier_apt.planned_carrier?json_string}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Payload":{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
22
RFXtoRP_HsrCarrierApt_CarrierArrived.ftl
Normal file
22
RFXtoRP_HsrCarrierApt_CarrierArrived.ftl
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
[
|
||||||
|
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) />
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference !="">
|
||||||
|
"RefID": "${carrier_apt.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number?json_string}${carrier_apt.appointment_number?json_string}",
|
||||||
|
</#if>
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${ref_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload":{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
22
RFXtoRP_HsrCarrierApt_CarrierDeparted.ftl
Normal file
22
RFXtoRP_HsrCarrierApt_CarrierDeparted.ftl
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
[
|
||||||
|
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) />
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference !="">
|
||||||
|
"RefID": "${carrier_apt.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number?json_string}${carrier_apt.appointment_number?json_string}",
|
||||||
|
</#if>
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${ref_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload":{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
3
RFXtoRP_HsrCarrierApt_CarrierInformation.ftl
Normal file
3
RFXtoRP_HsrCarrierApt_CarrierInformation.ftl
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
"CarrierInformation": [
|
||||||
|
|
||||||
|
]
|
||||||
22
RFXtoRP_HsrCarrierApt_LoadingCompleted.ftl
Normal file
22
RFXtoRP_HsrCarrierApt_LoadingCompleted.ftl
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
[
|
||||||
|
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) />
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference !="">
|
||||||
|
"RefID": "${carrier_apt.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number?json_string}${carrier_apt.appointment_number?json_string}",
|
||||||
|
</#if>
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${ref_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload":{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
22
RFXtoRP_HsrCarrierApt_LoadingStarted.ftl
Normal file
22
RFXtoRP_HsrCarrierApt_LoadingStarted.ftl
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
[
|
||||||
|
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) />
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference !="">
|
||||||
|
"RefID": "${carrier_apt.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number?json_string}${carrier_apt.appointment_number?json_string}",
|
||||||
|
</#if>
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${ref_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload":{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
5
RFXtoRP_HsrCarrierApt_MetadataAppointment.ftl
Normal file
5
RFXtoRP_HsrCarrierApt_MetadataAppointment.ftl
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
|
||||||
|
"MetaData": [
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
5
RFXtoRP_HsrCarrierApt_Quantities.ftl
Normal file
5
RFXtoRP_HsrCarrierApt_Quantities.ftl
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
"Quantities": [
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
6
RFXtoRP_HsrCarrierApt_SegmentationSelections.ftl
Normal file
6
RFXtoRP_HsrCarrierApt_SegmentationSelections.ftl
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
"SegmentationSelections": [
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
18
RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl
Normal file
18
RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) />
|
||||||
|
[
|
||||||
|
{
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"AppointmentID": "${carrier_apt.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
||||||
|
"AppointmentID": "${carrier_apt.appointment_reference?json_string}${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}",
|
||||||
|
<#else>
|
||||||
|
"AppointmentID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
||||||
|
}
|
||||||
|
]
|
||||||
124
RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl
Normal file
124
RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"Header":{
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"AppointmentID": "${carrier_apt.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
||||||
|
"AppointmentID": "${carrier_apt.appointment_reference?json_string}${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}",
|
||||||
|
<#else>
|
||||||
|
"AppointmentID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
"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" >
|
||||||
|
</#if>
|
||||||
|
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||||
|
<#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_unloading_end_datetime?datetime.iso) />
|
||||||
|
<#if (duration <= 0)>
|
||||||
|
<#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" >
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" >
|
||||||
|
<#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-") || carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-")>
|
||||||
|
<#stop "planned_load_start_datetime or planned_load_end_datetime field of appointmend is not initialized" >
|
||||||
|
</#if>
|
||||||
|
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_LOADING>
|
||||||
|
<#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_load_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) />
|
||||||
|
<#if (duration <= 0)>
|
||||||
|
<#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" >
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
||||||
|
<#stop "Not managed">
|
||||||
|
<#else>
|
||||||
|
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN>
|
||||||
|
<#assign duration = 0 /> <#-- à confirmer -->
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
"AppointmentType": "${appointmentType}",
|
||||||
|
"Emails": ["${carrier_apt.creation_user_email?json_string}"],
|
||||||
|
"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}"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
<#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)>
|
||||||
|
"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}",
|
||||||
|
</#if>
|
||||||
|
"ProjectID": "${projectRP}",
|
||||||
|
<#include "RFXtoRP_HsrCarrierApt_Quantities.ftl">
|
||||||
|
}<#sep>,</#sep>
|
||||||
|
</#list>
|
||||||
|
],
|
||||||
|
<#else>
|
||||||
|
"Commissions": [
|
||||||
|
{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
||||||
|
"ProjectID": "${projectRP}",
|
||||||
|
<#include "RFXtoRP_HsrCarrierApt_Quantities.ftl">
|
||||||
|
}
|
||||||
|
],
|
||||||
|
<#if carrier_apt.appointment_designation?? && carrier_apt.appointment_designation!="">
|
||||||
|
"Reason": "${carrier_apt.appointment_designation?json_string}",
|
||||||
|
<#else>
|
||||||
|
"Reason": "No commission",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
"Slots": [{
|
||||||
|
<#-- calcul de de la durée en fonction des start et end time-->
|
||||||
|
"DurationInSeconds": "${duration}",
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false" >
|
||||||
|
<#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-")>
|
||||||
|
<#stop "planned_unloading_start_datetime field of appointmend is not initialized" >
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
"StartDateTime": "${carrier_apt.planned_unloading_start_datetime}"
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true">
|
||||||
|
<#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-")>
|
||||||
|
<#stop "planned_load_start_datetime field of appointmend is not initialized" >
|
||||||
|
</#if>
|
||||||
|
"StartDateTime": "${carrier_apt.planned_load_start_datetime}"
|
||||||
|
<#else>
|
||||||
|
<#stop "Not managed">
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
]
|
||||||
22
RFXtoRP_HsrCarrierApt_UnloadingCompleted.ftl
Normal file
22
RFXtoRP_HsrCarrierApt_UnloadingCompleted.ftl
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
[
|
||||||
|
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) />
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference !="">
|
||||||
|
"RefID": "${carrier_apt.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number?json_string}${carrier_apt.appointment_number?json_string}",
|
||||||
|
</#if>
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${ref_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload":{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
22
RFXtoRP_HsrCarrierApt_UnloadingStarted.ftl
Normal file
22
RFXtoRP_HsrCarrierApt_UnloadingStarted.ftl
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
[
|
||||||
|
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) />
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference !="">
|
||||||
|
"RefID": "${carrier_apt.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number?json_string}${carrier_apt.appointment_number?json_string}",
|
||||||
|
</#if>
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${ref_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload":{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
111
RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl
Normal file
111
RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
<#assign creation_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) />
|
||||||
|
|
||||||
|
"Header":{
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"AppointmentID": "${carrier_apt.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
||||||
|
"AppointmentID": "${carrier_apt.appointment_reference?json_string}${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}",
|
||||||
|
<#else>
|
||||||
|
"AppointmentID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false">
|
||||||
|
<#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") || carrier_apt.planned_unloading_end_datetime?starts_with("00") || carrier_apt.planned_unloading_end_datetime?contains("-00-")>
|
||||||
|
<#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend is not initialized" >
|
||||||
|
</#if>
|
||||||
|
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||||
|
<#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_unloading_end_datetime?datetime.iso) />
|
||||||
|
<#if (duration <= 0)>
|
||||||
|
<#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" >
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" >
|
||||||
|
<#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-") || carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-")>
|
||||||
|
<#stop "planned_load_start_datetime or planned_load_end_datetime field of appointmend is not initialized" >
|
||||||
|
</#if>
|
||||||
|
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_LOADING>
|
||||||
|
<#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_load_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) />
|
||||||
|
<#if (duration <= 0)>
|
||||||
|
<#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" >
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
||||||
|
<#stop "Not managed">
|
||||||
|
<#else>
|
||||||
|
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN>
|
||||||
|
<#assign duration = 0 /> <#-- à confirmer -->
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
||||||
|
"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}"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
<#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0)>
|
||||||
|
"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?json_string}${physical_receipt.receipt_number?json_string}",
|
||||||
|
"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}",
|
||||||
|
</#if>
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
}<#sep>,</#sep>
|
||||||
|
</#list>
|
||||||
|
],
|
||||||
|
<#else>
|
||||||
|
<#stop>
|
||||||
|
</#if>
|
||||||
|
"Slots": [{
|
||||||
|
<#-- calcul de de la durée en fonction des start et end time-->
|
||||||
|
"DurationInSeconds": "${duration}",
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false" >
|
||||||
|
<#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-")>
|
||||||
|
<#stop "planned_unloading_start_datetime field of appointmend is not initialized" >
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
"StartDateTime": "${carrier_apt.planned_unloading_start_datetime}"
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true">
|
||||||
|
<#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-")>
|
||||||
|
<#stop "planned_load_start_datetime field of appointmend is not initialized" >
|
||||||
|
</#if>
|
||||||
|
"StartDateTime": "${carrier_apt.planned_load_start_datetime}"
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
||||||
|
<#stop "Not managed">
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
}]
|
||||||
|
|
||||||
|
}
|
||||||
|
]
|
||||||
68
RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl
Normal file
68
RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
<#assign creation_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) />
|
||||||
|
"Header":{
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"AppointmentID": "${carrier_apt.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
||||||
|
"AppointmentID": "${carrier_apt.appointment_reference?json_string}${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}",
|
||||||
|
<#else>
|
||||||
|
"AppointmentID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false">
|
||||||
|
<#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") || carrier_apt.planned_unloading_end_datetime?starts_with("00") || carrier_apt.planned_unloading_end_datetime?contains("-00-")>
|
||||||
|
<#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend is not initialized" >
|
||||||
|
</#if>
|
||||||
|
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||||
|
<#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_unloading_end_datetime?datetime.iso) />
|
||||||
|
<#if (duration <= 0)>
|
||||||
|
<#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" >
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" >
|
||||||
|
<#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-") || carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-")>
|
||||||
|
<#stop "planned_load_start_datetime or planned_load_end_datetime field of appointmend is not initialized" >
|
||||||
|
</#if>
|
||||||
|
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_LOADING>
|
||||||
|
<#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_load_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) />
|
||||||
|
<#if (duration <= 0)>
|
||||||
|
<#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" >
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
||||||
|
<#stop "Not managed">
|
||||||
|
<#else>
|
||||||
|
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN>
|
||||||
|
<#assign duration = 0 /> <#-- à confirmer -->
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
"Slots": [{
|
||||||
|
<#-- calcul de de la durée en fonction des start et end time-->
|
||||||
|
"DurationInSeconds": "${duration}",
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false" >
|
||||||
|
<#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-")>
|
||||||
|
<#stop "planned_unloading_start_datetime field of appointmend is not initialized" >
|
||||||
|
</#if>
|
||||||
|
"StartDateTime": "${carrier_apt.planned_unloading_start_datetime}"
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true">
|
||||||
|
<#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-")>
|
||||||
|
<#stop "planned_load_start_datetime field of appointmend is not initialized" >
|
||||||
|
</#if>
|
||||||
|
"StartDateTime": "${carrier_apt.planned_load_start_datetime}"
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
||||||
|
<#stop "Not managed">
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
}]
|
||||||
|
|
||||||
|
}
|
||||||
|
]
|
||||||
@ -25,6 +25,12 @@
|
|||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl">
|
<#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCustomFieldsUpdated>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrPro_ExecutionflowCustomFieldsUpdated.ftl">
|
||||||
}
|
}
|
||||||
<#else>
|
<#else>
|
||||||
<#-- No line -->
|
<#-- No line -->
|
||||||
|
|||||||
40
RFXtoRP_HsrPro_ExecutionflowCustomFieldsUpdated.ftl
Normal file
40
RFXtoRP_HsrPro_ExecutionflowCustomFieldsUpdated.ftl
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
<#include "ActorPrefix.ftl">
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"Payload" :{},
|
||||||
|
"ID":{
|
||||||
|
"CustomFields": [
|
||||||
|
{
|
||||||
|
"Key": "depot_code",
|
||||||
|
"Value": "${preparation_order.physical_depot_code?trim?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "activity_code",
|
||||||
|
"Value": "${preparation_order.activity_code?trim?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "originator_code",
|
||||||
|
"Value": "${preparation_order.originator_code?trim?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "reference",
|
||||||
|
"Value": "${preparation_order.originator_reference?trim?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "order_year",
|
||||||
|
"Value": "${preparation_order.preparation_order_year}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "order_number",
|
||||||
|
"Value": "${preparation_order.preparation_order_number}"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"RefID": "${preparation_order.originator_reference?trim?json_string}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
@ -32,7 +32,12 @@
|
|||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
|
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCustomFieldsUpdated>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrReceiptList_CustomFieldsUpdated.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#else>
|
<#else>
|
||||||
|
|||||||
44
RFXtoRP_HsrReceiptList_CustomFieldsUpdated.ftl
Normal file
44
RFXtoRP_HsrReceiptList_CustomFieldsUpdated.ftl
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
<#include "ActorPrefix.ftl">
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"Payload" :{},
|
||||||
|
"ID":{
|
||||||
|
"CustomFields": [
|
||||||
|
{
|
||||||
|
"Key": "depot_code",
|
||||||
|
"Value": "${receipt.physical_depot_code?trim?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "activity_code",
|
||||||
|
"Value": "${receipt.activity_code?trim?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "originator_code",
|
||||||
|
"Value": "${receipt.originator_code?trim?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "reference",
|
||||||
|
"Value": "${receipt.receipt_reference?trim?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "order_year",
|
||||||
|
"Value": "${receipt.receipt_year}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "order_number",
|
||||||
|
"Value": "${receipt.receipt_number}"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
||||||
|
"RefID": "${receipt.receipt_reference?trim?json_string}"
|
||||||
|
<#else>
|
||||||
|
"RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}"
|
||||||
|
</#if>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
@ -10,197 +10,492 @@
|
|||||||
|
|
||||||
|
|
||||||
<#assign aDateTime = .now>
|
<#assign aDateTime = .now>
|
||||||
<#assign no_apiRestReflexID = "no apiRestReflexID">
|
<#assign no_apiRestReflexID = "no apiRestReflexID">
|
||||||
<#assign no_status = -99999>
|
<#assign no_status = -99999>
|
||||||
|
|
||||||
|
|
||||||
<#switch id.apiRestReflexID!no_apiRestReflexID>
|
<#switch id.apiRestReflexID!no_apiRestReflexID>
|
||||||
<#case no_apiRestReflexID>
|
<#case no_apiRestReflexID>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#if restResponsetMsg.body?? >
|
<#if restResponsetMsg.body?? >
|
||||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||||
<#else>
|
<#else>
|
||||||
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
|
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
|
||||||
</#if>
|
</#if>
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
<#-- *********************************************** ApiRestID = preparation_orders_post ******************** -->
|
||||||
<#case "preparation_orders_post">
|
<#case "preparation_orders_post">
|
||||||
<#switch restResponsetMsg.status!no_status>
|
<#switch restResponsetMsg.status!no_status>
|
||||||
<#case no_status>
|
<#case no_status>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#if restResponsetMsg.body?? >
|
<#if restResponsetMsg.body?? >
|
||||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||||
<#else>
|
|
||||||
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
|
|
||||||
</#if>
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
|
||||||
},
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
<#case 200>
|
|
||||||
<#case 201>
|
|
||||||
<#-- *********************************************** ApiRestID = preparation_orders_post ******************** -->
|
|
||||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
|
||||||
<#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)>
|
|
||||||
<#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" >
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipFromAcked>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_PrepOrder_ShipFromAcked.ftl">
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#else>
|
<#else>
|
||||||
<#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "WARN">
|
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
|
||||||
[
|
</#if>
|
||||||
{
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipFromAcked>
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"datas" :
|
||||||
"datas" :
|
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||||
<#include "RFXtoRP_PrepOrder_ShipFromAcked.ftl">
|
},
|
||||||
}
|
{
|
||||||
]
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
||||||
<#else>
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
[
|
"datas" :
|
||||||
{
|
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
||||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
}
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
]
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
<#break>
|
||||||
"datas" :
|
<#case 200>
|
||||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
<#case 201>
|
||||||
},
|
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||||
{
|
<#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)>
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
<#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" >
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
[
|
||||||
"datas" :
|
{
|
||||||
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipFromAcked>
|
||||||
}
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
]
|
"datas" :
|
||||||
</#if>
|
<#include "RFXtoRP_PrepOrder_ShipFromAcked.ftl">
|
||||||
</#if>
|
}
|
||||||
<#break>
|
]
|
||||||
<#default>
|
<#else>
|
||||||
[
|
<#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "WARN">
|
||||||
{
|
[
|
||||||
<#if restResponsetMsg.body?? >
|
{
|
||||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipFromAcked>
|
||||||
<#else>
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}}" />
|
"datas" :
|
||||||
</#if>
|
<#include "RFXtoRP_PrepOrder_ShipFromAcked.ftl">
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
}
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
]
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
|
||||||
},
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
|
||||||
}
|
|
||||||
]
|
|
||||||
</#switch>
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
<#case "receipts_post">
|
|
||||||
<#switch restResponsetMsg.status!no_status>
|
|
||||||
<#case no_status>
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#if restResponsetMsg.body?? >
|
|
||||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
|
||||||
<#else>
|
|
||||||
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
|
|
||||||
</#if>
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
|
||||||
},
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
<#case 200>
|
|
||||||
<#case 201>
|
|
||||||
<#-- *********************************************** ApiRestID = receipts_post ******************** -->
|
|
||||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
|
||||||
<#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)>
|
|
||||||
<#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" >
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipToAcked>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_Receipt_ShipToAcked.ftl">
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#else>
|
<#else>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
<#break>
|
<#break>
|
||||||
|
<#default>
|
||||||
|
[
|
||||||
|
{
|
||||||
|
<#if restResponsetMsg.body?? >
|
||||||
|
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||||
|
<#else>
|
||||||
|
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
|
||||||
|
</#if>
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
||||||
|
}
|
||||||
|
]
|
||||||
|
</#switch>
|
||||||
|
<#break>
|
||||||
|
<#-- *********************************************** ApiRestID = receipts_post ******************** -->
|
||||||
|
<#case "receipts_post">
|
||||||
|
<#switch restResponsetMsg.status!no_status>
|
||||||
|
<#case no_status>
|
||||||
|
[
|
||||||
|
{
|
||||||
|
<#if restResponsetMsg.body?? >
|
||||||
|
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||||
|
<#else>
|
||||||
|
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
|
||||||
|
</#if>
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_RestResponseAllocationError.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") >
|
||||||
|
[
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDeleted>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_Receipt_ExecutionflowDeleted.ftl">
|
||||||
|
}
|
||||||
|
]
|
||||||
|
<#else>
|
||||||
|
[
|
||||||
|
{
|
||||||
|
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
||||||
|
}
|
||||||
|
]
|
||||||
|
</#if>
|
||||||
|
<#break>
|
||||||
<#default>
|
<#default>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#if restResponsetMsg.body?? >
|
<#if restResponsetMsg.body?? >
|
||||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||||
<#else>
|
<#else>
|
||||||
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
|
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
|
||||||
</#if>
|
</#if>
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
</#switch>
|
</#switch>
|
||||||
<#break>
|
<#break>
|
||||||
<#default>
|
<#-- *********************************************** Appointment_post_create ******************** -->
|
||||||
<#stop>
|
<#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}" />
|
||||||
|
</#if>
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_RestResponseAllocationError.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" :
|
||||||
|
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
||||||
|
}
|
||||||
|
]
|
||||||
|
</#if>
|
||||||
|
<#break>
|
||||||
|
<#default>
|
||||||
|
[
|
||||||
|
{
|
||||||
|
<#if restResponsetMsg.body?? >
|
||||||
|
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||||
|
<#else>
|
||||||
|
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
|
||||||
|
</#if>
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
||||||
|
}
|
||||||
|
]
|
||||||
|
</#switch>
|
||||||
|
<#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}" />
|
||||||
|
</#if>
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_RestResponseAllocationError.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" :
|
||||||
|
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
||||||
|
}
|
||||||
|
]
|
||||||
|
</#if>
|
||||||
|
<#break>
|
||||||
|
<#default>
|
||||||
|
[
|
||||||
|
{
|
||||||
|
<#if restResponsetMsg.body?? >
|
||||||
|
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||||
|
<#else>
|
||||||
|
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
|
||||||
|
</#if>
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
||||||
|
}
|
||||||
|
]
|
||||||
|
</#switch>
|
||||||
|
<#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}" />
|
||||||
|
</#if>
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_RestResponseAllocationError.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" :
|
||||||
|
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
||||||
|
}
|
||||||
|
]
|
||||||
|
</#if>
|
||||||
|
<#break>
|
||||||
|
<#default>
|
||||||
|
[
|
||||||
|
{
|
||||||
|
<#if restResponsetMsg.body?? >
|
||||||
|
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||||
|
<#else>
|
||||||
|
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
|
||||||
|
</#if>
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
||||||
|
}
|
||||||
|
]
|
||||||
|
</#switch>
|
||||||
|
<#break>
|
||||||
|
<#-- *********************************************** ApiRestID = appointment_post_physical_receipt_associations ******************** -->
|
||||||
|
<#case "appointment_post_physical_receipt_associations_by_ref">
|
||||||
|
<#case "appointment_post_physical_receipt_associations_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}" />
|
||||||
|
</#if>
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_RestResponseAllocationError.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" :
|
||||||
|
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
||||||
|
}
|
||||||
|
]
|
||||||
|
</#if>
|
||||||
|
<#break>
|
||||||
|
<#default>
|
||||||
|
[
|
||||||
|
{
|
||||||
|
<#if restResponsetMsg.body?? >
|
||||||
|
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||||
|
<#else>
|
||||||
|
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
|
||||||
|
</#if>
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
||||||
|
}
|
||||||
|
]
|
||||||
|
</#switch>
|
||||||
|
<#break>
|
||||||
|
<#-- *********************************************** default ******************** -->
|
||||||
|
<#default>
|
||||||
|
<#stop>
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@ -1,28 +1,93 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message RFX -->
|
<#-- input : message HARDIS WMS -->
|
||||||
<#-- project : projectId in ReflexPlatform -->
|
<#-- project : projectId in HARDIS SC NETWORK -->
|
||||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
|
<#include "ActorPrefix.ftl">
|
||||||
|
|
||||||
<#assign eventRP = JsonUtil.jsonToMap(input)>
|
<#assign eventRP = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
<#assign organisationRP = organisation>
|
<#assign organisationRP = organisation>
|
||||||
|
|
||||||
<#-- initialisation map for SegmentationKey and MetaData -->
|
|
||||||
<#assign Header_MetaData_Map = {} />
|
|
||||||
<#assign SegmentationKeys_Map = {} />
|
|
||||||
<#assign Line_MetaData_Map = {} />
|
|
||||||
|
|
||||||
|
|
||||||
<#switch eventRP.event>
|
<#switch eventRP.event>
|
||||||
|
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||||
<#case "Created">
|
<#case "Created">
|
||||||
<#assign appointment = eventRP.data />
|
<#assign appointment = eventRP.data />
|
||||||
|
[
|
||||||
<#stop "Appointment creation event">
|
{
|
||||||
|
<#assign apiRestReflexID = ApiRestReflexID.appointment_post_create>
|
||||||
<#break>
|
"apiRestReflexID" : "${apiRestReflexID}",
|
||||||
<#default>
|
"datas" :
|
||||||
<#stop >
|
<#include "RPtoRFX_CarrierAppointmentCreated.ftl">
|
||||||
|
}
|
||||||
|
]
|
||||||
|
<#break>
|
||||||
|
<#-- *********************************************** Action = CommissionsUpdated ******************** -->
|
||||||
|
<#case "CommissionsUpdated">
|
||||||
|
<#assign appointment = eventRP.data />
|
||||||
|
[
|
||||||
|
<#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">
|
||||||
|
}
|
||||||
|
</#if>
|
||||||
|
]
|
||||||
|
<#break>
|
||||||
|
<#-- *********************************************** Action = SlotUpdated ******************** -->
|
||||||
|
<#case "SlotUpdated">
|
||||||
|
<#assign appointment = eventRP.data />
|
||||||
|
[
|
||||||
|
<#if eventRP.appointmentCustomFields?has_content>
|
||||||
|
{
|
||||||
|
<#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_number>
|
||||||
|
"apiRestReflexID" : "${apiRestReflexID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl">
|
||||||
|
}
|
||||||
|
<#else>
|
||||||
|
{
|
||||||
|
<#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_ref>
|
||||||
|
"apiRestReflexID" : "${apiRestReflexID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl">
|
||||||
|
}
|
||||||
|
</#if>
|
||||||
|
]
|
||||||
|
<#break>
|
||||||
|
<#-- *********************************************** Action = SlotUpdated ******************** -->
|
||||||
|
<#case "Canceled">
|
||||||
|
<#assign appointment = eventRP.data />
|
||||||
|
[
|
||||||
|
<#if 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">
|
||||||
|
}
|
||||||
|
</#if>
|
||||||
|
]
|
||||||
|
<#break>
|
||||||
|
<#default>
|
||||||
|
<#stop >
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
15
RPtoRFX_CarrierAppointmentCanceledByNumber.ftl
Normal file
15
RPtoRFX_CarrierAppointmentCanceledByNumber.ftl
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"id" : {"refid" : "${eventRP.refid?json_string}"},
|
||||||
|
"route" : "rest/public/v1/physical_depots/{physical_depot_code}/appointment_years/{appointment_year}/appointment_numbers/{appointment_number}/status",
|
||||||
|
"method" : "PUT",
|
||||||
|
"uri_substitutions": {
|
||||||
|
"physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}",
|
||||||
|
"appointment_year":"${eventRP.appointmentCustomFields.year?json_string}",
|
||||||
|
"appointment_number":"${eventRP.appointmentCustomFields.number?json_string}"
|
||||||
|
},
|
||||||
|
"payload" :
|
||||||
|
{
|
||||||
|
"status_code": "999",
|
||||||
|
<#include "RPtoRFX_CarrierAppointmentCancellationCode.ftl">
|
||||||
|
}
|
||||||
|
}
|
||||||
14
RPtoRFX_CarrierAppointmentCanceledByRef.ftl
Normal file
14
RPtoRFX_CarrierAppointmentCanceledByRef.ftl
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"id" : {"refid" : "${eventRP.refid?json_string}"},
|
||||||
|
"route" : "rest/public/v1/physical_depots/{physical_depot_code}/carrier_appointments/{appointment_reference}/status",
|
||||||
|
"method" : "PUT",
|
||||||
|
"uri_substitutions": {
|
||||||
|
"physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}",
|
||||||
|
"appointment_reference":"${eventRP.refid?json_string}"
|
||||||
|
},
|
||||||
|
"payload" :
|
||||||
|
{
|
||||||
|
"status_code": "999",
|
||||||
|
<#include "RPtoRFX_CarrierAppointmentCancellationCode.ftl">
|
||||||
|
}
|
||||||
|
}
|
||||||
2
RPtoRFX_CarrierAppointmentCancellationCode.ftl
Normal file
2
RPtoRFX_CarrierAppointmentCancellationCode.ftl
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
<#-- To custom with cancellation reason code-->
|
||||||
|
"cancellation_reason_code": ""
|
||||||
59
RPtoRFX_CarrierAppointmentCreated.ftl
Normal file
59
RPtoRFX_CarrierAppointmentCreated.ftl
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
{
|
||||||
|
"id" : {"refid" : "${eventRP.refid?json_string}"},
|
||||||
|
"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 "APPOINTMENT_TYPE_LOADING">
|
||||||
|
"unloading_appointment" : "false",
|
||||||
|
"load_appointment" : "true",
|
||||||
|
"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)}",
|
||||||
|
<#break>
|
||||||
|
<#case "APPOINTMENT_TYPE_UNLOADING">
|
||||||
|
"unloading_appointment" : "true",
|
||||||
|
"load_appointment" : "false",
|
||||||
|
"planned_unloading_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,time_zone_rfx),time_zone_rfx)}",
|
||||||
|
"planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}",
|
||||||
|
<#break>
|
||||||
|
<#default>
|
||||||
|
<#stop "appointment.AppointmentType not implemented" >
|
||||||
|
</#switch>
|
||||||
|
<#include "RPtoRFX_CarrierAppointmentDefaultData.ftl">
|
||||||
|
<#if appointment.Commissions??>
|
||||||
|
<#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING">
|
||||||
|
<#if appointment.Commissions[0].OrderID?? && appointment.Commissions[0].OrderID!="">
|
||||||
|
"physical_receipt_list": [
|
||||||
|
<#list eventRP.executionflowCustomFields.entrySet()?filter(l ->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>
|
||||||
|
</#list>
|
||||||
|
],
|
||||||
|
<#else>
|
||||||
|
"appointment_designation":"${(appointment.Reason!"")!?json_string}",
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if appointment.AppointmentType == "APPOINTMENT_TYPE_LOADING">
|
||||||
|
<#if appointment.Commissions[0].OrderID ?? && appointment.Commissions[0].OrderID!="">
|
||||||
|
"appointment_designation":"LOADING",
|
||||||
|
<#else>
|
||||||
|
"appointment_designation":"${(appointment.Reason!"")?json_string}",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
"constant_appointment": "false"
|
||||||
|
}
|
||||||
|
}
|
||||||
14
RPtoRFX_CarrierAppointmentDefaultData.ftl
Normal file
14
RPtoRFX_CarrierAppointmentDefaultData.ftl
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<#-- 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
|
||||||
|
Example :
|
||||||
|
<#assign owner_code = SegmentationKeys_Map["Owner"].String!""/>
|
||||||
|
|
||||||
|
If your SK is :
|
||||||
|
Boolean : .Bool
|
||||||
|
Float : .Float
|
||||||
|
Timestamp : .Timestamp.DateTime or .Timestamp.AuthorTimeZone
|
||||||
|
Int : .Int
|
||||||
|
String : .String
|
||||||
|
-->
|
||||||
@ -0,0 +1,33 @@
|
|||||||
|
{
|
||||||
|
"id" : {"refid" : "${eventRP.refid?json_string}"},
|
||||||
|
"route" : "rest/public/v1/physical_depots/{physical_depot_code}/appointment_years/{appointment_year}/appointment_numbers/{appointment_number}/physical_receipt_associations",
|
||||||
|
"method" : "POST",
|
||||||
|
"uri_substitutions": {
|
||||||
|
"physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}",
|
||||||
|
"appointment_year":"${eventRP.appointmentCustomFields.year?json_string}",
|
||||||
|
"appointment_number":"${eventRP.appointmentCustomFields.number?json_string}"
|
||||||
|
},
|
||||||
|
"payload" :
|
||||||
|
{
|
||||||
|
<#if appointment.Commissions??>
|
||||||
|
<#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING">
|
||||||
|
"physical_receipt_list": [
|
||||||
|
<#list eventRP.executionflowCustomFields.entrySet()?filter(l ->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>
|
||||||
|
</#list>
|
||||||
|
]
|
||||||
|
<#else>
|
||||||
|
<#if appointment.AppointmentType == "APPOINTMENT_TYPE_LOADING">
|
||||||
|
"appointment_designation":"LOADING"
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
"id" : {"refid" : "${eventRP.refid?json_string}"},
|
||||||
|
"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" :
|
||||||
|
{
|
||||||
|
<#if appointment.Commissions??>
|
||||||
|
<#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING">
|
||||||
|
"physical_receipt_list": [
|
||||||
|
<#list eventRP.executionflowCustomFields.entrySet()?filter(l ->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>
|
||||||
|
</#list>
|
||||||
|
]
|
||||||
|
<#else>
|
||||||
|
<#if appointment.AppointmentType == "APPOINTMENT_TYPE_LOADING">
|
||||||
|
"appointment_designation":"LOADING"
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
}
|
||||||
|
}
|
||||||
30
RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl
Normal file
30
RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
"id" : {"refid" : "${eventRP.refid?json_string}"},
|
||||||
|
"route" : "rest/public/v1/physical_depots/{physical_depot_code}/appointment_years/{appointment_year}/appointment_numbers/{appointment_number}",
|
||||||
|
"method" : "PUT",
|
||||||
|
"uri_substitutions": {
|
||||||
|
"physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}",
|
||||||
|
"appointment_year":"${eventRP.appointmentCustomFields.year?json_string}",
|
||||||
|
"appointment_number":"${eventRP.appointmentCustomFields.number?json_string}"
|
||||||
|
},
|
||||||
|
"payload" :
|
||||||
|
{
|
||||||
|
<#switch appointment.AppointmentType>
|
||||||
|
<#case "APPOINTMENT_TYPE_LOADING">
|
||||||
|
"unloading_appointment" : "false",
|
||||||
|
"load_appointment" : "true",
|
||||||
|
"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)}",
|
||||||
|
<#break>
|
||||||
|
<#case "APPOINTMENT_TYPE_UNLOADING">
|
||||||
|
"unloading_appointment" : "true",
|
||||||
|
"load_appointment" : "false",
|
||||||
|
"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)}",
|
||||||
|
<#break>
|
||||||
|
<#default>
|
||||||
|
<#stop "appointment.AppointmentType not implemented" >
|
||||||
|
</#switch>
|
||||||
|
"appointment_designation":"${(appointment.Reason!"")!?json_string}"
|
||||||
|
}
|
||||||
|
}
|
||||||
29
RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl
Normal file
29
RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"id" : {"refid" : "${eventRP.refid?json_string}"},
|
||||||
|
"route" : "rest/public/v1/physical_depots/{physical_depot_code}/carrier_appointments/{appointment_reference}",
|
||||||
|
"method" : "PUT",
|
||||||
|
"uri_substitutions": {
|
||||||
|
"physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}",
|
||||||
|
"appointment_reference":"${eventRP.refid?json_string}"
|
||||||
|
},
|
||||||
|
"payload" :
|
||||||
|
{
|
||||||
|
<#switch appointment.AppointmentType>
|
||||||
|
<#case "APPOINTMENT_TYPE_LOADING">
|
||||||
|
"unloading_appointment" : "false",
|
||||||
|
"load_appointment" : "true",
|
||||||
|
"planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}",
|
||||||
|
"planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}",
|
||||||
|
<#break>
|
||||||
|
<#case "APPOINTMENT_TYPE_UNLOADING">
|
||||||
|
"unloading_appointment" : "true",
|
||||||
|
"load_appointment" : "false",
|
||||||
|
"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)}",
|
||||||
|
<#break>
|
||||||
|
<#default>
|
||||||
|
<#stop "appointment.AppointmentType not implemented" >
|
||||||
|
</#switch>
|
||||||
|
"appointment_designation":"${(appointment.Reason!"")!?json_string}"
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user