version 1 des FTL des RDZ
This commit is contained in:
parent
9214df8b96
commit
d895bac137
18
RFXtoRP_HsaCarrierAptStatus_CarrierArrived.ftl
Normal file
18
RFXtoRP_HsaCarrierAptStatus_CarrierArrived.ftl
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
[
|
||||||
|
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) />
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
"RefID": "${carrier_apt_status.appointment_reference?trim?json_string}",
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${ref_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload":{}
|
||||||
|
}
|
||||||
|
]
|
||||||
18
RFXtoRP_HsaCarrierAptStatus_CarrierDeparted.ftl
Normal file
18
RFXtoRP_HsaCarrierAptStatus_CarrierDeparted.ftl
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
[
|
||||||
|
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) />
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
"RefID": "${carrier_apt_status.appointment_reference?trim?json_string}",
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${ref_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload":{}
|
||||||
|
}
|
||||||
|
]
|
||||||
18
RFXtoRP_HsaCarrierAptStatus_CarrierExpected.ftl
Normal file
18
RFXtoRP_HsaCarrierAptStatus_CarrierExpected.ftl
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
[
|
||||||
|
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) />
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
"RefID": "${carrier_apt_status.appointment_reference?trim?json_string}",
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${ref_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload":{}
|
||||||
|
}
|
||||||
|
]
|
||||||
18
RFXtoRP_HsaCarrierAptStatus_ReceptionStarted.ftl
Normal file
18
RFXtoRP_HsaCarrierAptStatus_ReceptionStarted.ftl
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
[
|
||||||
|
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) />
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
"RefID": "${carrier_apt_status.appointment_reference?trim?json_string}",
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${ref_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload":{}
|
||||||
|
}
|
||||||
|
]
|
||||||
18
RFXtoRP_HsaCarrierAptStatus_ReceptionUnloaded.ftl
Normal file
18
RFXtoRP_HsaCarrierAptStatus_ReceptionUnloaded.ftl
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
[
|
||||||
|
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) />
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
"RefID": "${carrier_apt_status.appointment_reference?trim?json_string}",
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${ref_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload":{}
|
||||||
|
}
|
||||||
|
]
|
||||||
@ -1,7 +1,15 @@
|
|||||||
|
|
||||||
<#-- Specify table for reason code -->
|
<#-- Specify table for reason code -->
|
||||||
<#assign TableReasonCode = {}/>
|
<#-- Table example for reason code to claim type ID -->
|
||||||
|
<#-- <#assign TableReasonCode = { -->
|
||||||
|
<#-- "001":"ID_CLAIMTYPE_1",-->
|
||||||
|
<#-- "M1":"ID_CLAIMTYPE_2",-->
|
||||||
|
|
||||||
|
<#-- }/>-->
|
||||||
|
|
||||||
|
<#assign TableReasonCode = {
|
||||||
|
|
||||||
|
"M1" :"CAS"
|
||||||
|
|
||||||
|
}
|
||||||
|
/>
|
||||||
@ -1,40 +1,68 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message HARDIS WMS -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
|
<#-- site : siteID in ReflexPlatform -->
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
|
|
||||||
<#assign organisationRP = organisation>
|
<#assign organisationRP = organisation>
|
||||||
|
|
||||||
<#assign aDateTime = .now>
|
<#assign aDateTime = .now>
|
||||||
|
|
||||||
<#stop>
|
|
||||||
|
|
||||||
<#switch cloudEventMsg.action>
|
<#switch cloudEventMsg.action>
|
||||||
<#case "C">
|
<#case "C">
|
||||||
<#case "U">
|
<#case "U">
|
||||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
<#-- *********************************************** Action = Update ******************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
<#assign carrier_apt_status = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
<#switch carrier_apt_status.status.carrier_status_code>
|
||||||
|
<#case "010"> <#-- Transporteur attendu -->
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierExpected> <#-- à revoir -->
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsaCarrierAptStatus_CarrierExpected.ftl">
|
||||||
|
<#break>
|
||||||
|
<#case "020"> <#-- Transporteur arrivé sur site-->
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierArrived> <#-- à revoir -->
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsaCarrierAptStatus_CarrierArrived.ftl">
|
||||||
|
<#break>
|
||||||
|
<#case "040"> <#-- Déchargement commencé -->
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentReceptionStarted> <#-- à revoir -->
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsaCarrierAptStatus_ReceptionStarted.ftl">
|
||||||
|
<#break>
|
||||||
|
<#case "050"> <#-- Déchargement terminé-->
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentReceptionStarted> <#-- à revoir -->
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsaCarrierAptStatus_ReceptionStarted.ftl">
|
||||||
|
<#break>
|
||||||
|
|
||||||
|
<#default>
|
||||||
|
<#stop 'this updated appointment Status not implemented'>
|
||||||
|
</#switch>
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#case "D">
|
<#case "D">
|
||||||
<#-- *********************************************** Action = DELETE *************************** -->
|
<#-- *********************************************** Action = Delete ******************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
<#assign carrier_apt_status = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
<#stop 'Delete Appointment Status not implemented' >
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop >
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message HARDIS WMS -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
|
<#-- site : siteID in ReflexPlatform -->
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
@ -9,32 +10,57 @@
|
|||||||
|
|
||||||
<#assign aDateTime = .now>
|
<#assign aDateTime = .now>
|
||||||
|
|
||||||
<#stop>
|
|
||||||
|
|
||||||
<#switch cloudEventMsg.action>
|
<#switch cloudEventMsg.action>
|
||||||
<#case "C">
|
<#case "C">
|
||||||
<#case "U">
|
|
||||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
<#assign carrier_apt = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.SiteForceBookAppointment>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierExpected>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrCarrierApt_AppointmentCarrierExpected.ftl">
|
||||||
|
}
|
||||||
|
]
|
||||||
|
<#break>
|
||||||
|
|
||||||
|
<#case "U">
|
||||||
|
<#-- *********************************************** Action = Update ******************** -->
|
||||||
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
|
<#assign carrier_apt = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
[
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.SiteForceUpdateAppointment> <#-- à revoir -->
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#case "D">
|
<#case "D">
|
||||||
<#-- *********************************************** Action = DELETE *************************** -->
|
<#-- *********************************************** Action = Delete ******************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
<#assign carrier_apt = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
|
<#-- Ajout des lignes-->
|
||||||
{
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.SiteCancelAppointment>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl">
|
||||||
}
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop >
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
18
RFXtoRP_HsrCarrierApt_AppointmentCarrierExpected.ftl
Normal file
18
RFXtoRP_HsrCarrierApt_AppointmentCarrierExpected.ftl
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
[
|
||||||
|
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) />
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
"RefID": "${carrier_apt.appointment_reference?trim?json_string}",
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${ref_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload":{}
|
||||||
|
}
|
||||||
|
]
|
||||||
77
RFXtoRP_HsrCarrierApt_ForceUpdateAppointment.ftl
Normal file
77
RFXtoRP_HsrCarrierApt_ForceUpdateAppointment.ftl
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
|
||||||
|
|
||||||
|
<#-- à quoi correspond ID du transporteur dans l'API a voir avec Vincent-->
|
||||||
|
|
||||||
|
|
||||||
|
[
|
||||||
|
{
|
||||||
|
<#assign appointment_reception_start_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.planned_unloading_start_datetime,time_zone_rfx) />
|
||||||
|
<#assign appointment_expedition_start_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.planned_load_start_datetime,time_zone_rfx) />
|
||||||
|
<#assign creation_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) />
|
||||||
|
|
||||||
|
"Header":{
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ActorID": "${carrier_apt.physical_depot}",
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false">
|
||||||
|
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_RECEPTION>
|
||||||
|
<#assign duration = RfxDurationBetweenTwoDateTimetoInSeconds(carrier_apt.planned_unloading_start_datetime,carrier_apt.planned_unloading_end_datetime,time_zone_rfx) />
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" >
|
||||||
|
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_EXPEDITION>
|
||||||
|
<#assign duration = RfxDurationBetweenTwoDateTimetoInSeconds(carrier_apt.planned_load_start_datetime,carrier_apt.planned_load_end_datetime,time_zone_rfx) />
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
||||||
|
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_BOTH>
|
||||||
|
<#assign duration = 0 /> <#-- à confirmer -->
|
||||||
|
<#else>
|
||||||
|
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN>
|
||||||
|
<#assign duration = 0 /> <#-- à confirmer -->
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
"ProjectID": "${projectRP}",
|
||||||
|
"TimeZone": "${time_zone_rfx}",
|
||||||
|
"AppointmentID": "${carrier_apt.appointment_reference}",
|
||||||
|
<#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?size == lv.physical_receipt_list?filter(l ->l??)?size)>
|
||||||
|
"Commissions": [
|
||||||
|
<#list carrier_apt.physical_receipt_list as physical_receipt>
|
||||||
|
{
|
||||||
|
"ActorID": "${carrier_apt.physical_depot}",
|
||||||
|
"OrderID": "${physical_receipt.physical_receipt_reference?json_string}",
|
||||||
|
"ProjectID": "${projectRP}",
|
||||||
|
"Quantities": [
|
||||||
|
{
|
||||||
|
"UnitID": "PAL", <#-- à changer -->
|
||||||
|
"Value": 1 <#-- à changer -->
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}<#sep>,</#sep>
|
||||||
|
</#list>
|
||||||
|
],
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
"Slots": [{
|
||||||
|
<#-- calcul de de la durée en fonction des start et end time-->
|
||||||
|
"DurationInSeconds": "${duration}",
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false">
|
||||||
|
"StartDateTime": "${carrier_apt.planned_unloading_start_datetime}"
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true">
|
||||||
|
"StartDateTime": "${carrier_apt.planned_load_start_datetime}"
|
||||||
|
<#else>
|
||||||
|
<#assign duration = RfxDurationBetweenTwoDateTimetoInSeconds(carrier_apt.planned_unloading_start_datetime,carrier_apt.planned_load_start_datetime,time_zone_rfx) />
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
||||||
|
<#if duration >= 0>
|
||||||
|
"StartDateTime": "${carrier_apt.planned_unloading_start_datetime}"
|
||||||
|
<#else>
|
||||||
|
"StartDateTime": "${carrier_apt.planned_load_start_datetime}"
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
]
|
||||||
13
RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl
Normal file
13
RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
|
||||||
|
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) />
|
||||||
|
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"AppointmentID": "${carrier_apt.appointment_reference?trim?json_string}",
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
62
RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl
Normal file
62
RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
|
||||||
|
|
||||||
|
<#-- à quoi correspond ID du transporteur dans l'API a voir avec Vincent-->
|
||||||
|
|
||||||
|
|
||||||
|
[
|
||||||
|
{
|
||||||
|
<#assign appointment_reception_start_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.planned_unloading_start_datetime,time_zone_rfx) />
|
||||||
|
<#assign appointment_expedition_start_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.planned_load_start_datetime,time_zone_rfx) />
|
||||||
|
<#assign creation_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) />
|
||||||
|
|
||||||
|
"Header":{
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ActorID": "${carrier_apt.physical_depot}",
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false">
|
||||||
|
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_RECEPTION>
|
||||||
|
<#assign duration = RfxDurationBetweenTwoDateTimetoInSeconds(carrier_apt.planned_unloading_start_datetime,carrier_apt.planned_unloading_end_datetime,time_zone_rfx) />
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" >
|
||||||
|
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_EXPEDITION>
|
||||||
|
<#assign duration = RfxDurationBetweenTwoDateTimetoInSeconds(carrier_apt.planned_load_start_datetime,carrier_apt.planned_load_end_datetime,time_zone_rfx) />
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
||||||
|
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_BOTH>
|
||||||
|
<#assign duration = 0 /> <#-- à confirmer -->
|
||||||
|
<#else>
|
||||||
|
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN>
|
||||||
|
<#assign duration = 0 /> <#-- à confirmer -->
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
"ProjectID": "${projectRP}",
|
||||||
|
"Emails": ["francis.reat@hardis-group.com"], <#-- à confirmer -->
|
||||||
|
"Reason": "no commission", <#-- à confirmer -->
|
||||||
|
"CarrierName": "${carrier_apt.planned_carrier}",
|
||||||
|
"AppointmentType": "${appointmentType}",
|
||||||
|
"AppointmentID": "${carrier_apt.appointment_reference}",
|
||||||
|
"Slots": [{
|
||||||
|
<#-- calcul de de la durée en fonction des start et end time-->
|
||||||
|
"DurationInSeconds": "${duration}",
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false">
|
||||||
|
"StartDateTime": "${carrier_apt.planned_unloading_start_datetime}"
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true">
|
||||||
|
"StartDateTime": "${carrier_apt.planned_load_start_datetime}"
|
||||||
|
<#else>
|
||||||
|
<#assign duration = RfxDurationBetweenTwoDateTimetoInSeconds(carrier_apt.planned_unloading_start_datetime,carrier_apt.planned_load_start_datetime,time_zone_rfx) />
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
||||||
|
<#if duration >= 0>
|
||||||
|
"StartDateTime": "${carrier_apt.planned_unloading_start_datetime}"
|
||||||
|
<#else>
|
||||||
|
"StartDateTime": "${carrier_apt.planned_load_start_datetime}"
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
]
|
||||||
75
RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl
Normal file
75
RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[
|
||||||
|
{
|
||||||
|
<#assign appointment_reception_start_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.planned_unloading_start_datetime,time_zone_rfx) />
|
||||||
|
<#assign appointment_expedition_start_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.planned_load_start_datetime,time_zone_rfx) />
|
||||||
|
<#assign creation_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) />
|
||||||
|
|
||||||
|
"Header":{
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ActorID": "${carrier_apt.physical_depot}",
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false">
|
||||||
|
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_RECEPTION>
|
||||||
|
<#assign duration = RfxDurationBetweenTwoDateTimetoInSeconds(carrier_apt.planned_unloading_start_datetime,carrier_apt.planned_unloading_end_datetime,time_zone_rfx) />
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" >
|
||||||
|
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_EXPEDITION>
|
||||||
|
<#assign duration = RfxDurationBetweenTwoDateTimetoInSeconds(carrier_apt.planned_load_start_datetime,carrier_apt.planned_load_end_datetime,time_zone_rfx) />
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
||||||
|
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_BOTH>
|
||||||
|
<#assign duration = 0 /> <#-- à confirmer -->
|
||||||
|
<#else>
|
||||||
|
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN>
|
||||||
|
<#assign duration = 0 /> <#-- à confirmer -->
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
"ProjectID": "${projectRP}",
|
||||||
|
"TimeZone": "${time_zone_rfx}",
|
||||||
|
"AppointmentID": "${carrier_apt.appointment_reference}",
|
||||||
|
<#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?size == carrier_apt.physical_receipt_list?filter(l ->l??)?size)>
|
||||||
|
"Commissions": [
|
||||||
|
<#list carrier_apt.physical_receipt_list as physical_receipt>
|
||||||
|
{
|
||||||
|
"ActorID": "${carrier_apt.physical_depot}",
|
||||||
|
"OrderID": "${physical_receipt.physical_receipt_reference?json_string}",
|
||||||
|
"ProjectID": "${projectRP}",
|
||||||
|
"Quantities": [
|
||||||
|
{
|
||||||
|
"UnitID": "PAL", <#-- à changer -->
|
||||||
|
"Value": 1 <#-- à changer -->
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}<#sep>,</#sep>
|
||||||
|
</#list>
|
||||||
|
],
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
"Slots": [{
|
||||||
|
<#-- calcul de de la durée en fonction des start et end time-->
|
||||||
|
"DurationInSeconds": "${duration}",
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false">
|
||||||
|
"StartDateTime": "${carrier_apt.planned_unloading_start_datetime}"
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true">
|
||||||
|
"StartDateTime": "${carrier_apt.planned_load_start_datetime}"
|
||||||
|
<#else>
|
||||||
|
<#assign duration = RfxDurationBetweenTwoDateTimetoInSeconds(carrier_apt.planned_unloading_start_datetime,carrier_apt.planned_load_start_datetime,time_zone_rfx) />
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
||||||
|
<#if duration >= 0>
|
||||||
|
"StartDateTime": "${carrier_apt.planned_unloading_start_datetime}"
|
||||||
|
<#else>
|
||||||
|
"StartDateTime": "${carrier_apt.planned_load_start_datetime}"
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
]
|
||||||
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
<#-- How to use MD Header map
|
<#-- How to use MD Header map
|
||||||
Example :
|
Example :
|
||||||
|
<<<<<<< HEAD
|
||||||
<#assign pick_sequence_code = Header_MetaData_Map["OrderType"].String!""/>
|
<#assign pick_sequence_code = Header_MetaData_Map["OrderType"].String!""/>
|
||||||
|
|
||||||
If your MD is :
|
If your MD is :
|
||||||
@ -14,19 +15,28 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<#assign activity_code = ""/>
|
<#assign activity_code = "ALI"/>
|
||||||
<#assign originator_code = ""/>
|
<#assign originator_code = "001"/>
|
||||||
<#assign preparation_type_code = ""/>
|
=======
|
||||||
<#assign requested_delivery_date_type = ""/>
|
<#assign pick_sequence_code = Header_MetaData_Map["OrderType"]!""/>
|
||||||
|
-->
|
||||||
|
|
||||||
|
|
||||||
|
<#assign activity_code = "ALI"/>
|
||||||
|
<#assign originator_code = "DEPT ALIM"/>
|
||||||
|
>>>>>>> main
|
||||||
|
<#assign preparation_type_code = "010"/>
|
||||||
|
<#assign requested_delivery_date_type = "010"/>
|
||||||
<#assign consolidated_delivery_flag ="false"/>
|
<#assign consolidated_delivery_flag ="false"/>
|
||||||
<#assign pick_sequence_code = ""/>
|
<#assign pick_sequence_code = ""/>
|
||||||
<#assign protected_flag ="false"/>
|
<#assign protected_flag ="false"/>
|
||||||
<#assign automatic_generation_flag ="false"/>
|
<#assign automatic_generation_flag ="false"/>
|
||||||
<#assign apt_with_end_consignee_flag="false"/>
|
<#assign apt_with_end_consignee_flag="false"/>
|
||||||
|
<<<<<<< HEAD
|
||||||
|
|
||||||
<#-- A supprimer si utilisation de la table de correspondance-->
|
<#-- A supprimer si utilisation de la table de correspondance-->
|
||||||
<#--To be deleted if using the correspondence table-->
|
<#--To be deleted if using the correspondence table-->
|
||||||
<#assign load_grouping = "default">
|
<#assign load_grouping = "TEST">
|
||||||
|
|
||||||
|
|
||||||
<#-- Table de correspondance Transporteur/Code regroupement chargement,
|
<#-- Table de correspondance Transporteur/Code regroupement chargement,
|
||||||
@ -45,3 +55,6 @@ Assigning to a load if you set up Load Grouping+Distribution Master Plan-->
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
=======
|
||||||
|
<#assign load_grouping = "STD"/>
|
||||||
|
>>>>>>> main
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user