You've already forked reflex-wms-connector
Compare commits
124 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ac18299345 | |||
| 148d0daffd | |||
| 4e5070a902 | |||
| 2b25c4853d | |||
| 844ecb1558 | |||
| 837b8f86ed | |||
| 4e7d98144d | |||
| 3a061c2374 | |||
| ce7104ee9f | |||
| 846641ac35 | |||
| 50771c3268 | |||
| 7deb33a7e0 | |||
| d8c87881f5 | |||
| c9070dd01e | |||
| 3915c83146 | |||
| bf3f30190d | |||
| c67ca71693 | |||
| 17263f024f | |||
| e8afce8ef0 | |||
| e03a017118 | |||
| 2bfb866dcc | |||
| 68f99e1435 | |||
| 13fe55ae1a | |||
| 4f0874a7dc | |||
| 62984a07f4 | |||
| 2008f01f6f | |||
| a37d43f50f | |||
| 10fa7309fa | |||
| 8a810c8a14 | |||
| 8e1d0e3a17 | |||
| e12c6e64e4 | |||
| eaaa9bbea5 | |||
| 6c0deafd93 | |||
| 62cdd584d3 | |||
| 97f93a1f26 | |||
| ee7e5bb8c9 | |||
| 4e3162556c | |||
| 20437cace5 | |||
| 93effa78ff | |||
| 085f0ae4f8 | |||
| 3d585203ef | |||
| 57576b1ac0 | |||
| 83260c7ac5 | |||
| 8ebaa8e15a | |||
| f602f74da1 | |||
| 37495ca141 | |||
| 217a2680de | |||
| 6fd708cf58 | |||
| e5482ad09c | |||
| 33ea0af1b9 | |||
| f7394986c2 | |||
| 6ae3af7139 | |||
| c89c74d2e2 | |||
| d02e6feead | |||
| 6ce6ac0b8d | |||
| 647e2d45af | |||
| f26dda887a | |||
| 9dd59d75f3 | |||
| 48be4322cb | |||
| 07a50a71d9 | |||
| af0dd3fc66 | |||
| a8c85b40b4 | |||
| 88550b45ac | |||
| e0f46af99e | |||
| 81c6dec4f2 | |||
| 64fc9f3e15 | |||
| 5dd16bf4b5 | |||
| a43e59f7cb | |||
| eea2a41313 | |||
| 89b7ce149b | |||
| e673f7c134 | |||
| 8898467d7c | |||
| cd9db2ddb0 | |||
| 7844fdd015 | |||
| 2a908a85d7 | |||
| 8d806117fa | |||
| 84d0f73281 | |||
| 70ec04c65a | |||
| 4784cc2bc1 | |||
| ac5219b94a | |||
| 127a662057 | |||
| da53dc05fc | |||
| 4823bc6fed | |||
| b1577d1791 | |||
| 1352a36a21 | |||
| 57113f4c51 | |||
| 1de2a47dae | |||
| 02de559235 | |||
| b1527f9e7e | |||
| 7bb190e4f5 | |||
| c561f9674b | |||
| d2b5eeafdf | |||
| d1c3bb9d16 | |||
| dca0fa7fe4 | |||
| c3364d77a2 | |||
| e24e537650 | |||
| 71bd4918a9 | |||
| 8974632c22 | |||
| cb59aa28b5 | |||
| 95f07b1ae0 | |||
| 650990b045 | |||
| 5b316bb395 | |||
| 24d7ad81bd | |||
| 456b304879 | |||
| 1772ed970b | |||
| 8d4eb4ec4c | |||
| 04a72fcda4 | |||
| 264257fcd0 | |||
| 944f3a2da5 | |||
| 1c07a8dd77 | |||
| 0f4191012d | |||
| 27ea4f3795 | |||
| 5492139935 | |||
| c1ea6e46af | |||
| efeb0c0185 | |||
| 91467086c4 | |||
| b68855504a | |||
| 2d022ccf47 | |||
| 9b5eec0f7f | |||
| e12235319e | |||
| 289b8c3fc1 | |||
| c324773fad | |||
| 5552265833 | |||
| 8fe3dd364c |
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}",
|
||||
"OrderID": "${reflexMvtStockInterface.origin_order_line_reference?trim?json_string}",
|
||||
<#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}",
|
||||
"OrderID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}",
|
||||
<#else>
|
||||
|
||||
@@ -24,10 +24,15 @@
|
||||
<#include "RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl">
|
||||
|
||||
<#-- Item Photo URI could be added here -->
|
||||
<#if item.url?? && item.url!="">
|
||||
<#if item.saved_picture_path?? && item.saved_picture_path!="" && item.saved_picture_path?starts_with("http") == true>
|
||||
,
|
||||
"PhotoURI": "${item.saved_picture_path?json_string}"
|
||||
<#else>
|
||||
<#if item.url?? && item.url!="" && item.url?starts_with("http") == true>
|
||||
,
|
||||
"PhotoURI": "${item.url?json_string}"
|
||||
</#if>
|
||||
</#if>
|
||||
|
||||
<#-- Loop for the Logistical Variants - LV -->
|
||||
<#if item.logistical_variant_list?? && (item.logistical_variant_list?size == item.logistical_variant_list?filter(l ->l??)?size)>
|
||||
|
||||
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>
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
<#assign organisationRP = organisation>
|
||||
<#assign partnerApplicationRP = partnerApplication>
|
||||
|
||||
<#assign aDateTime = .now>
|
||||
|
||||
@@ -20,10 +21,16 @@
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.SiteForceBookAppointment>
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.BookingForceBookAppointment>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl">
|
||||
<#include "RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl">
|
||||
},
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierExpected>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrCarrierApt_CarrierExpected.ftl">
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
@@ -41,10 +48,10 @@
|
||||
<#if carrier_apt.status?? && (carrier_apt.status.status_code=="999" || carrier_apt.status.status_code=="040" || carrier_apt.status.status_code=="030")>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.SiteCancelAppointment>
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.BookingForceCancelAppointment>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl">
|
||||
<#include "RFXtoRP_HsrCarrierApt_BookingForceCancelAppointment.ftl">
|
||||
}
|
||||
]
|
||||
<#else>
|
||||
@@ -85,6 +92,12 @@
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrCarrierApt_LoadingStarted.ftl">
|
||||
},
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierExpected>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrCarrierApt_CarrierExpected.ftl">
|
||||
}
|
||||
]
|
||||
<#else>
|
||||
@@ -110,10 +123,10 @@
|
||||
<#else>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.SiteWMSUpdateAppointment>
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.BookingWMSUpdateAppointment>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl">
|
||||
<#include "RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl">
|
||||
}
|
||||
]
|
||||
</#if>
|
||||
@@ -130,10 +143,10 @@
|
||||
[
|
||||
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.SiteCancelAppointment>
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.BookingForceCancelAppointment>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl">
|
||||
<#include "RFXtoRP_HsrCarrierApt_BookingForceCancelAppointment.ftl">
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
|
||||
@@ -7,20 +7,20 @@
|
||||
"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}",
|
||||
"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}",
|
||||
"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}",
|
||||
"RefID": "${carrier_apt.appointment_reference?json_string}"
|
||||
<#else>
|
||||
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}"
|
||||
</#if>
|
||||
</#if>
|
||||
}
|
||||
},
|
||||
"Payload": {
|
||||
"ActorID": "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
||||
<#--To configure-->
|
||||
<#-- "CarrierInformation": [
|
||||
{
|
||||
|
||||
@@ -7,20 +7,20 @@
|
||||
"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}",
|
||||
"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}",
|
||||
"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}",
|
||||
"RefID": "${carrier_apt.appointment_reference?json_string}"
|
||||
<#else>
|
||||
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}"
|
||||
</#if>
|
||||
</#if>
|
||||
}
|
||||
},
|
||||
"Payload": {
|
||||
"ActorID": "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
||||
<#--To configure-->
|
||||
<#-- "MetaData": [
|
||||
{
|
||||
|
||||
192
RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl
Normal file
192
RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl
Normal file
@@ -0,0 +1,192 @@
|
||||
[
|
||||
<#assign creation_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) />
|
||||
{
|
||||
"Header":{
|
||||
"ProjectID": "${projectRP}:${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
||||
},
|
||||
"ID":{
|
||||
"RefDate": {
|
||||
"DateTime": "${creation_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
},
|
||||
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||
"RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||
<#else>
|
||||
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||
</#if>
|
||||
<#else>
|
||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||
"RefID": "${carrier_apt.appointment_reference?json_string}",
|
||||
<#else>
|
||||
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||
</#if>
|
||||
</#if>
|
||||
"CustomFields": [
|
||||
{
|
||||
"Key": "depot",
|
||||
"Value": "${carrier_apt.physical_depot?json_string}"
|
||||
},
|
||||
{
|
||||
"Key": "year",
|
||||
"Value": "${carrier_apt.year_number?json_string}"
|
||||
},
|
||||
{
|
||||
"Key": "number",
|
||||
"Value": "${carrier_apt.appointment_number?json_string}"
|
||||
},
|
||||
{
|
||||
"Key": "reference",
|
||||
"Value": "${carrier_apt.appointment_reference?json_string}"
|
||||
},
|
||||
{
|
||||
"Key": "carrier",
|
||||
"Value": "${carrier_apt.planned_carrier?json_string}"
|
||||
},
|
||||
{
|
||||
"Key": "loading",
|
||||
"Value": "${carrier_apt.load_appointment?json_string}"
|
||||
},
|
||||
{
|
||||
"Key": "unloading",
|
||||
"Value": "${carrier_apt.unloading_appointment?json_string}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Payload": {
|
||||
"TimeZone":"${time_zone_rfx}",
|
||||
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false">
|
||||
<#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") || carrier_apt.planned_unloading_end_datetime?starts_with("00") || carrier_apt.planned_unloading_end_datetime?contains("-00-")>
|
||||
<#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend is not initialized" >
|
||||
</#if>
|
||||
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||
<#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_unloading_end_datetime?datetime.iso) />
|
||||
<#if (duration < 0)>
|
||||
<#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" >
|
||||
<#else>
|
||||
<#if (duration == 0)>
|
||||
<#assign duration = 1 />
|
||||
</#if>
|
||||
</#if>
|
||||
<#else>
|
||||
<#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" >
|
||||
<#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-") || carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-")>
|
||||
<#stop "planned_load_start_datetime or planned_load_end_datetime field of appointmend is not initialized" >
|
||||
</#if>
|
||||
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_LOADING>
|
||||
<#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_load_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) />
|
||||
<#if (duration < 0)>
|
||||
<#stop "planned_load_start_datetime or planned_load_end_datetime field of appointmend are not valid" >
|
||||
<#else>
|
||||
<#if (duration == 0)>
|
||||
<#assign duration = 1 />
|
||||
</#if>
|
||||
</#if>
|
||||
<#else>
|
||||
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
||||
<#if carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-") || carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") >
|
||||
<#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend is not initialized" >
|
||||
</#if>
|
||||
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||
<#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) />
|
||||
<#if (duration < 0)>
|
||||
<#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend are not valid" >
|
||||
<#else>
|
||||
<#if (duration == 0)>
|
||||
<#assign duration = 1 />
|
||||
</#if>
|
||||
</#if>
|
||||
<#else>
|
||||
<#stop "Appointment type not supported" >
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
"AppointmentType": "${appointmentType}",
|
||||
"Emails": ["${carrier_apt.creation_user_email?json_string}"],
|
||||
|
||||
<#include "RFXtoRP_HsrCarrierApt_SegmentationSelections.ftl">,
|
||||
<#include "RFXtoRP_HsrCarrierApt_CarrierInformation.ftl">,
|
||||
<#include "RFXtoRP_HsrCarrierApt_MetadataAppointment.ftl">,
|
||||
<#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0)>
|
||||
"Unloading" :
|
||||
{
|
||||
"Projects" : [{
|
||||
"Commissions": [
|
||||
<#list carrier_apt.physical_receipt_list?filter(l ->l??) as physical_receipt>
|
||||
{
|
||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
||||
<#if physical_receipt.physical_receipt_reference?? && physical_receipt.physical_receipt_reference!="">
|
||||
"OrderID": "${physical_receipt.physical_receipt_reference?json_string}",
|
||||
<#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>
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
58
RFXtoRP_HsrCarrierApt_BookingForceCancelAppointment.ftl
Normal file
58
RFXtoRP_HsrCarrierApt_BookingForceCancelAppointment.ftl
Normal file
@@ -0,0 +1,58 @@
|
||||
<#assign update_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) />
|
||||
[
|
||||
{
|
||||
"ID":{
|
||||
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||
"RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||
<#else>
|
||||
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||
</#if>
|
||||
<#else>
|
||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||
"RefID": "${carrier_apt.appointment_reference?json_string}",
|
||||
<#else>
|
||||
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||
</#if>
|
||||
</#if>
|
||||
"RefDate": {
|
||||
"DateTime": "${update_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
},
|
||||
"CustomFields": [
|
||||
{
|
||||
"Key": "depot",
|
||||
"Value": "${carrier_apt.physical_depot?json_string}"
|
||||
},
|
||||
{
|
||||
"Key": "year",
|
||||
"Value": "${carrier_apt.year_number?json_string}"
|
||||
},
|
||||
{
|
||||
"Key": "number",
|
||||
"Value": "${carrier_apt.appointment_number?json_string}"
|
||||
},
|
||||
{
|
||||
"Key": "reference",
|
||||
"Value": "${carrier_apt.appointment_reference?json_string}"
|
||||
},
|
||||
{
|
||||
"Key": "carrier",
|
||||
"Value": "${carrier_apt.planned_carrier?json_string}"
|
||||
},
|
||||
{
|
||||
"Key": "loading",
|
||||
"Value": "${carrier_apt.load_appointment?json_string}"
|
||||
},
|
||||
{
|
||||
"Key": "unloading",
|
||||
"Value": "${carrier_apt.unloading_appointment?json_string}"
|
||||
}
|
||||
]
|
||||
|
||||
},
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}:${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -1,23 +1,60 @@
|
||||
[
|
||||
{
|
||||
<#assign update_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) />
|
||||
|
||||
"Header":{
|
||||
"ProjectID": "${projectRP}"
|
||||
"ProjectID": "${projectRP}:${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
||||
},
|
||||
"ID":{
|
||||
"RefDate": {
|
||||
"DateTime": "${update_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
},
|
||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
||||
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||
"AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||
"RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||
<#else>
|
||||
"AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||
</#if>
|
||||
<#else>
|
||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||
"AppointmentID": "${carrier_apt.appointment_reference?json_string}",
|
||||
"RefID": "${carrier_apt.appointment_reference?json_string}",
|
||||
<#else>
|
||||
"AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||
</#if>
|
||||
</#if>
|
||||
"TimeZone":"${time_zone_rfx}",
|
||||
"CustomFields": [
|
||||
{
|
||||
"Key": "depot",
|
||||
"Value": "${carrier_apt.physical_depot?json_string}"
|
||||
},
|
||||
{
|
||||
"Key": "year",
|
||||
"Value": "${carrier_apt.year_number?json_string}"
|
||||
},
|
||||
{
|
||||
"Key": "number",
|
||||
"Value": "${carrier_apt.appointment_number?json_string}"
|
||||
},
|
||||
{
|
||||
"Key": "reference",
|
||||
"Value": "${carrier_apt.appointment_reference?json_string}"
|
||||
},
|
||||
{
|
||||
"Key": "carrier",
|
||||
"Value": "${carrier_apt.planned_carrier?json_string}"
|
||||
},
|
||||
{
|
||||
"Key": "loading",
|
||||
"Value": "${carrier_apt.load_appointment?json_string}"
|
||||
},
|
||||
{
|
||||
"Key": "unloading",
|
||||
"Value": "${carrier_apt.unloading_appointment?json_string}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Payload": {
|
||||
<#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" >
|
||||
@@ -48,47 +85,16 @@
|
||||
<#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 />
|
||||
<#stop "Appointment type not supported" >
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
"AppointmentType": "${appointmentType}",
|
||||
"Emails": ["${carrier_apt.creation_user_email?json_string}"],
|
||||
"CustomFields": [
|
||||
"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" :
|
||||
{
|
||||
"Key": "depot",
|
||||
"Value": "${carrier_apt.physical_depot?json_string}"
|
||||
},
|
||||
"Projects" : [
|
||||
{
|
||||
"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}"
|
||||
}
|
||||
],
|
||||
<#include "RFXtoRP_HsrCarrierApt_SegmentationSelections.ftl">,
|
||||
<#include "RFXtoRP_HsrCarrierApt_CarrierInformation.ftl">,
|
||||
<#include "RFXtoRP_HsrCarrierApt_MetadataAppointment.ftl">,
|
||||
<#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0)>
|
||||
"Commissions": [
|
||||
<#list carrier_apt.physical_receipt_list?filter(l ->l??) as physical_receipt>
|
||||
{
|
||||
@@ -100,18 +106,51 @@
|
||||
</#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">
|
||||
"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}",
|
||||
<#include "RFXtoRP_HsrCarrierApt_Quantities.ftl">
|
||||
"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">
|
||||
"Reason": "UNLOADING AND LOADING / ${carrier_apt.appointment_designation?json_string}",
|
||||
<#else>
|
||||
@@ -126,7 +165,7 @@
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
"Slots": [{
|
||||
"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" >
|
||||
@@ -151,6 +190,7 @@
|
||||
</#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": [
|
||||
|
||||
]
|
||||
|
||||
|
||||
@@ -79,6 +79,7 @@
|
||||
<#else>
|
||||
"Actor":
|
||||
{
|
||||
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_ShipToMetadata.ftl">,
|
||||
"Name" : "${(preparation_order.address.name_or_company_name!"")?json_string}",
|
||||
"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 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>
|
||||
@@ -38,7 +38,7 @@
|
||||
}
|
||||
]
|
||||
<#else>
|
||||
<#if receipt.line_list ??>
|
||||
<#if receipt.line_list ?? && receipt.line_list[0]??>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||
@@ -79,12 +79,40 @@
|
||||
}
|
||||
<#else>
|
||||
<#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 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}"/>
|
||||
<#else>
|
||||
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
||||
<#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>
|
||||
<#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,6 +123,12 @@
|
||||
}
|
||||
<#else>
|
||||
<#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 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}",
|
||||
@@ -102,7 +136,21 @@
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl">
|
||||
}
|
||||
<#else>
|
||||
<#if receipt.receipt_type?? && receipt.receipt_type == "030" && receipt.receipt_confirmed == "false" && receipt.line_list??>
|
||||
{
|
||||
<#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>
|
||||
<#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!="">
|
||||
[
|
||||
{
|
||||
@@ -110,21 +158,19 @@
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl">
|
||||
|
||||
},
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrReceiptList_TransfertReceiptExpected.ftl">
|
||||
|
||||
}
|
||||
]
|
||||
<#else>
|
||||
<#stop> <#-- Receipt reference for transfer is empty-->
|
||||
</#if>
|
||||
<#else>
|
||||
<#if receipt.line_list ??>
|
||||
<#if receipt.line_list ?? && receipt.line_list[0]??>
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
|
||||
@@ -7,10 +7,14 @@
|
||||
{
|
||||
"Header": {"ProjectID": "${projectRP}"},
|
||||
"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}",
|
||||
<#else>
|
||||
<#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>
|
||||
"RefDate": {
|
||||
"DateTime": "${receipt_status_datetime}",
|
||||
|
||||
@@ -39,11 +39,15 @@
|
||||
"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}",
|
||||
<#else>
|
||||
<#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>
|
||||
"RefDate": {
|
||||
"DateTime": "${receipt_creation_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
@@ -54,7 +58,7 @@
|
||||
"DateTime": "${receipt_creation_datetime}",
|
||||
"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}",
|
||||
<#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}",
|
||||
@@ -233,7 +237,7 @@
|
||||
"DateTime": "${receipt_creation_datetime}",
|
||||
"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 -->
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl">,
|
||||
"ShipFrom":
|
||||
|
||||
@@ -7,10 +7,14 @@
|
||||
{
|
||||
"Header": {"ProjectID": "${projectRP}"},
|
||||
"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}",
|
||||
<#else>
|
||||
<#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>
|
||||
"RefDate": {
|
||||
"DateTime": "${receipt_status_datetime}",
|
||||
|
||||
@@ -7,10 +7,14 @@
|
||||
{
|
||||
"Header": {"ProjectID": "${projectRP}"},
|
||||
"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}",
|
||||
<#else>
|
||||
<#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>
|
||||
"RefDate": {
|
||||
"DateTime": "${receipt_status_datetime}",
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
"DetailElements": [],
|
||||
"CorrelationID": "${id.correlationid!"no Correlationid"}",
|
||||
"ContextPayload": ${strJsonBody},
|
||||
"Type": "RP_EXECUTIONFLOW_EVENT",
|
||||
"Type": "${event}",
|
||||
"Task": "${id.apiRestReflexID!"no Task"}",
|
||||
"OriginalID": "${id.refid!"no OriginalID"?trim?json_string}",
|
||||
"StackTrace": ""
|
||||
|
||||
@@ -8,11 +8,13 @@
|
||||
<#assign projectRP = project>
|
||||
<#assign organisationRP = organisation>
|
||||
|
||||
|
||||
<#assign aDateTime = .now>
|
||||
<#assign no_apiRestReflexID = "no apiRestReflexID">
|
||||
<#assign no_status = -99999>
|
||||
|
||||
<#assign event = "UNKNOW_EVENT" >
|
||||
<#-- DeleteEF_False a définir dans ce fichier -->
|
||||
<#-- DeleteEF_False to be defined in this file.-->
|
||||
<#include "InternalSettings.ftl">
|
||||
|
||||
<#switch id.apiRestReflexID!no_apiRestReflexID>
|
||||
<#case no_apiRestReflexID>
|
||||
@@ -44,6 +46,7 @@
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#assign event = "RP_EXECUTIONFLOW_EVENT" />
|
||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||
},
|
||||
{
|
||||
@@ -58,7 +61,8 @@
|
||||
<#case 201>
|
||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||
<#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)>
|
||||
<#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" >
|
||||
<#if preparationOrderPostResponse.status?? && (preparationOrderPostResponse.status == "SUCCESS" || preparationOrderPostResponse.status == "WARN") >
|
||||
<#if DeleteEF_False>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipFromAcked>
|
||||
@@ -68,15 +72,15 @@
|
||||
}
|
||||
]
|
||||
<#else>
|
||||
<#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "WARN">
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipFromAcked>
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDeleted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_PrepOrder_ShipFromAcked.ftl">
|
||||
<#include "RFXtoRP_ExecutionflowDeleted.ftl">
|
||||
}
|
||||
]
|
||||
</#if>
|
||||
<#else>
|
||||
[
|
||||
{
|
||||
@@ -84,6 +88,7 @@
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#assign event = "RP_EXECUTIONFLOW_EVENT">
|
||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||
},
|
||||
{
|
||||
@@ -94,7 +99,6 @@
|
||||
}
|
||||
]
|
||||
</#if>
|
||||
</#if>
|
||||
<#break>
|
||||
<#default>
|
||||
[
|
||||
@@ -107,6 +111,7 @@
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#assign event = "RP_EXECUTIONFLOW_EVENT" />
|
||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||
},
|
||||
{
|
||||
@@ -132,6 +137,7 @@
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#assign event = "RP_EXECUTIONFLOW_EVENT" />
|
||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||
},
|
||||
{
|
||||
@@ -152,7 +158,7 @@
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDeleted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_Receipt_ExecutionflowDeleted.ftl">
|
||||
<#include "RFXtoRP_ExecutionflowDeleted.ftl">
|
||||
}
|
||||
]
|
||||
<#else>
|
||||
@@ -162,6 +168,7 @@
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#assign event = "RP_EXECUTIONFLOW_EVENT" />
|
||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||
},
|
||||
{
|
||||
@@ -184,6 +191,7 @@
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#assign event = "RP_EXECUTIONFLOW_EVENT" />
|
||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||
},
|
||||
{
|
||||
@@ -209,6 +217,7 @@
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#assign event = "RP_APPOINTMENT_EVENT" />
|
||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||
},
|
||||
{
|
||||
@@ -236,6 +245,7 @@
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#assign event = "RP_APPOINTMENT_EVENT" />
|
||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||
},
|
||||
{
|
||||
@@ -258,6 +268,7 @@
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#assign event = "RP_APPOINTMENT_EVENT" />
|
||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||
},
|
||||
{
|
||||
@@ -284,6 +295,7 @@
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#assign event = "RP_APPOINTMENT_EVENT" />
|
||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||
},
|
||||
{
|
||||
@@ -311,6 +323,7 @@
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#assign event = "RP_APPOINTMENT_EVENT" />
|
||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||
},
|
||||
{
|
||||
@@ -333,6 +346,7 @@
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#assign event = "RP_APPOINTMENT_EVENT" />
|
||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||
},
|
||||
{
|
||||
@@ -359,6 +373,7 @@
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#assign event = "RP_APPOINTMENT_EVENT" />
|
||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||
},
|
||||
{
|
||||
@@ -386,6 +401,7 @@
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#assign event = "RP_APPOINTMENT_EVENT" />
|
||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||
},
|
||||
{
|
||||
@@ -408,6 +424,7 @@
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#assign event = "RP_APPOINTMENT_EVENT" />
|
||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||
},
|
||||
{
|
||||
@@ -419,7 +436,7 @@
|
||||
]
|
||||
</#switch>
|
||||
<#break>
|
||||
<#-- *********************************************** ApiRestID = appointment_post_physical_receipt_associations ******************** -->
|
||||
<#-- *********************************************** ApiRestID = appointment_post_physical_receipt_associations/dissociations ******************** -->
|
||||
<#case "appointment_post_physical_receipt_associations_by_ref">
|
||||
<#case "appointment_post_physical_receipt_associations_by_number">
|
||||
<#case "appointment_post_physical_receipt_dissociations_by_ref">
|
||||
@@ -436,6 +453,7 @@
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#assign event = "RP_APPOINTMENT_EVENT" />
|
||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||
},
|
||||
{
|
||||
@@ -463,6 +481,7 @@
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#assign event = "RP_APPOINTMENT_EVENT" />
|
||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||
},
|
||||
{
|
||||
@@ -485,6 +504,7 @@
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#assign event = "RP_APPOINTMENT_EVENT" />
|
||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||
},
|
||||
{
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<#assign organisationRP = organisation>
|
||||
|
||||
<#switch eventRP.event>
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#-- *********************************************** Action = CREATE ******************** -->
|
||||
<#case "Created">
|
||||
<#assign appointment = eventRP.data />
|
||||
[
|
||||
@@ -24,10 +24,20 @@
|
||||
]
|
||||
<#break>
|
||||
<#-- *********************************************** Action = CommissionsUpdated ******************** -->
|
||||
<#case "CommissionsUpdated">
|
||||
<#case "Updated">
|
||||
<#assign AddComma = false />
|
||||
<#assign appointment = eventRP.data />
|
||||
[ <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING">
|
||||
<#if eventRP.addedCommissions?? && eventRP.addedCommissions!="">
|
||||
[
|
||||
<#if appointment?? && (!(appointment.WMSCreated??) || !appointment.WMSCreated) && appointment.Status?? && appointment.Status.Current?? && appointment.Status.Current.StatusCode?? && appointment.Status.Current.StatusCode == AppointmentStatusCode.APPOINTMENT_0150_ALLOCATION_ERROR>
|
||||
{
|
||||
<#assign apiRestReflexID = ApiRestReflexID.appointment_post_create>
|
||||
"apiRestReflexID" : "${apiRestReflexID}",
|
||||
"datas" :
|
||||
<#include "RPtoRFX_CarrierAppointmentCreated.ftl">
|
||||
}
|
||||
<#else>
|
||||
<#if eventRP.commissionsUpdated>
|
||||
<#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING && eventRP.addedUnloadCommissions?? && eventRP.addedUnloadCommissions != "">
|
||||
<#if eventRP.appointmentCustomFields?has_content>
|
||||
{
|
||||
<#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_number>
|
||||
@@ -43,9 +53,10 @@
|
||||
<#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl">
|
||||
}
|
||||
</#if>
|
||||
<#assign AddComma = true />
|
||||
</#if>
|
||||
<#if eventRP.removedCommissions?? && eventRP.removedCommissions!="">
|
||||
<#if eventRP.addedCommissions?? && eventRP.addedCommissions!="">
|
||||
<#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING && eventRP.removedUnloadCommissions?? && eventRP.removedUnloadCommissions!="">
|
||||
<#if AddComma == true>
|
||||
,
|
||||
</#if>
|
||||
|
||||
@@ -64,32 +75,14 @@
|
||||
<#include "RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl">
|
||||
}
|
||||
</#if>
|
||||
</#if>
|
||||
<#else>
|
||||
<#if eventRP.appointmentCustomFields?has_content>
|
||||
{
|
||||
<#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_number>
|
||||
"apiRestReflexID" : "${apiRestReflexID}",
|
||||
"datas" :
|
||||
<#include "RPtoRFX_CarrierAppointmentReasonUpdatedByNumber.ftl">
|
||||
}
|
||||
<#else>
|
||||
{
|
||||
<#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_ref>
|
||||
"apiRestReflexID" : "${apiRestReflexID}",
|
||||
"datas" :
|
||||
<#include "RPtoRFX_CarrierAppointmentReasonUpdatedByRef.ftl">
|
||||
}
|
||||
<#assign AddComma = true />
|
||||
</#if>
|
||||
</#if>
|
||||
]
|
||||
<#break>
|
||||
<#-- *********************************************** Action = SlotUpdated or CarrierInformationUpdated or ReasonUpdated******************** -->
|
||||
<#case "SlotUpdated">
|
||||
<#case "CarrierInformationUpdated">
|
||||
<#case "ReasonUpdated">
|
||||
<#assign appointment = eventRP.data />
|
||||
[
|
||||
<#-- *********************************************** 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>
|
||||
@@ -105,6 +98,9 @@
|
||||
<#include "RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl">
|
||||
}
|
||||
</#if>
|
||||
<#assign AddComma = true />
|
||||
</#if>
|
||||
</#if>
|
||||
]
|
||||
<#break>
|
||||
<#-- *********************************************** Action = Canceled ******************** -->
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
{
|
||||
"appointment_reference": "${eventRP.refid?json_string}",
|
||||
<#switch appointment.AppointmentType>
|
||||
<#case "APPOINTMENT_TYPE_LOADING">
|
||||
<#case AppointmentType.APPOINTMENT_TYPE_LOADING>
|
||||
"unloading_appointment" : "false",
|
||||
"load_appointment" : "true",
|
||||
<#if appointment.TimeZone?? && appointment.TimeZone!="">
|
||||
@@ -20,7 +20,7 @@
|
||||
"planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}",
|
||||
</#if>
|
||||
<#break>
|
||||
<#case "APPOINTMENT_TYPE_UNLOADING">
|
||||
<#case AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||
"unloading_appointment" : "true",
|
||||
"load_appointment" : "false",
|
||||
<#if appointment.TimeZone?? && appointment.TimeZone!="">
|
||||
@@ -35,31 +35,33 @@
|
||||
<#stop "appointment.AppointmentType not implemented" >
|
||||
</#switch>
|
||||
<#include "RPtoRFX_CarrierAppointmentDefaultData.ftl">
|
||||
<#if appointment.Commissions??>
|
||||
<#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING">
|
||||
<#if appointment.Commissions[0].OrderID?? && appointment.Commissions[0].OrderID!="">
|
||||
<#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING >
|
||||
<#if appointment.Unloading?? && appointment.Unloading.Projects?? && appointment.Unloading.Projects[0]?? &&
|
||||
appointment.Unloading.Projects[0].Commissions?? &&
|
||||
appointment.Unloading.Projects[0].Commissions[0]?? && appointment.Unloading.Projects[0].Commissions[0].ExecutionflowID?? && appointment.Unloading.Projects[0].Commissions[0].ExecutionflowID!="" >
|
||||
"physical_receipt_list": [
|
||||
<#list eventRP.executionflowCustomFields.entrySet()?filter(l ->l.value?? && l.value?has_content) as custom>
|
||||
<#list appointment.Unloading.Projects[0].Commissions?filter(l ->l.ExecutionflowID?? && l.ExecutionflowID !="") as commission>
|
||||
<#list eventRP.executionflowCustomFields.entrySet()?filter(l ->l.key == commission.ExecutionflowID && l.value?? && l.value?has_content) as custom>
|
||||
{
|
||||
"receipt_activity": "${custom.value.activity_code?json_string}",
|
||||
"originator_code": "${custom.value.originator_code?json_string}",
|
||||
"physical_receipt_reference": "${custom.value.reference?json_string}",
|
||||
"receipt_year": "${custom.value.order_year?json_string}",
|
||||
"receipt_number": "${custom.value.order_number?json_string}"
|
||||
|
||||
}
|
||||
<#sep>,</#sep>
|
||||
</#list>
|
||||
<#sep>,</#sep>
|
||||
</#list>
|
||||
],
|
||||
<#else>
|
||||
"appointment_designation":"${(appointment.Reason!"")!?json_string}",
|
||||
</#if>
|
||||
<#else>
|
||||
<#if appointment.AppointmentType == "APPOINTMENT_TYPE_LOADING">
|
||||
<#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_LOADING>
|
||||
"appointment_designation":"${(appointment.Reason!"")?json_string}",
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
"constant_appointment": "false"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,3 +19,23 @@
|
||||
Int : .Int
|
||||
String : .String
|
||||
-->
|
||||
|
||||
<#-- Note : you can send url path of appointment to WMS, using this below code -->
|
||||
|
||||
<#--
|
||||
<#assign appointmentPathURL = JsonUtil.getAppointmentPathURL(eventRP.site,eventRP.refid)>
|
||||
<#assign payLoad = '{ "Header": {"ProjectID": "${projectRP!""}"},"IsOnce": false,"IsPublic": true,"TimeToLive": "0","URL": "${appointmentPathURL}"}' />
|
||||
<#assign projectGetTinyURL = QueryApiReflexPlatformID.ProjectGetTinyURL>
|
||||
<#assign response = QueryApiReflexPlatformCall.call(projectGetTinyURL,payLoad) />
|
||||
<#assign tinyURL = JsonUtil.jsonToMap(response)>
|
||||
|
||||
<#if tinyURL?? && tinyURL.TinyURL?? >
|
||||
"comment_list": [
|
||||
{
|
||||
"line_number": 1,
|
||||
"group_code": "SCN",
|
||||
"text": "${tinyURL.TinyURL.URL?json_string}"
|
||||
}
|
||||
],
|
||||
</#if>
|
||||
-->
|
||||
@@ -10,8 +10,14 @@
|
||||
"payload" :
|
||||
{
|
||||
<#assign executionflowCustomFields = eventRP.executionflowCustomFields >
|
||||
<#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||
<#assign addedCommissions = eventRP.addedUnloadCommissions />
|
||||
<#else>
|
||||
<#assign addedCommissions = eventRP.addedLoadCommissions />
|
||||
</#if>
|
||||
|
||||
"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}",
|
||||
"originator_code": "${executionflowCustomFields[addedCommission.ExecutionflowID].originator_code?json_string}",
|
||||
|
||||
@@ -9,8 +9,14 @@
|
||||
"payload" :
|
||||
{
|
||||
<#assign executionflowCustomFields = eventRP.executionflowCustomFields >
|
||||
<#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||
<#assign addedCommissions = eventRP.addedUnloadCommissions />
|
||||
<#else>
|
||||
<#assign addedCommissions = eventRP.addedLoadCommissions />
|
||||
</#if>
|
||||
|
||||
"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}",
|
||||
"originator_code": "${executionflowCustomFields[addedCommission.ExecutionflowID].originator_code?json_string}",
|
||||
|
||||
@@ -10,8 +10,14 @@
|
||||
"payload" :
|
||||
{
|
||||
<#assign executionflowCustomFields = eventRP.executionflowCustomFields >
|
||||
<#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||
<#assign removedCommissions = eventRP.removedUnloadCommissions />
|
||||
<#else>
|
||||
<#assign removedCommissions = eventRP.removedLoadCommissions />
|
||||
</#if>
|
||||
|
||||
"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}",
|
||||
"originator_code": "${executionflowCustomFields[removedCommission.ExecutionflowID].originator_code?json_string}",
|
||||
|
||||
@@ -9,8 +9,14 @@
|
||||
"payload" :
|
||||
{
|
||||
<#assign executionflowCustomFields = eventRP.executionflowCustomFields >
|
||||
<#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||
<#assign removedCommissions = eventRP.removedUnloadCommissions />
|
||||
<#else>
|
||||
<#assign removedCommissions = eventRP.removedLoadCommissions />
|
||||
</#if>
|
||||
|
||||
"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}",
|
||||
"originator_code": "${executionflowCustomFields[removedCommission.ExecutionflowID].originator_code?json_string}",
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
},
|
||||
"payload" :
|
||||
{
|
||||
"unloading_appointment" : "${eventRP.appointmentCustomFields.unloading?json_string}",
|
||||
"load_appointment" : "${eventRP.appointmentCustomFields.loading?json_string}",
|
||||
"unloading_appointment" : "${eventRP.appointmentCustomFields.unloading!"false"?json_string}",
|
||||
"load_appointment" : "${eventRP.appointmentCustomFields.loading!"false"?json_string}",
|
||||
<#switch appointment.AppointmentType>
|
||||
<#case "APPOINTMENT_TYPE_LOADING">
|
||||
<#case AppointmentType.APPOINTMENT_TYPE_LOADING>
|
||||
<#if appointment.TimeZone?? && appointment.TimeZone!="">
|
||||
"planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}",
|
||||
"planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}",
|
||||
@@ -21,7 +21,7 @@
|
||||
"planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}",
|
||||
</#if>
|
||||
<#break>
|
||||
<#case "APPOINTMENT_TYPE_UNLOADING">
|
||||
<#case AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||
<#if appointment.TimeZone?? && appointment.TimeZone!="">
|
||||
"planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}",
|
||||
"planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}",
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"payload" :
|
||||
{
|
||||
<#switch appointment.AppointmentType>
|
||||
<#case "APPOINTMENT_TYPE_LOADING">
|
||||
<#case AppointmentType.APPOINTMENT_TYPE_LOADING>
|
||||
"unloading_appointment" : "false",
|
||||
"load_appointment" : "true",
|
||||
<#if appointment.TimeZone?? && appointment.TimeZone!="">
|
||||
@@ -20,7 +20,7 @@
|
||||
"planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}",
|
||||
</#if>
|
||||
<#break>
|
||||
<#case "APPOINTMENT_TYPE_UNLOADING">
|
||||
<#case AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||
"unloading_appointment" : "true",
|
||||
"load_appointment" : "false",
|
||||
<#if appointment.TimeZone?? && appointment.TimeZone!="">
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
"payload" :
|
||||
{
|
||||
<#include "RPtoRFX_CarrierAppointmentDataUpdated.ftl">
|
||||
"unloading_appointment" : "${eventRP.appointmentCustomFields.unloading?json_string}",
|
||||
"load_appointment" : "${eventRP.appointmentCustomFields.loading?json_string}",
|
||||
"unloading_appointment" : "${eventRP.appointmentCustomFields.unloading!"false"?json_string}",
|
||||
"load_appointment" : "${eventRP.appointmentCustomFields.loading!"false"?json_string}",
|
||||
<#switch appointment.AppointmentType>
|
||||
<#case "APPOINTMENT_TYPE_LOADING">
|
||||
<#case AppointmentType.APPOINTMENT_TYPE_LOADING>
|
||||
<#if appointment.TimeZone?? && appointment.TimeZone!="">
|
||||
"planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}",
|
||||
"planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}",
|
||||
@@ -22,7 +22,7 @@
|
||||
"planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}",
|
||||
</#if>
|
||||
<#break>
|
||||
<#case "APPOINTMENT_TYPE_UNLOADING">
|
||||
<#case AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||
<#if appointment.TimeZone?? && appointment.TimeZone!="">
|
||||
"planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}",
|
||||
"planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}",
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
{
|
||||
<#include "RPtoRFX_CarrierAppointmentDataUpdated.ftl">
|
||||
<#switch appointment.AppointmentType>
|
||||
<#case "APPOINTMENT_TYPE_LOADING">
|
||||
<#case AppointmentType.APPOINTMENT_TYPE_LOADING>
|
||||
"unloading_appointment" : "false",
|
||||
"load_appointment" : "true",
|
||||
<#if appointment.TimeZone?? && appointment.TimeZone!="">
|
||||
@@ -21,7 +21,7 @@
|
||||
"planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}",
|
||||
</#if>
|
||||
<#break>
|
||||
<#case "APPOINTMENT_TYPE_UNLOADING">
|
||||
<#case AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||
"unloading_appointment" : "true",
|
||||
"load_appointment" : "false",
|
||||
<#if appointment.TimeZone?? && appointment.TimeZone!="">
|
||||
|
||||
Reference in New Issue
Block a user