You've already forked reflex-wms-connector
Compare commits
101 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7bf0d63d71 | |||
| 7942a0dfc0 | |||
| 16a6ad77c1 | |||
| 8d87e02969 | |||
| 1aea681783 | |||
| 959a0d02a8 | |||
| ed1d989b2d | |||
| f490cce345 | |||
| 2a70e2ca76 | |||
| a25e4046a3 | |||
| f8b0538588 | |||
| 012c4007c7 | |||
| f131a91b36 | |||
| b7d97fbd63 | |||
| b594dc3f7e | |||
| 86b209e56e | |||
| 33e1abe3e1 | |||
| 498fd030a6 | |||
| fc78dbdb66 | |||
| 8721201385 | |||
| f2ef0553b7 | |||
| 05a944250c | |||
| 2ef220f2ca | |||
| f4cb551271 | |||
| 6353ffa18f | |||
| 2b443f56a5 | |||
| 4d70e05947 | |||
| 6eebe5c805 | |||
| 9a9e6922da | |||
| af5775375e | |||
| f29f1b6dc4 | |||
| 6fac2a7a2c | |||
| 7f6fb9b63a | |||
| a570da2699 | |||
| 0795d36caa | |||
| f30e7b94d3 | |||
| 45904e8b6f | |||
| 71e4b030f7 | |||
| 13b23c5819 | |||
| 1be32968f2 | |||
| e269d41ccd | |||
| f48dc006d3 | |||
| fba2b820ac | |||
| 3c6dd780de | |||
| 326390e93d | |||
| 06bcfecad6 | |||
| 76d3db411f | |||
| c04e562c46 | |||
| 21f622dfa2 | |||
| 68a39fab3d | |||
| c472b1f7f5 | |||
| a1c5485beb | |||
| bb2174a8bd | |||
| 29522ebda7 | |||
| 9dd1998c98 | |||
| 4136118604 | |||
| 3c4bb89516 | |||
| 44c9ee7c0c | |||
| 490355cab3 | |||
| 5eb415bfd3 | |||
| b61d45d1aa | |||
| b4314fb6b1 | |||
| d5f48359b0 | |||
| c0d58766d2 | |||
| f1dc82cdf0 | |||
| df8f126c13 | |||
| 2c9d3109b7 | |||
| 7c4c7ea395 | |||
| c9cba04714 | |||
| c91019ce8c | |||
| e0e2cf1c7a | |||
| d507003c2b | |||
| dc28a7be8a | |||
| 99357483f9 | |||
| 31345b7911 | |||
| 3b36b44aea | |||
| fcad79967e | |||
| 12c27f5a66 | |||
| dc52629304 | |||
| 7ed6f794a6 | |||
| d544571d1d | |||
| eaa14b614a | |||
| 8205905ddd | |||
| 915fae567d | |||
| 677abd1d2d | |||
| ae07548499 | |||
| 42fbefc365 | |||
| dfdf51657b | |||
| 3ec2f8f9bf | |||
| 639bbdbff5 | |||
| 3304d944e5 | |||
| d63a3d7a50 | |||
| c779d5305c | |||
| 0f7990b20e | |||
| 1df16adb0a | |||
| a939e6067e | |||
| b66ec8c589 | |||
| 42c5b2943d | |||
| ac5f5d1b88 | |||
| cd1cc00f78 | |||
| 703ad28c19 |
@@ -29,8 +29,8 @@
|
|||||||
"PhotoURI": "${item.saved_picture_path?json_string}"
|
"PhotoURI": "${item.saved_picture_path?json_string}"
|
||||||
<#else>
|
<#else>
|
||||||
<#if item.url?? && item.url!="" && item.url?starts_with("http") == true>
|
<#if item.url?? && item.url!="" && item.url?starts_with("http") == true>
|
||||||
,
|
,
|
||||||
"PhotoURI": "${item.url?json_string}"
|
"PhotoURI": "${item.url?json_string}"
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
|
|||||||
@@ -7,8 +7,9 @@
|
|||||||
<#include "ReflexUtils.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 partnerApplicationRP = partnerApplication>
|
||||||
|
|
||||||
<#assign aDateTime = .now>
|
<#assign aDateTime = .now>
|
||||||
|
|
||||||
@@ -20,16 +21,22 @@
|
|||||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.SiteForceBookAppointment>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.BookingForceBookAppointment>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl">
|
<#include "RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierExpected>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrCarrierApt_CarrierExpected.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
<#case "U">
|
<#case "U">
|
||||||
<#-- *********************************************** Action = Update ********************-->
|
<#-- *********************************************** Action = Update ********************-->
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCustomFieldsUpdated>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCustomFieldsUpdated>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
@@ -41,10 +48,10 @@
|
|||||||
<#if carrier_apt.status?? && (carrier_apt.status.status_code=="999" || carrier_apt.status.status_code=="040" || carrier_apt.status.status_code=="030")>
|
<#if carrier_apt.status?? && (carrier_apt.status.status_code=="999" || carrier_apt.status.status_code=="040" || carrier_apt.status.status_code=="030")>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.SiteCancelAppointment>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.BookingForceCancelAppointment>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl">
|
<#include "RFXtoRP_HsrCarrierApt_BookingForceCancelAppointment.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#else>
|
<#else>
|
||||||
@@ -110,10 +117,10 @@
|
|||||||
<#else>
|
<#else>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.SiteWMSUpdateAppointment>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.BookingWMSUpdateAppointment>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl">
|
<#include "RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
</#if>
|
</#if>
|
||||||
@@ -130,10 +137,10 @@
|
|||||||
[
|
[
|
||||||
<#-- Ajout des lignes-->
|
<#-- Ajout des lignes-->
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.SiteCancelAppointment>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.BookingForceCancelAppointment>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl">
|
<#include "RFXtoRP_HsrCarrierApt_BookingForceCancelAppointment.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|||||||
@@ -7,20 +7,20 @@
|
|||||||
"ID": {
|
"ID": {
|
||||||
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
"RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
"RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}"
|
||||||
<#else>
|
<#else>
|
||||||
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}"
|
||||||
</#if>
|
</#if>
|
||||||
<#else>
|
<#else>
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
"RefID": "${carrier_apt.appointment_reference?json_string}",
|
"RefID": "${carrier_apt.appointment_reference?json_string}"
|
||||||
<#else>
|
<#else>
|
||||||
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}"
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
}
|
},
|
||||||
"Payload": {
|
"Payload": {
|
||||||
"ActorID": "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
||||||
<#--To configure-->
|
<#--To configure-->
|
||||||
<#-- "CarrierInformation": [
|
<#-- "CarrierInformation": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
{
|
{
|
||||||
"Key": "unloading",
|
"Key": "unloading",
|
||||||
"Value": "${carrier_apt.unloading_appointment?json_string}"
|
"Value": "${carrier_apt.unloading_appointment?json_string}"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"Payload":{
|
"Payload":{
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
</#if>
|
</#if>
|
||||||
},
|
},
|
||||||
"Payload": {
|
"Payload": {
|
||||||
"ActorID": "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
||||||
<#--To configure-->
|
<#--To configure-->
|
||||||
<#-- "MetaData": [
|
<#-- "MetaData": [
|
||||||
{
|
{
|
||||||
|
|||||||
194
RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl
Normal file
194
RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl
Normal file
@@ -0,0 +1,194 @@
|
|||||||
|
[
|
||||||
|
<#assign creation_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) />
|
||||||
|
{
|
||||||
|
"Header":{
|
||||||
|
"ProjectID": "${projectRP}:${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
||||||
|
},
|
||||||
|
"ID":{
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${creation_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
},
|
||||||
|
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"RefID": "${carrier_apt.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
"CustomFields": [
|
||||||
|
{
|
||||||
|
"Key": "depot",
|
||||||
|
"Value": "${carrier_apt.physical_depot?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "year",
|
||||||
|
"Value": "${carrier_apt.year_number?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "number",
|
||||||
|
"Value": "${carrier_apt.appointment_number?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "reference",
|
||||||
|
"Value": "${carrier_apt.appointment_reference?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "carrier",
|
||||||
|
"Value": "${carrier_apt.planned_carrier?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "loading",
|
||||||
|
"Value": "${carrier_apt.load_appointment?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "unloading",
|
||||||
|
"Value": "${carrier_apt.unloading_appointment?json_string}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Payload": {
|
||||||
|
"TimeZone":"${time_zone_rfx}",
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false">
|
||||||
|
<#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") || carrier_apt.planned_unloading_end_datetime?starts_with("00") || carrier_apt.planned_unloading_end_datetime?contains("-00-")>
|
||||||
|
<#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend is not initialized" >
|
||||||
|
</#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" >
|
||||||
|
<#else>
|
||||||
|
<#if (duration == 0)>
|
||||||
|
<#assign duration = 1 />
|
||||||
|
</#if>
|
||||||
|
</#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_load_start_datetime or planned_load_end_datetime field of appointmend are not valid" >
|
||||||
|
<#else>
|
||||||
|
<#if (duration == 0)>
|
||||||
|
<#assign duration = 1 />
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
||||||
|
<#if carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-") || carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") >
|
||||||
|
<#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend is not initialized" >
|
||||||
|
</#if>
|
||||||
|
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||||
|
<#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) />
|
||||||
|
<#if (duration < 0)>
|
||||||
|
<#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend are not valid" >
|
||||||
|
<#else>
|
||||||
|
<#if (duration == 0)>
|
||||||
|
<#assign duration = 1 />
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#stop "Appointment type not supported" >
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
"AppointmentType": "${appointmentType}",
|
||||||
|
"Emails": ["${carrier_apt.creation_user_email?json_string}"],
|
||||||
|
|
||||||
|
<#include "RFXtoRP_HsrCarrierApt_SegmentationSelections.ftl">,
|
||||||
|
<#include "RFXtoRP_HsrCarrierApt_CarrierInformation.ftl">,
|
||||||
|
<#include "RFXtoRP_HsrCarrierApt_MetadataAppointment.ftl">,
|
||||||
|
<#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0)>
|
||||||
|
"Unloading" :
|
||||||
|
{
|
||||||
|
"Projects" : [{
|
||||||
|
"Commissions": [
|
||||||
|
<#list carrier_apt.physical_receipt_list?filter(l ->l??) as physical_receipt>
|
||||||
|
{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
||||||
|
<#if physical_receipt.physical_receipt_reference?? && physical_receipt.physical_receipt_reference!="">
|
||||||
|
"OrderID": "${physical_receipt.physical_receipt_reference?json_string}",
|
||||||
|
"ExecutionflowID":"${physical_receipt.physical_receipt_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"OrderID": "${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year}${physical_receipt.receipt_number}",
|
||||||
|
"ExecutionflowID": "${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year?json_string}${physical_receipt.receipt_number?json_string}",
|
||||||
|
</#if>
|
||||||
|
"ExecutionflowID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year?json_string}${physical_receipt.receipt_number?json_string}",
|
||||||
|
"ProjectID": "${projectRP}",
|
||||||
|
"PartnerAppID": "${partnerApplicationRP}",
|
||||||
|
"OrganisationID": "${organisationRP}"
|
||||||
|
}<#sep>,</#sep>
|
||||||
|
</#list>
|
||||||
|
],
|
||||||
|
"ProjectID" : "${projectRP}"
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
<#else>
|
||||||
|
<#if appointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||||
|
"Unloading" :
|
||||||
|
<#else>
|
||||||
|
"Loading" :
|
||||||
|
</#if>
|
||||||
|
{
|
||||||
|
"Projects" : [{
|
||||||
|
"Commissions": [{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
||||||
|
"ProjectID": "${projectRP}",
|
||||||
|
"PartnerAppID": "${partnerApplicationRP}",
|
||||||
|
"OrganisationID": "${organisationRP}"
|
||||||
|
}],
|
||||||
|
"ProjectID" : "${projectRP}"
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
||||||
|
"Reason": "UNLOADING AND LOADING / ${carrier_apt.appointment_designation?json_string}",
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.appointment_designation?? && carrier_apt.appointment_designation!="">
|
||||||
|
"Reason": "${carrier_apt.appointment_designation?json_string}",
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"Reason": "${carrier_apt.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"Reason": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
"Slot": {
|
||||||
|
<#-- calcul de de la durée en fonction des start et end time-->
|
||||||
|
"DurationInSeconds": "${duration}",
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false" >
|
||||||
|
<#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-")>
|
||||||
|
<#stop "planned_unloading_start_datetime field of appointmend is not initialized" >
|
||||||
|
</#if>
|
||||||
|
"StartDateTime": "${carrier_apt.planned_unloading_start_datetime}"
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true">
|
||||||
|
<#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-")>
|
||||||
|
<#stop "planned_load_start_datetime field of appointmend is not initialized" >
|
||||||
|
</#if>
|
||||||
|
"StartDateTime": "${carrier_apt.planned_load_start_datetime}"
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
||||||
|
<#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-")>
|
||||||
|
<#stop "planned_unloading_start_datetime field of appointmend is not initialized" >
|
||||||
|
</#if>
|
||||||
|
"StartDateTime": "${carrier_apt.planned_unloading_start_datetime}"
|
||||||
|
<#else>
|
||||||
|
<#stop "Appointment type not supported" >
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
58
RFXtoRP_HsrCarrierApt_BookingForceCancelAppointment.ftl
Normal file
58
RFXtoRP_HsrCarrierApt_BookingForceCancelAppointment.ftl
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
<#assign update_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) />
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"ID":{
|
||||||
|
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"RefID": "${carrier_apt.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${update_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
},
|
||||||
|
"CustomFields": [
|
||||||
|
{
|
||||||
|
"Key": "depot",
|
||||||
|
"Value": "${carrier_apt.physical_depot?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "year",
|
||||||
|
"Value": "${carrier_apt.year_number?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "number",
|
||||||
|
"Value": "${carrier_apt.appointment_number?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "reference",
|
||||||
|
"Value": "${carrier_apt.appointment_reference?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "carrier",
|
||||||
|
"Value": "${carrier_apt.planned_carrier?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "loading",
|
||||||
|
"Value": "${carrier_apt.load_appointment?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "unloading",
|
||||||
|
"Value": "${carrier_apt.unloading_appointment?json_string}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
},
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}:${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -1,61 +1,29 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
|
<#assign update_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) />
|
||||||
|
|
||||||
"Header":{
|
"Header":{
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}:${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
||||||
},
|
},
|
||||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
"ID":{
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${update_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
},
|
||||||
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
"AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
"RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
<#else>
|
<#else>
|
||||||
"AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
</#if>
|
</#if>
|
||||||
<#else>
|
<#else>
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
"AppointmentID": "${carrier_apt.appointment_reference?json_string}",
|
"RefID": "${carrier_apt.appointment_reference?json_string}",
|
||||||
<#else>
|
<#else>
|
||||||
"AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
"TimeZone":"${time_zone_rfx}",
|
"CustomFields": [
|
||||||
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false">
|
|
||||||
<#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") || carrier_apt.planned_unloading_end_datetime?starts_with("00") || carrier_apt.planned_unloading_end_datetime?contains("-00-")>
|
|
||||||
<#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend is not initialized" >
|
|
||||||
</#if>
|
|
||||||
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
|
||||||
<#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_unloading_end_datetime?datetime.iso) />
|
|
||||||
<#if (duration <= 0)>
|
|
||||||
<#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" >
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" >
|
|
||||||
<#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-") || carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-")>
|
|
||||||
<#stop "planned_load_start_datetime or planned_load_end_datetime field of appointmend is not initialized" >
|
|
||||||
</#if>
|
|
||||||
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_LOADING>
|
|
||||||
<#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_load_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) />
|
|
||||||
<#if (duration <= 0)>
|
|
||||||
<#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" >
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
|
||||||
<#if carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-") || carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") >
|
|
||||||
<#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend is not initialized" >
|
|
||||||
</#if>
|
|
||||||
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
|
||||||
<#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) />
|
|
||||||
<#if (duration <= 0)>
|
|
||||||
<#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend are not valid" >
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN>
|
|
||||||
<#assign duration = 0 />
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
"AppointmentType": "${appointmentType}",
|
|
||||||
"Emails": ["${carrier_apt.creation_user_email?json_string}"],
|
|
||||||
"CustomFields": [
|
|
||||||
{
|
{
|
||||||
"Key": "depot",
|
"Key": "depot",
|
||||||
"Value": "${carrier_apt.physical_depot?json_string}"
|
"Value": "${carrier_apt.physical_depot?json_string}"
|
||||||
@@ -84,35 +52,106 @@
|
|||||||
"Key": "unloading",
|
"Key": "unloading",
|
||||||
"Value": "${carrier_apt.unloading_appointment?json_string}"
|
"Value": "${carrier_apt.unloading_appointment?json_string}"
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
<#include "RFXtoRP_HsrCarrierApt_SegmentationSelections.ftl">,
|
},
|
||||||
<#include "RFXtoRP_HsrCarrierApt_CarrierInformation.ftl">,
|
"Payload": {
|
||||||
<#include "RFXtoRP_HsrCarrierApt_MetadataAppointment.ftl">,
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false">
|
||||||
<#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0)>
|
<#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-")>
|
||||||
"Commissions": [
|
<#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend is not initialized" >
|
||||||
<#list carrier_apt.physical_receipt_list?filter(l ->l??) as physical_receipt>
|
</#if>
|
||||||
{
|
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
<#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_unloading_end_datetime?datetime.iso) />
|
||||||
<#if physical_receipt.physical_receipt_reference?? && physical_receipt.physical_receipt_reference!="">
|
<#if (duration <= 0)>
|
||||||
"OrderID": "${physical_receipt.physical_receipt_reference?json_string}",
|
<#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" >
|
||||||
"ExecutionflowID": "${physical_receipt.physical_receipt_reference?trim?json_string}",
|
</#if>
|
||||||
<#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}${physical_receipt.receipt_number}",
|
|
||||||
</#if>
|
|
||||||
"ProjectID": "${projectRP}",
|
|
||||||
<#include "RFXtoRP_HsrCarrierApt_Quantities.ftl">
|
|
||||||
}<#sep>,</#sep>
|
|
||||||
</#list>
|
|
||||||
],
|
|
||||||
<#else>
|
<#else>
|
||||||
"Commissions": [
|
<#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" >
|
||||||
|
<#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-") || carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-")>
|
||||||
|
<#stop "planned_load_start_datetime or planned_load_end_datetime field of appointmend is not initialized" >
|
||||||
|
</#if>
|
||||||
|
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_LOADING>
|
||||||
|
<#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_load_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) />
|
||||||
|
<#if (duration <= 0)>
|
||||||
|
<#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" >
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
||||||
|
<#if carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-") || carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") >
|
||||||
|
<#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend is not initialized" >
|
||||||
|
</#if>
|
||||||
|
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||||
|
<#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) />
|
||||||
|
<#if (duration <= 0)>
|
||||||
|
<#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend are not valid" >
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#stop "Appointment type not supported" >
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
"TimeZone":"${time_zone_rfx}",
|
||||||
|
<#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0) && ((carrier_apt.unloading_appointment =="true" && carrier_apt.load_appointment =="false") || (carrier_apt.unloading_appointment =="false" && carrier_apt.load_appointment =="true"))>
|
||||||
|
"Unloading" :
|
||||||
|
{
|
||||||
|
"Projects" : [
|
||||||
{
|
{
|
||||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
"Commissions": [
|
||||||
"ProjectID": "${projectRP}",
|
<#list carrier_apt.physical_receipt_list?filter(l ->l??) as physical_receipt>
|
||||||
<#include "RFXtoRP_HsrCarrierApt_Quantities.ftl">
|
{
|
||||||
}
|
"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}",
|
||||||
|
"PartnerAppID": "${partnerApplicationRP}",
|
||||||
|
"OrganisationID": "${organisationRP}"
|
||||||
|
}<#sep>,</#sep>
|
||||||
|
</#list>
|
||||||
|
],
|
||||||
|
"ProjectID" : "${projectRP}"
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
"Reason": "",
|
||||||
|
<#else>
|
||||||
|
<#if appointmentType == AppointmentType.APPOINTMENT_TYPE_LOADING>
|
||||||
|
"Loading" :
|
||||||
|
{
|
||||||
|
"Projects" : [
|
||||||
|
{
|
||||||
|
"Commissions": [
|
||||||
|
{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
||||||
|
"ProjectID": "${projectRP}",
|
||||||
|
"PartnerAppID": "${partnerApplicationRP}",
|
||||||
|
"OrganisationID": "${organisationRP}"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"ProjectID" : "${projectRP}"
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
<#else>
|
||||||
|
<#if appointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||||
|
"Unloading" :
|
||||||
|
{
|
||||||
|
"Projects" : [
|
||||||
|
{
|
||||||
|
"Commissions": [
|
||||||
|
{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
||||||
|
"ProjectID": "${projectRP}",
|
||||||
|
"PartnerAppID": "${partnerApplicationRP}",
|
||||||
|
"OrganisationID": "${organisationRP}"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"ProjectID" : "${projectRP}"
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
||||||
"Reason": "UNLOADING AND LOADING / ${carrier_apt.appointment_designation?json_string}",
|
"Reason": "UNLOADING AND LOADING / ${carrier_apt.appointment_designation?json_string}",
|
||||||
<#else>
|
<#else>
|
||||||
@@ -127,10 +166,9 @@
|
|||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
|
"Slot": {
|
||||||
"Slots": [{
|
|
||||||
<#-- calcul de de la durée en fonction des start et end time-->
|
<#-- calcul de de la durée en fonction des start et end time-->
|
||||||
"DurationInSeconds": "${duration}",
|
"DurationInSeconds": "${duration}",
|
||||||
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false" >
|
<#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-")>
|
<#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" >
|
<#stop "planned_unloading_start_datetime field of appointmend is not initialized" >
|
||||||
@@ -153,6 +191,7 @@
|
|||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
}]
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
31
RFXtoRP_HsrCarrierApt_CarrierExpected.ftl
Normal file
31
RFXtoRP_HsrCarrierApt_CarrierExpected.ftl
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
[
|
||||||
|
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) />
|
||||||
|
<#assign ref_datetime2 = AddSecondsToDatetime(ref_datetime?datetime.iso, 60)?iso_utc />
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"RefID": "${carrier_apt.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${ref_datetime2}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload":{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
"Quantities": [
|
|
||||||
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl">
|
<#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl">
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCustomFieldsUpdated>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCustomFieldsUpdated>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
|
|||||||
@@ -79,6 +79,7 @@
|
|||||||
<#else>
|
<#else>
|
||||||
"Actor":
|
"Actor":
|
||||||
{
|
{
|
||||||
|
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_ShipToMetadata.ftl">,
|
||||||
"Name" : "${(preparation_order.address.name_or_company_name!"")?json_string}",
|
"Name" : "${(preparation_order.address.name_or_company_name!"")?json_string}",
|
||||||
"Address" :
|
"Address" :
|
||||||
{
|
{
|
||||||
|
|||||||
10
RFXtoRP_HsrPro_ExecutionflowDetected_ShipToMetadata.ftl
Normal file
10
RFXtoRP_HsrPro_ExecutionflowDetected_ShipToMetadata.ftl
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<#-- use protobuf of class HsrPro to find HARDIS WMS fields names -->
|
||||||
|
|
||||||
|
<#-- Best practices:
|
||||||
|
If the SK is of type:
|
||||||
|
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
||||||
|
- boolean: possible values: true and false
|
||||||
|
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
||||||
|
- decimal number: the separator is a point (e.g. 10.5)-->
|
||||||
|
|
||||||
|
"MetaData": [ ]
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
<#if receipt.receipt_type == "030">
|
<#if receipt.receipt_type == "030">
|
||||||
<#stop "ignored message because receipt type = transfert">
|
<#stop "ignored message because receipt type = transfert">
|
||||||
<#else>
|
<#else>
|
||||||
<#if receipt.line_list ??>
|
<#if receipt.line_list ?? && receipt.line_list[0]??>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||||
@@ -60,17 +60,41 @@
|
|||||||
}
|
}
|
||||||
<#else>
|
<#else>
|
||||||
<#if receipt.receipt_confirmed == "true" >
|
<#if receipt.receipt_confirmed == "true" >
|
||||||
|
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
||||||
|
<#assign ID = "${receipt.receipt_reference?trim?json_string}"/>
|
||||||
|
<#else>
|
||||||
|
<#assign ID = "${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>
|
||||||
|
<#assign payload = '{"Header": {"ProjectID": "${projectRP!""}"},"IDs": [{"RefID": "${ID}"}]}'/>
|
||||||
|
<#assign queryApiReflexPlatformID = QueryApiReflexPlatformID.OrderGetByIds>
|
||||||
|
<#assign response = QueryApiReflexPlatformCall.call(queryApiReflexPlatformID,payload) />
|
||||||
|
<#assign orderRP = JsonUtil.jsonToMap(response)>
|
||||||
|
<#if orderRP?? && orderRP.Objects?? && orderRP.Objects[0]?? && orderRP.Objects[0].ID.RefID?? >
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl">
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl">
|
||||||
}
|
}
|
||||||
|
<#else>
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl">
|
||||||
|
}
|
||||||
|
</#if>
|
||||||
<#else>
|
<#else>
|
||||||
<#if receipt.receipt_type == "030">
|
<#if receipt.receipt_type == "030">
|
||||||
<#stop "ignored message because receipt type = transfert">
|
<#stop "ignored message because receipt type = transfert">
|
||||||
<#else>
|
<#else>
|
||||||
<#if receipt.line_list ??>
|
<#if receipt.line_list ?? && receipt.line_list[0]??>
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
|||||||
@@ -28,29 +28,37 @@
|
|||||||
<#assign AddComma = false />
|
<#assign AddComma = false />
|
||||||
<#assign appointment = eventRP.data />
|
<#assign appointment = eventRP.data />
|
||||||
[
|
[
|
||||||
<#if eventRP.commissionsUpdated>
|
<#if appointment?? && (!(appointment.WMSCreated??) || !appointment.WMSCreated) && appointment.Status?? && appointment.Status.Current?? && appointment.Status.Current.StatusCode?? && appointment.Status.Current.StatusCode == AppointmentStatusCode.APPOINTMENT_0150_ALLOCATION_ERROR>
|
||||||
<#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING" && eventRP.addedCommissions?? && eventRP.addedCommissions !="">
|
{
|
||||||
|
<#assign apiRestReflexID = ApiRestReflexID.appointment_post_create>
|
||||||
|
"apiRestReflexID" : "${apiRestReflexID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RPtoRFX_CarrierAppointmentCreated.ftl">
|
||||||
|
}
|
||||||
|
<#else>
|
||||||
|
<#if eventRP.commissionsUpdated>
|
||||||
|
<#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING && eventRP.addedUnloadCommissions?? && eventRP.addedUnloadCommissions != "">
|
||||||
<#if eventRP.appointmentCustomFields?has_content>
|
<#if eventRP.appointmentCustomFields?has_content>
|
||||||
{
|
{
|
||||||
<#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_number>
|
<#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_number>
|
||||||
"apiRestReflexID" : "${apiRestReflexID}",
|
"apiRestReflexID" : "${apiRestReflexID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl">
|
<#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl">
|
||||||
}
|
}
|
||||||
<#else>
|
<#else>
|
||||||
{
|
{
|
||||||
<#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_ref>
|
<#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_ref>
|
||||||
"apiRestReflexID" : "${apiRestReflexID}",
|
"apiRestReflexID" : "${apiRestReflexID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl">
|
<#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl">
|
||||||
}
|
}
|
||||||
</#if>
|
</#if>
|
||||||
<#assign AddComma = true />
|
<#assign AddComma = true />
|
||||||
</#if>
|
</#if>
|
||||||
<#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING" && eventRP.removedCommissions?? && eventRP.removedCommissions!="">
|
<#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING && eventRP.removedUnloadCommissions?? && eventRP.removedUnloadCommissions!="">
|
||||||
<#if AddComma == true>
|
<#if AddComma == true>
|
||||||
,
|
,
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
<#if eventRP.appointmentCustomFields?has_content>
|
<#if eventRP.appointmentCustomFields?has_content>
|
||||||
{
|
{
|
||||||
@@ -67,32 +75,33 @@
|
|||||||
<#include "RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl">
|
<#include "RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl">
|
||||||
}
|
}
|
||||||
</#if>
|
</#if>
|
||||||
|
<#assign AddComma = true />
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
<#-- *********************************************** Action = reasonUpdated or slotUpdated ******************** -->
|
||||||
|
<#if eventRP.reasonUpdated || eventRP.slotUpdated || eventRP.carrierInformationUpdated>
|
||||||
|
<#if AddComma == true>
|
||||||
|
,
|
||||||
|
</#if>
|
||||||
|
<#if eventRP.appointmentCustomFields?has_content>
|
||||||
|
{
|
||||||
|
<#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_number>
|
||||||
|
"apiRestReflexID" : "${apiRestReflexID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl">
|
||||||
|
}
|
||||||
|
<#else>
|
||||||
|
{
|
||||||
|
<#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_ref>
|
||||||
|
"apiRestReflexID" : "${apiRestReflexID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl">
|
||||||
|
}
|
||||||
|
</#if>
|
||||||
<#assign AddComma = true />
|
<#assign AddComma = true />
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
<#-- *********************************************** Action = reasonUpdated or slotUpdated ******************** -->
|
|
||||||
<#if eventRP.reasonUpdated || eventRP.slotUpdated || eventRP.carrierInformationUpdated>
|
|
||||||
<#if AddComma == true>
|
|
||||||
,
|
|
||||||
</#if>
|
</#if>
|
||||||
<#if eventRP.appointmentCustomFields?has_content>
|
</#if>
|
||||||
{
|
]
|
||||||
<#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_number>
|
|
||||||
"apiRestReflexID" : "${apiRestReflexID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl">
|
|
||||||
}
|
|
||||||
<#else>
|
|
||||||
{
|
|
||||||
<#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_ref>
|
|
||||||
"apiRestReflexID" : "${apiRestReflexID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl">
|
|
||||||
}
|
|
||||||
</#if>
|
|
||||||
<#assign AddComma = true />
|
|
||||||
</#if>
|
|
||||||
]
|
|
||||||
<#break>
|
<#break>
|
||||||
<#-- *********************************************** Action = SlotUpdated ******************** -->
|
<#-- *********************************************** Action = SlotUpdated ******************** -->
|
||||||
<#case "Canceled">
|
<#case "Canceled">
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
{
|
{
|
||||||
"appointment_reference": "${eventRP.refid?json_string}",
|
"appointment_reference": "${eventRP.refid?json_string}",
|
||||||
<#switch appointment.AppointmentType>
|
<#switch appointment.AppointmentType>
|
||||||
<#case "APPOINTMENT_TYPE_LOADING">
|
<#case AppointmentType.APPOINTMENT_TYPE_LOADING>
|
||||||
"unloading_appointment" : "false",
|
"unloading_appointment" : "false",
|
||||||
"load_appointment" : "true",
|
"load_appointment" : "true",
|
||||||
<#if appointment.TimeZone?? && appointment.TimeZone!="">
|
<#if appointment.TimeZone?? && appointment.TimeZone!="">
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
"planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}",
|
"planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}",
|
||||||
</#if>
|
</#if>
|
||||||
<#break>
|
<#break>
|
||||||
<#case "APPOINTMENT_TYPE_UNLOADING">
|
<#case AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||||
"unloading_appointment" : "true",
|
"unloading_appointment" : "true",
|
||||||
"load_appointment" : "false",
|
"load_appointment" : "false",
|
||||||
<#if appointment.TimeZone?? && appointment.TimeZone!="">
|
<#if appointment.TimeZone?? && appointment.TimeZone!="">
|
||||||
@@ -35,30 +35,35 @@
|
|||||||
<#stop "appointment.AppointmentType not implemented" >
|
<#stop "appointment.AppointmentType not implemented" >
|
||||||
</#switch>
|
</#switch>
|
||||||
<#include "RPtoRFX_CarrierAppointmentDefaultData.ftl">
|
<#include "RPtoRFX_CarrierAppointmentDefaultData.ftl">
|
||||||
<#if appointment.Commissions??>
|
<#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING >
|
||||||
<#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING">
|
<#if appointment.Unloading?? && appointment.Unloading.Projects?? &&
|
||||||
<#if appointment.Commissions[0].OrderID?? && appointment.Commissions[0].OrderID!="">
|
appointment.Unloading.Projects[0]?? &&
|
||||||
"physical_receipt_list": [
|
appointment.Unloading.Projects[0].Commissions?? &&
|
||||||
<#list eventRP.executionflowCustomFields.entrySet()?filter(l ->l.value?? && l.value?has_content) as custom>
|
appointment.Unloading.Projects[0].Commissions[0]?? &&
|
||||||
|
appointment.Unloading.Projects[0].Commissions[0].ExecutionflowID?? &&
|
||||||
|
appointment.Unloading.Projects[0].Commissions[0].ExecutionflowID!="" >
|
||||||
|
"physical_receipt_list": [
|
||||||
|
<#list appointment.Unloading.Projects[0].Commissions?filter(l ->l.ExecutionflowID?? && l.ExecutionflowID !="") as commission>
|
||||||
|
<#list eventRP.executionflowCustomFields.entrySet()?filter(l ->l.key == commission.ExecutionflowID && l.value?? && l.value?has_content) as custom>
|
||||||
{
|
{
|
||||||
"receipt_activity": "${custom.value.activity_code?json_string}",
|
"receipt_activity": "${custom.value.activity_code?json_string}",
|
||||||
"originator_code": "${custom.value.originator_code?json_string}",
|
"originator_code": "${custom.value.originator_code?json_string}",
|
||||||
"physical_receipt_reference": "${custom.value.reference?json_string}",
|
"physical_receipt_reference": "${custom.value.reference?json_string}",
|
||||||
"receipt_year": "${custom.value.order_year?json_string}",
|
"receipt_year": "${custom.value.order_year?json_string}",
|
||||||
"receipt_number": "${custom.value.order_number?json_string}"
|
"receipt_number": "${custom.value.order_number?json_string}"
|
||||||
|
|
||||||
}
|
}
|
||||||
<#sep>,</#sep>
|
<#sep>,</#sep>
|
||||||
</#list>
|
</#list>
|
||||||
],
|
<#sep>,</#sep>
|
||||||
<#else>
|
</#list>
|
||||||
"appointment_designation":"${(appointment.Reason!"")!?json_string}",
|
],
|
||||||
</#if>
|
|
||||||
<#else>
|
<#else>
|
||||||
<#if appointment.AppointmentType == "APPOINTMENT_TYPE_LOADING">
|
"appointment_designation":"${(appointment.Reason!"")!?json_string}",
|
||||||
"appointment_designation":"${(appointment.Reason!"")?json_string}",
|
</#if>
|
||||||
</#if>
|
<#else>
|
||||||
</#if>
|
<#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_LOADING>
|
||||||
|
"appointment_designation":"${(appointment.Reason!"")?json_string}",
|
||||||
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
"constant_appointment": "false"
|
"constant_appointment": "false"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,4 +18,24 @@
|
|||||||
Timestamp : .Timestamp.DateTime or .Timestamp.AuthorTimeZone
|
Timestamp : .Timestamp.DateTime or .Timestamp.AuthorTimeZone
|
||||||
Int : .Int
|
Int : .Int
|
||||||
String : .String
|
String : .String
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
<#-- Note : you can send url path of appointment to WMS, using this below code -->
|
||||||
|
|
||||||
|
<#--
|
||||||
|
<#assign appointmentPathURL = JsonUtil.getAppointmentPathURL(eventRP.site,eventRP.refid)>
|
||||||
|
<#assign payLoad = '{ "Header": {"ProjectID": "${projectRP!""}"},"IsOnce": false,"IsPublic": true,"TimeToLive": "0","URL": "${appointmentPathURL}"}' />
|
||||||
|
<#assign projectGetTinyURL = QueryApiReflexPlatformID.ProjectGetTinyURL>
|
||||||
|
<#assign response = QueryApiReflexPlatformCall.call(projectGetTinyURL,payLoad) />
|
||||||
|
<#assign tinyURL = JsonUtil.jsonToMap(response)>
|
||||||
|
|
||||||
|
<#if tinyURL?? && tinyURL.TinyURL?? >
|
||||||
|
"comment_list": [
|
||||||
|
{
|
||||||
|
"line_number": 1,
|
||||||
|
"group_code": "SCN",
|
||||||
|
"text": "${tinyURL.TinyURL.URL?json_string}"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
</#if>
|
||||||
|
-->
|
||||||
@@ -10,8 +10,14 @@
|
|||||||
"payload" :
|
"payload" :
|
||||||
{
|
{
|
||||||
<#assign executionflowCustomFields = eventRP.executionflowCustomFields >
|
<#assign executionflowCustomFields = eventRP.executionflowCustomFields >
|
||||||
|
<#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||||
|
<#assign addedCommissions = eventRP.addedUnloadCommissions />
|
||||||
|
<#else>
|
||||||
|
<#assign addedCommissions = eventRP.addedLoadCommissions />
|
||||||
|
</#if>
|
||||||
|
|
||||||
"physical_receipt_list": [
|
"physical_receipt_list": [
|
||||||
<#list eventRP.addedCommissions as addedCommission>
|
<#list addedCommissions?filter(l -> l.ExecutionflowID??) as addedCommission>
|
||||||
{
|
{
|
||||||
"receipt_activity": "${executionflowCustomFields[addedCommission.ExecutionflowID].activity_code?json_string}",
|
"receipt_activity": "${executionflowCustomFields[addedCommission.ExecutionflowID].activity_code?json_string}",
|
||||||
"originator_code": "${executionflowCustomFields[addedCommission.ExecutionflowID].originator_code?json_string}",
|
"originator_code": "${executionflowCustomFields[addedCommission.ExecutionflowID].originator_code?json_string}",
|
||||||
|
|||||||
@@ -9,8 +9,14 @@
|
|||||||
"payload" :
|
"payload" :
|
||||||
{
|
{
|
||||||
<#assign executionflowCustomFields = eventRP.executionflowCustomFields >
|
<#assign executionflowCustomFields = eventRP.executionflowCustomFields >
|
||||||
|
<#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||||
|
<#assign addedCommissions = eventRP.addedUnloadCommissions />
|
||||||
|
<#else>
|
||||||
|
<#assign addedCommissions = eventRP.addedLoadCommissions />
|
||||||
|
</#if>
|
||||||
|
|
||||||
"physical_receipt_list": [
|
"physical_receipt_list": [
|
||||||
<#list eventRP.addedCommissions as addedCommission>
|
<#list addedCommissions?filter(l -> l.ExecutionflowID??) as addedCommission>
|
||||||
{
|
{
|
||||||
"receipt_activity": "${executionflowCustomFields[addedCommission.ExecutionflowID].activity_code?json_string}",
|
"receipt_activity": "${executionflowCustomFields[addedCommission.ExecutionflowID].activity_code?json_string}",
|
||||||
"originator_code": "${executionflowCustomFields[addedCommission.ExecutionflowID].originator_code?json_string}",
|
"originator_code": "${executionflowCustomFields[addedCommission.ExecutionflowID].originator_code?json_string}",
|
||||||
|
|||||||
@@ -10,8 +10,14 @@
|
|||||||
"payload" :
|
"payload" :
|
||||||
{
|
{
|
||||||
<#assign executionflowCustomFields = eventRP.executionflowCustomFields >
|
<#assign executionflowCustomFields = eventRP.executionflowCustomFields >
|
||||||
|
<#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||||
|
<#assign removedCommissions = eventRP.removedUnloadCommissions />
|
||||||
|
<#else>
|
||||||
|
<#assign removedCommissions = eventRP.removedLoadCommissions />
|
||||||
|
</#if>
|
||||||
|
|
||||||
"physical_receipt_list": [
|
"physical_receipt_list": [
|
||||||
<#list eventRP.removedCommissions as removedCommission>
|
<#list removedCommissions?filter(l -> l.ExecutionflowID??) as removedCommission>
|
||||||
{
|
{
|
||||||
"receipt_activity": "${executionflowCustomFields[removedCommission.ExecutionflowID].activity_code?json_string}",
|
"receipt_activity": "${executionflowCustomFields[removedCommission.ExecutionflowID].activity_code?json_string}",
|
||||||
"originator_code": "${executionflowCustomFields[removedCommission.ExecutionflowID].originator_code?json_string}",
|
"originator_code": "${executionflowCustomFields[removedCommission.ExecutionflowID].originator_code?json_string}",
|
||||||
|
|||||||
@@ -9,8 +9,14 @@
|
|||||||
"payload" :
|
"payload" :
|
||||||
{
|
{
|
||||||
<#assign executionflowCustomFields = eventRP.executionflowCustomFields >
|
<#assign executionflowCustomFields = eventRP.executionflowCustomFields >
|
||||||
|
<#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||||
|
<#assign removedCommissions = eventRP.removedUnloadCommissions />
|
||||||
|
<#else>
|
||||||
|
<#assign removedCommissions = eventRP.removedLoadCommissions />
|
||||||
|
</#if>
|
||||||
|
|
||||||
"physical_receipt_list": [
|
"physical_receipt_list": [
|
||||||
<#list eventRP.removedCommissions as removedCommission>
|
<#list removedCommissions?filter(l -> l.ExecutionflowID??) as removedCommission>
|
||||||
{
|
{
|
||||||
"receipt_activity": "${executionflowCustomFields[removedCommission.ExecutionflowID].activity_code?json_string}",
|
"receipt_activity": "${executionflowCustomFields[removedCommission.ExecutionflowID].activity_code?json_string}",
|
||||||
"originator_code": "${executionflowCustomFields[removedCommission.ExecutionflowID].originator_code?json_string}",
|
"originator_code": "${executionflowCustomFields[removedCommission.ExecutionflowID].originator_code?json_string}",
|
||||||
|
|||||||
@@ -9,10 +9,10 @@
|
|||||||
},
|
},
|
||||||
"payload" :
|
"payload" :
|
||||||
{
|
{
|
||||||
"unloading_appointment" : "${eventRP.appointmentCustomFields.unloading?json_string}",
|
"unloading_appointment" : "${eventRP.appointmentCustomFields.unloading!"false"?json_string}",
|
||||||
"load_appointment" : "${eventRP.appointmentCustomFields.loading?json_string}",
|
"load_appointment" : "${eventRP.appointmentCustomFields.loading!"false"?json_string}",
|
||||||
<#switch appointment.AppointmentType>
|
<#switch appointment.AppointmentType>
|
||||||
<#case "APPOINTMENT_TYPE_LOADING">
|
<#case AppointmentType.APPOINTMENT_TYPE_LOADING>
|
||||||
<#if appointment.TimeZone?? && appointment.TimeZone!="">
|
<#if appointment.TimeZone?? && appointment.TimeZone!="">
|
||||||
"planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}",
|
"planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}",
|
||||||
"planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}",
|
"planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}",
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
"planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}",
|
"planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}",
|
||||||
</#if>
|
</#if>
|
||||||
<#break>
|
<#break>
|
||||||
<#case "APPOINTMENT_TYPE_UNLOADING">
|
<#case AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||||
<#if appointment.TimeZone?? && appointment.TimeZone!="">
|
<#if appointment.TimeZone?? && appointment.TimeZone!="">
|
||||||
"planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}",
|
"planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}",
|
||||||
"planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}",
|
"planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}",
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
"payload" :
|
"payload" :
|
||||||
{
|
{
|
||||||
<#switch appointment.AppointmentType>
|
<#switch appointment.AppointmentType>
|
||||||
<#case "APPOINTMENT_TYPE_LOADING">
|
<#case AppointmentType.APPOINTMENT_TYPE_LOADING>
|
||||||
"unloading_appointment" : "false",
|
"unloading_appointment" : "false",
|
||||||
"load_appointment" : "true",
|
"load_appointment" : "true",
|
||||||
<#if appointment.TimeZone?? && appointment.TimeZone!="">
|
<#if appointment.TimeZone?? && appointment.TimeZone!="">
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
"planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}",
|
"planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}",
|
||||||
</#if>
|
</#if>
|
||||||
<#break>
|
<#break>
|
||||||
<#case "APPOINTMENT_TYPE_UNLOADING">
|
<#case AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||||
"unloading_appointment" : "true",
|
"unloading_appointment" : "true",
|
||||||
"load_appointment" : "false",
|
"load_appointment" : "false",
|
||||||
<#if appointment.TimeZone?? && appointment.TimeZone!="">
|
<#if appointment.TimeZone?? && appointment.TimeZone!="">
|
||||||
|
|||||||
@@ -10,10 +10,10 @@
|
|||||||
"payload" :
|
"payload" :
|
||||||
{
|
{
|
||||||
<#include "RPtoRFX_CarrierAppointmentDataUpdated.ftl">
|
<#include "RPtoRFX_CarrierAppointmentDataUpdated.ftl">
|
||||||
"unloading_appointment" : "${eventRP.appointmentCustomFields.unloading?json_string}",
|
"unloading_appointment" : "${eventRP.appointmentCustomFields.unloading!"false"?json_string}",
|
||||||
"load_appointment" : "${eventRP.appointmentCustomFields.loading?json_string}",
|
"load_appointment" : "${eventRP.appointmentCustomFields.loading!"false"?json_string}",
|
||||||
<#switch appointment.AppointmentType>
|
<#switch appointment.AppointmentType>
|
||||||
<#case "APPOINTMENT_TYPE_LOADING">
|
<#case AppointmentType.APPOINTMENT_TYPE_LOADING>
|
||||||
<#if appointment.TimeZone?? && appointment.TimeZone!="">
|
<#if appointment.TimeZone?? && appointment.TimeZone!="">
|
||||||
"planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}",
|
"planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}",
|
||||||
"planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}",
|
"planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}",
|
||||||
@@ -21,9 +21,9 @@
|
|||||||
"planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,time_zone_rfx),time_zone_rfx)}",
|
"planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,time_zone_rfx),time_zone_rfx)}",
|
||||||
"planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}",
|
"planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}",
|
||||||
</#if>
|
</#if>
|
||||||
<#break>
|
<#break>
|
||||||
<#case "APPOINTMENT_TYPE_UNLOADING">
|
<#case AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||||
<#if appointment.TimeZone?? && appointment.TimeZone!="">
|
<#if appointment.TimeZone?? && appointment.TimeZone!="">
|
||||||
"planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}",
|
"planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}",
|
||||||
"planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}",
|
"planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}",
|
||||||
<#else>
|
<#else>
|
||||||
|
|||||||
@@ -10,8 +10,8 @@
|
|||||||
{
|
{
|
||||||
<#include "RPtoRFX_CarrierAppointmentDataUpdated.ftl">
|
<#include "RPtoRFX_CarrierAppointmentDataUpdated.ftl">
|
||||||
<#switch appointment.AppointmentType>
|
<#switch appointment.AppointmentType>
|
||||||
<#case "APPOINTMENT_TYPE_LOADING">
|
<#case AppointmentType.APPOINTMENT_TYPE_LOADING>
|
||||||
"unloading_appointment" : "false",
|
"unloading_appointment" : "false",
|
||||||
"load_appointment" : "true",
|
"load_appointment" : "true",
|
||||||
<#if appointment.TimeZone?? && appointment.TimeZone!="">
|
<#if appointment.TimeZone?? && appointment.TimeZone!="">
|
||||||
"planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}",
|
"planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}",
|
||||||
@@ -21,8 +21,8 @@
|
|||||||
"planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}",
|
"planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}",
|
||||||
</#if>
|
</#if>
|
||||||
<#break>
|
<#break>
|
||||||
<#case "APPOINTMENT_TYPE_UNLOADING">
|
<#case AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||||
"unloading_appointment" : "true",
|
"unloading_appointment" : "true",
|
||||||
"load_appointment" : "false",
|
"load_appointment" : "false",
|
||||||
<#if appointment.TimeZone?? && appointment.TimeZone!="">
|
<#if appointment.TimeZone?? && appointment.TimeZone!="">
|
||||||
"planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}",
|
"planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}",
|
||||||
|
|||||||
Reference in New Issue
Block a user