Merge branch 'release/1.2' into 'main-1.2'
Release/1.2 to main1.2 See merge request r-d-technique/tiers/reflex-wms-connector!209
This commit is contained in:
commit
915fae567d
@ -49,7 +49,8 @@
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl">
|
||||
},
|
||||
<#if carrier_apt.status?? && carrier_apt.status.status_code=="999">
|
||||
<#include "RFXtoRP_HsrCarrierApt_AppointmentMetadataUpdated.ftl">
|
||||
<#if carrier_apt.status?? && (carrier_apt.status.status_code=="999" || carrier_apt.status.status_code=="040" || carrier_apt.status.status_code=="030")>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.SiteCancelAppointment>
|
||||
|
||||
38
RFXtoRP_HsrCarrierApt_AppointmentMetadataUpdated.ftl
Normal file
38
RFXtoRP_HsrCarrierApt_AppointmentMetadataUpdated.ftl
Normal file
@ -0,0 +1,38 @@
|
||||
<#--
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||
"RefID": "${carrier_apt.appointment_reference?json_string}",
|
||||
<#else>
|
||||
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
||||
"RefID": "${carrier_apt.appointment_reference?json_string}${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}",
|
||||
<#else>
|
||||
"RefID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}",
|
||||
</#if>
|
||||
</#if>
|
||||
}
|
||||
"Payload": {
|
||||
"ActorID": "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
||||
<#--To configure-->
|
||||
<#-- "MetaData": [
|
||||
{
|
||||
"Key": "string",
|
||||
"Value": {
|
||||
"Bool": "true / false",
|
||||
"Float": 3.1415,
|
||||
"Int": 42,
|
||||
"String": "Hello World !",
|
||||
"Timestamp": {
|
||||
"AuthorTimeZone": "Europe/Paris",
|
||||
"DateTime": "2023-01-01T00:00:00Z"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
-->
|
||||
@ -0,0 +1,36 @@
|
||||
<#--
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||
"RefID": "${carrier_apt.appointment_reference?json_string}",
|
||||
<#else>
|
||||
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
||||
"RefID": "${carrier_apt.appointment_reference?json_string}${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}",
|
||||
<#else>
|
||||
"RefID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}",
|
||||
</#if>
|
||||
</#if>
|
||||
}
|
||||
"Payload": {
|
||||
"ActorID": "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
||||
"MetaData": [
|
||||
{
|
||||
"Key": "string",
|
||||
"Value": {
|
||||
"Bool": "true / false",
|
||||
"Float": 3.1415,
|
||||
"Int": 42,
|
||||
"String": "Hello World !",
|
||||
"Timestamp": {
|
||||
"AuthorTimeZone": "Europe/Paris",
|
||||
"DateTime": "2023-01-01T00:00:00Z"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -2,8 +2,15 @@
|
||||
<#-- Note : you can use Order Line Segmentation keys, using the define map : SegmentationKeys_Map -->
|
||||
|
||||
<#-- How to use MD or SK map
|
||||
Example :
|
||||
<#assign owner_code = SegmentationKeys_Map["Owner"].String!""/>
|
||||
<#if appointment.CarrierInformation??>
|
||||
<#assign CarrierInformation_Map = JsonUtil.sequenceToMap(appointment.CarrierInformation, "Key", "Value") />
|
||||
<#if CarrierInformation_Map["Immatriculation"]??>
|
||||
<#assign registration_number1 = CarrierInformation_Map["Immatriculation"].String!""/>
|
||||
"registration_number":"${registration_number1}",
|
||||
<#else>
|
||||
"registration_number":"no plate number",
|
||||
</#if>
|
||||
</#if>
|
||||
|
||||
If your SK is :
|
||||
Boolean : .Bool
|
||||
|
||||
@ -9,6 +9,23 @@
|
||||
<#return dateutc?datetime.iso?iso_nz(locale)>
|
||||
</#function>
|
||||
|
||||
<#-- -------------------------------------------------------------------------------------------- -->
|
||||
<#-- Add second to dateTime ex: AddSecondsToDatetime("2025-11-17T09:15:00Z"?datetime.iso, 61) -->
|
||||
<#-- -------------------------------------------------------------------------------------------- -->
|
||||
<#function AddSecondsToDatetime date seconds>
|
||||
<#assign timeInMilliseconds = (1000 * seconds) >
|
||||
<#assign aDate = date?long + timeInMilliseconds>
|
||||
<#return aDate?number_to_datetime>
|
||||
</#function>
|
||||
|
||||
<#-- -------------------------------------------------------------------------------------------- -->
|
||||
<#-- Duration between two datetimes in second -->
|
||||
<#-- -------------------------------------------------------------------------------------------- -->
|
||||
<#function DurationBetweenTwoDatetimeInSeconds startDate endDate>
|
||||
<#return (endDate?long - startDate?long) / 1000 >
|
||||
</#function>
|
||||
|
||||
|
||||
<#-- --------------------------------------------------------------------------------------- -->
|
||||
<#-- Split email reflex into json array string -->
|
||||
<#-- Example : splitemail "john.doe@hardis-group.com,; name@hardis-group.com" -->
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user