You've already forked reflex-wms-connector
Merge branch 'release/2.0' into 'main-2.0'
release/2.0 into main-2.0 See merge request r-d-technique/tiers/reflex-wms-connector!263
This commit is contained in:
11
InternalSettings.ftl
Normal file
11
InternalSettings.ftl
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
<#-- --------------------------------------------------------------------------------------- -->
|
||||||
|
<#-- DeleteEF est un paramètre qui permet de déterminer si l’exécution logistique doit être supprimée lors de la création d’une commande.-->
|
||||||
|
<#-- Attention : si vous choisissez de la supprimer, toutes les métadonnées associées à cette exécution logistique seront également supprimées. -->
|
||||||
|
<#-- Si DeleteEF_False = true, nous ne supprimons pas l'exécution logistique, Si DeleteEF_False = false, nous supprimons l'exécution logistique.-->
|
||||||
|
<#-- --------------------------------------------------------------------------------------- -->
|
||||||
|
<#-- DeleteEF is a parameter used to determine whether the logistics execution should be deleted when creating an order.-->
|
||||||
|
<#-- Warning: if deletion is selected, all metadata related to the logistics execution will also be removed. -->
|
||||||
|
<#-- If DeleteEF_False = true, we do not delete the logistics execution. If DeleteEF_False = false, we delete the logistics execution. -->
|
||||||
|
<#-- --------------------------------------------------------------------------------------- -->
|
||||||
|
<#assign DeleteEF_False = true>
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
"ExecutionflowID": "${reflexMvtStockInterface.original_receipt_physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.origin_order_line_reference?trim?json_string}",
|
"ExecutionflowID": "${reflexMvtStockInterface.original_receipt_physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.origin_order_line_reference?trim?json_string}",
|
||||||
"OrderID": "${reflexMvtStockInterface.origin_order_line_reference?trim?json_string}",
|
"OrderID": "${reflexMvtStockInterface.origin_order_line_reference?trim?json_string}",
|
||||||
<#else>
|
<#else>
|
||||||
<#if reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!="">
|
<#if reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!="" && !reflexMvtStockInterface.receipt_reference?starts_with(reflexMvtStockInterface.original_receipt_physical_depot_code + reflexMvtStockInterface.activity_code + reflexMvtStockInterface.receipt_year_number)>
|
||||||
"ExecutionflowID": "${reflexMvtStockInterface.original_receipt_physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_reference?trim?json_string}",
|
"ExecutionflowID": "${reflexMvtStockInterface.original_receipt_physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_reference?trim?json_string}",
|
||||||
"OrderID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}",
|
"OrderID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}",
|
||||||
<#else>
|
<#else>
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|
||||||
|
|||||||
50
RFXtoRP_HsrAntRec.ftl
Normal file
50
RFXtoRP_HsrAntRec.ftl
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
<#-- **** input parameters ***** -->
|
||||||
|
<#-- input : message HARDIS WMS -->
|
||||||
|
<#-- project : projectId in HARDIS SC NETWORK -->
|
||||||
|
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
||||||
|
|
||||||
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
|
<#assign projectRP = project>
|
||||||
|
<#assign organisationRP = organisation>
|
||||||
|
|
||||||
|
<#assign aDateTime = .now>
|
||||||
|
|
||||||
|
<#switch cloudEventMsg.action>
|
||||||
|
<#case "C">
|
||||||
|
<#-- *********************************************** Action = CREATE ******************** -->
|
||||||
|
|
||||||
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
|
<#assign ancReceipt = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
[
|
||||||
|
{
|
||||||
|
<#stop >
|
||||||
|
}
|
||||||
|
]
|
||||||
|
<#break>
|
||||||
|
<#case "U">
|
||||||
|
<#-- *********************************************** Action = UPDATE ******************** -->
|
||||||
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
|
<#assign ancReceipt = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
[
|
||||||
|
{
|
||||||
|
<#stop >
|
||||||
|
}
|
||||||
|
]
|
||||||
|
<#break>
|
||||||
|
|
||||||
|
<#case "D">
|
||||||
|
<#-- *********************************************** Action = DELETE ******************** -->
|
||||||
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
|
<#assign ancReceipt = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
[
|
||||||
|
{
|
||||||
|
<#stop >
|
||||||
|
}
|
||||||
|
]
|
||||||
|
<#break>
|
||||||
|
|
||||||
|
|
||||||
|
<#default>
|
||||||
|
<#stop >
|
||||||
|
</#switch>
|
||||||
|
|
||||||
@@ -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,15 +21,49 @@
|
|||||||
<#-- *********************************************** 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 ********************-->
|
||||||
|
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
<#assign ID = "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}" />
|
||||||
|
<#else>
|
||||||
|
<#assign ID = "${carrier_apt.year_number}-${carrier_apt.appointment_number}" />
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
<#assign ID = "${carrier_apt.appointment_reference?json_string}" />
|
||||||
|
<#else>
|
||||||
|
<#assign ID = "${carrier_apt.year_number}-${carrier_apt.appointment_number}" />
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
<#assign payload = '{"Header": {"ProjectID": "${projectRP}:${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"},"IDs": [{"RefID": "${ID}"}],"Options": {"Only": ["ID.RefID","Payload.WMSCreated"]}}'/>
|
||||||
|
<#assign queryApiReflexPlatformID = QueryApiReflexPlatformID.AppointmentGetByIds>
|
||||||
|
<#assign response = QueryApiReflexPlatformCall.call(queryApiReflexPlatformID,payload) />
|
||||||
|
<#assign appointmentRP = JsonUtil.jsonToMap(response)>
|
||||||
|
|
||||||
|
<#if !appointmentRP?? || !appointmentRP.Objects?? || !appointmentRP.Objects[0]?? || !appointmentRP.Objects[0].ID.RefID?? || !appointmentRP.Objects[0].Payload?? || !appointmentRP.Objects[0].Payload.WMSCreated?? || !appointmentRP.Objects[0].Payload.WMSCreated>
|
||||||
|
[
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.BookingForceBookAppointment>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl">
|
||||||
|
}
|
||||||
|
]
|
||||||
|
<#else>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCustomFieldsUpdated>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCustomFieldsUpdated>
|
||||||
@@ -41,10 +76,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.BookingCancelAppointment>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl">
|
<#include "RFXtoRP_HsrCarrierApt_BookingCancelAppointment.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#else>
|
<#else>
|
||||||
@@ -85,6 +120,12 @@
|
|||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrCarrierApt_LoadingStarted.ftl">
|
<#include "RFXtoRP_HsrCarrierApt_LoadingStarted.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierExpected>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrCarrierApt_CarrierExpected.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#else>
|
<#else>
|
||||||
@@ -110,12 +151,12 @@
|
|||||||
<#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>
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
@@ -124,16 +165,17 @@
|
|||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
]
|
]
|
||||||
|
</#if>
|
||||||
<#break>
|
<#break>
|
||||||
<#case "D">
|
<#case "D">
|
||||||
<#-- *********************************************** Action = Delete ******************** -->
|
<#-- *********************************************** Action = Delete ******************** -->
|
||||||
[
|
[
|
||||||
|
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.SiteCancelAppointment>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.BookingCancelAppointment>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl">
|
<#include "RFXtoRP_HsrCarrierApt_BookingCancelAppointment.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,8 +50,8 @@
|
|||||||
{
|
{
|
||||||
"Key": "unloading",
|
"Key": "unloading",
|
||||||
"Value": "${carrier_apt.unloading_appointment?json_string}"
|
"Value": "${carrier_apt.unloading_appointment?json_string}"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"Payload":{
|
"Payload":{
|
||||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
||||||
|
|||||||
@@ -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-->
|
||||||
<#-- "MetaData": [
|
<#-- "MetaData": [
|
||||||
{
|
{
|
||||||
|
|||||||
58
RFXtoRP_HsrCarrierApt_BookingCancelAppointment.ftl
Normal file
58
RFXtoRP_HsrCarrierApt_BookingCancelAppointment.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)}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
180
RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl
Normal file
180
RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl
Normal file
@@ -0,0 +1,180 @@
|
|||||||
|
[
|
||||||
|
<#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" >
|
||||||
|
</#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>
|
||||||
|
<#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}",
|
||||||
|
<#else>
|
||||||
|
"OrderID": "R${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>
|
||||||
|
"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>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -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,34 +52,105 @@
|
|||||||
"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" >
|
||||||
<#else>
|
</#if>
|
||||||
"OrderID": "R${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>
|
|
||||||
"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}",
|
|
||||||
<#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}",
|
||||||
|
<#else>
|
||||||
|
"OrderID": "R${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>
|
||||||
|
"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}"
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
"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>
|
||||||
@@ -126,9 +165,9 @@
|
|||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
"Slots": [{
|
"Slot": {
|
||||||
<#-- 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" >
|
||||||
@@ -151,6 +190,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.creation_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": [
|
|
||||||
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
@@ -24,12 +24,6 @@
|
|||||||
"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 -->
|
||||||
|
|||||||
@@ -1,44 +0,0 @@
|
|||||||
<#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}"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
|
|
||||||
"RefID": "${preparation_order.physical_depot_code?trim?json_string}${preparation_order.activity_code?trim?json_string}${preparation_order.originator_code?trim?json_string}${preparation_order.originator_reference?trim?json_string}"
|
|
||||||
<#else>
|
|
||||||
"RefID": "O${preparation_order.physical_depot_code?trim?json_string}${preparation_order.activity_code?trim?json_string}${preparation_order.originator_code?trim?json_string}${preparation_order.preparation_order_year}${preparation_order.preparation_order_number}"
|
|
||||||
</#if>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -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": [ ]
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
||||||
<#if receipt.receipt_type?? && receipt.receipt_type = "030" && receipt.line_list??> <#-- if reception is a transfer type -->
|
<#if receipt.receipt_type?? && receipt.receipt_type = "030" && receipt.line_list?? && receipt.line_list[0]?? > <#-- if reception is a transfer type -->
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||||
@@ -29,16 +29,10 @@
|
|||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrReceiptList_TransfertReceiptExpected.ftl">
|
<#include "RFXtoRP_HsrReceiptList_TransfertReceiptExpected.ftl">
|
||||||
},
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCustomFieldsUpdated>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrReceiptList_TransfertCustomFieldsUpdated.ftl">
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#else>
|
<#else>
|
||||||
<#if receipt.line_list ??>
|
<#if receipt.line_list ?? && receipt.line_list[0]??>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||||
@@ -52,12 +46,6 @@
|
|||||||
"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>
|
||||||
@@ -79,12 +67,40 @@
|
|||||||
}
|
}
|
||||||
<#else>
|
<#else>
|
||||||
<#if receipt.receipt_type?? && receipt.receipt_type == "030" && receipt.receipt_confirmed == "true">
|
<#if receipt.receipt_type?? && receipt.receipt_type == "030" && receipt.receipt_confirmed == "true">
|
||||||
{
|
<#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="" && receipt.receipt_reference?? && receipt.receipt_reference!="">
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted>
|
<#assign ID = "${receipt.origin_order_line_depot?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}"/>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
<#else>
|
||||||
"datas" :
|
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
||||||
<#include "RFXtoRP_HsrReceiptList_TransfertExecutionflowReceiptCompleted.ftl">
|
<#assign ID = "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}"/>
|
||||||
}
|
<#else>
|
||||||
|
<#assign ID = "R${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>
|
||||||
|
</#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>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrReceiptList_TransfertExecutionflowReceiptCompleted.ftl">
|
||||||
|
}
|
||||||
|
<#else>
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrReceiptList_TransfertExecutionflowReceiptCompleted.ftl">
|
||||||
|
}
|
||||||
|
</#if>
|
||||||
<#else>
|
<#else>
|
||||||
<#if receipt.receipt_confirmed?? && receipt.receipt_confirmed == "true" && receipt.confirmation_total_level_1==0 && receipt.confirmation_total_level_2==0 && receipt.confirmation_total_level_3==0>
|
<#if receipt.receipt_confirmed?? && receipt.receipt_confirmed == "true" && receipt.confirmation_total_level_1==0 && receipt.confirmation_total_level_2==0 && receipt.confirmation_total_level_3==0>
|
||||||
{
|
{
|
||||||
@@ -95,14 +111,34 @@
|
|||||||
}
|
}
|
||||||
<#else>
|
<#else>
|
||||||
<#if receipt.receipt_confirmed ?? && receipt.receipt_confirmed == "true" >
|
<#if receipt.receipt_confirmed ?? && receipt.receipt_confirmed == "true" >
|
||||||
{
|
<#assign ID = "R${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}"/>
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted>
|
<#assign payload = '{"Header": {"ProjectID": "${projectRP!""}"},"IDs": [{"RefID": "${ID}"}]}'/>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
<#assign queryApiReflexPlatformID = QueryApiReflexPlatformID.OrderGetByIds>
|
||||||
"datas" :
|
<#assign response = QueryApiReflexPlatformCall.call(queryApiReflexPlatformID,payload) />
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl">
|
<#assign orderRP = JsonUtil.jsonToMap(response)>
|
||||||
}
|
<#if orderRP?? && orderRP.Objects?? && orderRP.Objects[0]?? && orderRP.Objects[0].ID.RefID?? >
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#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?? && receipt.receipt_type == "030" && receipt.receipt_confirmed == "false" && receipt.line_list??>
|
<#if receipt.receipt_type?? && receipt.receipt_type == "030" && receipt.receipt_confirmed == "false" && receipt.line_list?? && receipt.line_list[0]??>
|
||||||
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@@ -110,21 +146,19 @@
|
|||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl">
|
<#include "RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl">
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrReceiptList_TransfertReceiptExpected.ftl">
|
<#include "RFXtoRP_HsrReceiptList_TransfertReceiptExpected.ftl">
|
||||||
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#else>
|
<#else>
|
||||||
<#stop> <#-- Receipt reference for transfer is empty-->
|
<#stop> <#-- Receipt reference for transfer is empty-->
|
||||||
</#if>
|
</#if>
|
||||||
<#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}",
|
||||||
|
|||||||
@@ -1,40 +0,0 @@
|
|||||||
<#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}"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"RefID": "R${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}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"Payload" :{},
|
|
||||||
"ID":{
|
|
||||||
"CustomFields": [
|
|
||||||
{
|
|
||||||
"Key": "depot_code",
|
|
||||||
<#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="">
|
|
||||||
"Value": "${receipt.origin_order_line_depot?trim?json_string}"
|
|
||||||
<#else>
|
|
||||||
"Value": "${receipt.physical_depot_code?trim?json_string}"
|
|
||||||
</#if>
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"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.origin_order_line_depot?? && receipt.origin_order_line_depot!="">
|
|
||||||
"RefID": "${receipt.origin_order_line_depot?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}"
|
|
||||||
<#else>
|
|
||||||
"RefID": "R${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>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -7,11 +7,15 @@
|
|||||||
{
|
{
|
||||||
"Header": {"ProjectID": "${projectRP}"},
|
"Header": {"ProjectID": "${projectRP}"},
|
||||||
"ID": {
|
"ID": {
|
||||||
<#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="">
|
<#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="" && receipt.receipt_reference?? && receipt.receipt_reference!="">
|
||||||
"RefID": "${receipt.origin_order_line_depot?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}",
|
"RefID": "${receipt.origin_order_line_depot?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}",
|
||||||
<#else>
|
<#else>
|
||||||
"RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}",
|
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
||||||
</#if>
|
"RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "R${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>
|
||||||
|
</#if>
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${receipt_status_datetime}",
|
"DateTime": "${receipt_status_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
|||||||
@@ -39,10 +39,14 @@
|
|||||||
"Value": "${receipt.receipt_number}"
|
"Value": "${receipt.receipt_number}"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
<#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="">
|
<#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="" && receipt.receipt_reference?? && receipt.receipt_reference!="">
|
||||||
"RefID": "${receipt.origin_order_line_depot?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}",
|
"RefID": "${receipt.origin_order_line_depot?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}",
|
||||||
<#else>
|
<#else>
|
||||||
"RefID": "R${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 receipt.receipt_reference?? && receipt.receipt_reference!="">
|
||||||
|
"RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "R${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>
|
||||||
</#if>
|
</#if>
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${receipt_creation_datetime}",
|
"DateTime": "${receipt_creation_datetime}",
|
||||||
@@ -54,11 +58,11 @@
|
|||||||
"DateTime": "${receipt_creation_datetime}",
|
"DateTime": "${receipt_creation_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
},
|
},
|
||||||
<#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="">
|
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
||||||
"OrderID": "${receipt.receipt_reference?trim?json_string}",
|
"OrderID": "${receipt.receipt_reference?trim?json_string}",
|
||||||
<#else>
|
<#else>
|
||||||
"OrderID": "R${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}",
|
"OrderID": "R${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>
|
</#if>
|
||||||
<#-- Header Metadata inclusion -->
|
<#-- Header Metadata inclusion -->
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl">,
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl">,
|
||||||
"ShipFrom":
|
"ShipFrom":
|
||||||
@@ -233,7 +237,7 @@
|
|||||||
"DateTime": "${receipt_creation_datetime}",
|
"DateTime": "${receipt_creation_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
},
|
},
|
||||||
"OrderID":"${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year?trim?json_string}${receipt.receipt_number?trim?json_string}",
|
"OrderID":"R${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year?trim?json_string}${receipt.receipt_number?trim?json_string}",
|
||||||
<#-- Header Metadata inclusion -->
|
<#-- Header Metadata inclusion -->
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl">,
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl">,
|
||||||
"ShipFrom":
|
"ShipFrom":
|
||||||
|
|||||||
@@ -7,11 +7,15 @@
|
|||||||
{
|
{
|
||||||
"Header": {"ProjectID": "${projectRP}"},
|
"Header": {"ProjectID": "${projectRP}"},
|
||||||
"ID": {
|
"ID": {
|
||||||
<#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="">
|
<#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="" && receipt.receipt_reference?? && receipt.receipt_reference!="">
|
||||||
"RefID": "${receipt.origin_order_line_depot?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}",
|
"RefID": "${receipt.origin_order_line_depot?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}",
|
||||||
<#else>
|
<#else>
|
||||||
"RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}",
|
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
||||||
</#if>
|
"RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "R${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>
|
||||||
|
</#if>
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${receipt_status_datetime}",
|
"DateTime": "${receipt_status_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
|||||||
@@ -7,11 +7,15 @@
|
|||||||
{
|
{
|
||||||
"Header": {"ProjectID": "${projectRP}"},
|
"Header": {"ProjectID": "${projectRP}"},
|
||||||
"ID": {
|
"ID": {
|
||||||
<#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="">
|
<#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="" && receipt.receipt_reference?? && receipt.receipt_reference!="">
|
||||||
"RefID": "${receipt.origin_order_line_depot?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}",
|
"RefID": "${receipt.origin_order_line_depot?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}",
|
||||||
<#else>
|
<#else>
|
||||||
"RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}",
|
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
||||||
</#if>
|
"RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "R${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>
|
||||||
|
</#if>
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${receipt_status_datetime}",
|
"DateTime": "${receipt_status_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
|||||||
@@ -8,11 +8,20 @@
|
|||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
<#assign organisationRP = organisation>
|
<#assign organisationRP = organisation>
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
|
|
||||||
|
=======
|
||||||
|
>>>>>>> develop
|
||||||
<#assign aDateTime = .now>
|
<#assign aDateTime = .now>
|
||||||
<#assign no_apiRestReflexID = "no apiRestReflexID">
|
<#assign no_apiRestReflexID = "no apiRestReflexID">
|
||||||
<#assign no_status = -99999>
|
<#assign no_status = -99999>
|
||||||
<#assign event = "UNKNOW_EVENT" >
|
<#assign event = "UNKNOW_EVENT" >
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
<#-- DeleteEF_False a définir dans ce fichier -->
|
||||||
|
<#-- DeleteEF_False to be defined in this file.-->
|
||||||
|
<#include "InternalSettings.ftl">
|
||||||
|
>>>>>>> develop
|
||||||
|
|
||||||
<#switch id.apiRestReflexID!no_apiRestReflexID>
|
<#switch id.apiRestReflexID!no_apiRestReflexID>
|
||||||
<#case no_apiRestReflexID>
|
<#case no_apiRestReflexID>
|
||||||
@@ -59,6 +68,7 @@
|
|||||||
<#case 201>
|
<#case 201>
|
||||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||||
<#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)>
|
<#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)>
|
||||||
|
<<<<<<< HEAD
|
||||||
<#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" >
|
<#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" >
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@@ -70,6 +80,10 @@
|
|||||||
]
|
]
|
||||||
<#else>
|
<#else>
|
||||||
<#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "WARN">
|
<#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "WARN">
|
||||||
|
=======
|
||||||
|
<#if preparationOrderPostResponse.status?? && (preparationOrderPostResponse.status == "SUCCESS" || preparationOrderPostResponse.status == "WARN") >
|
||||||
|
<#if DeleteEF_False>
|
||||||
|
>>>>>>> develop
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipFromAcked>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipFromAcked>
|
||||||
@@ -81,6 +95,7 @@
|
|||||||
<#else>
|
<#else>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
|
<<<<<<< HEAD
|
||||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
@@ -96,6 +111,32 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
</#if>
|
</#if>
|
||||||
|
=======
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDeleted>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_ExecutionflowDeleted.ftl">
|
||||||
|
}
|
||||||
|
]
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
[
|
||||||
|
{
|
||||||
|
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#assign event = "RP_EXECUTIONFLOW_EVENT">
|
||||||
|
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
||||||
|
}
|
||||||
|
]
|
||||||
|
>>>>>>> develop
|
||||||
</#if>
|
</#if>
|
||||||
<#break>
|
<#break>
|
||||||
<#default>
|
<#default>
|
||||||
@@ -154,9 +195,9 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDeleted>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDeleted>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_Receipt_ExecutionflowDeleted.ftl">
|
<#include "RFXtoRP_ExecutionflowDeleted.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#else>
|
<#else>
|
||||||
|
|||||||
@@ -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 = Canceled ******************** -->
|
<#-- *********************************************** Action = Canceled ******************** -->
|
||||||
<#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,29 +35,31 @@
|
|||||||
<#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?? && appointment.Unloading.Projects[0]?? &&
|
||||||
<#if appointment.Commissions[0].OrderID?? && appointment.Commissions[0].OrderID!="">
|
appointment.Unloading.Projects[0].Commissions?? &&
|
||||||
"physical_receipt_list": [
|
appointment.Unloading.Projects[0].Commissions[0]?? && appointment.Unloading.Projects[0].Commissions[0].ExecutionflowID?? && appointment.Unloading.Projects[0].Commissions[0].ExecutionflowID!="" >
|
||||||
<#list eventRP.executionflowCustomFields.entrySet()?filter(l ->l.value?? && l.value?has_content) as custom>
|
"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 appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_LOADING>
|
||||||
|
"appointment_designation":"${(appointment.Reason!"")?json_string}",
|
||||||
</#if>
|
</#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)}",
|
||||||
@@ -22,7 +22,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)}",
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
{
|
{
|
||||||
<#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!="">
|
||||||
@@ -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>
|
||||||
"unloading_appointment" : "true",
|
"unloading_appointment" : "true",
|
||||||
"load_appointment" : "false",
|
"load_appointment" : "false",
|
||||||
<#if appointment.TimeZone?? && appointment.TimeZone!="">
|
<#if appointment.TimeZone?? && appointment.TimeZone!="">
|
||||||
|
|||||||
@@ -29,9 +29,9 @@
|
|||||||
[
|
[
|
||||||
<#if eventRP.partnerAppRole == "ShipFrom" && executionflow.ShipFrom.ActorID != "" && executionflow.ShipFrom.Actor.IsShipFromConnected?? && executionflow.ShipFrom.Actor.IsShipFromConnected>
|
<#if eventRP.partnerAppRole == "ShipFrom" && executionflow.ShipFrom.ActorID != "" && executionflow.ShipFrom.Actor.IsShipFromConnected?? && executionflow.ShipFrom.Actor.IsShipFromConnected>
|
||||||
{
|
{
|
||||||
<#assign apiRestReflexID = ApiRestReflexID.preparation_orders_post>
|
<#assign apiRestReflexID = ApiRestReflexID.preparation_orders_post>
|
||||||
"apiRestReflexID" : "${apiRestReflexID}",
|
"apiRestReflexID" : "${apiRestReflexID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RPtoRFX_PrepOrder.ftl">
|
<#include "RPtoRFX_PrepOrder.ftl">
|
||||||
}
|
}
|
||||||
</#if>
|
</#if>
|
||||||
|
|||||||
Reference in New Issue
Block a user