Merge branch 'develop' into develop-rdz
# Conflicts: # RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl
This commit is contained in:
commit
16f533bed4
@ -22,29 +22,47 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#switch carrier_apt_status.status.carrier_status_code>
|
<#switch carrier_apt_status.status.carrier_status_code>
|
||||||
<#case "010"> <#-- Transporteur attendu -->
|
<#case "010"> <#-- Carrier Expected -->
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierExpected> <#-- à revoir -->
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierExpected> <#-- à revoir -->
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaLstCarSta_CarrierExpected.ftl">
|
<#include "RFXtoRP_HsaLstCarSta_CarrierExpected.ftl">
|
||||||
<#break>
|
<#break>
|
||||||
<#case "020"> <#-- Transporteur arrivé sur site-->
|
<#case "020"> <#-- Carrier Arrived-->
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierArrived> <#-- à revoir -->
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierArrived> <#-- à revoir -->
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaLstCarSta_CarrierArrived.ftl">
|
<#include "RFXtoRP_HsaLstCarSta_CarrierArrived.ftl">
|
||||||
<#break>
|
<#break>
|
||||||
<#case "040"> <#-- Déchargement commencé -->
|
<#case "040"> <#-- Unloading Started -->
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentUnloadingStarted> <#-- à revoir -->
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentUnloadingStarted> <#-- à revoir -->
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaLstCarSta_UnloadingStarted.ftl">
|
<#include "RFXtoRP_HsaLstCarSta_UnloadingStarted.ftl">
|
||||||
<#break>
|
<#break>
|
||||||
<#case "050"> <#-- Déchargement terminé-->
|
<#case "050"> <#-- Unloading Completed-->
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentUnloadingStarted> <#-- à revoir -->
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentUnloadingCompleted> <#-- à revoir -->
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaLstCarSta_UnloadingStarted.ftl">
|
<#include "RFXtoRP_HsaLstCarSta_UnloadingCompleted.ftl">
|
||||||
|
<#break>
|
||||||
|
<#case "060"> <#-- Loading Started-->
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentLoadingStarted> <#-- à revoir -->
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsaLstCarSta_LoadingStarted.ftl">
|
||||||
|
<#break>
|
||||||
|
<#case "070"> <#-- Loading Completed-->
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentLoadingCompleted> <#-- à revoir -->
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsaLstCarSta_LoadingCompleted.ftl">
|
||||||
|
<#break>
|
||||||
|
<#case "090"> <#-- Carrier Departed-->
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierDeparted> <#-- à revoir -->
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsaLstCarSta_CarrierDeparted.ftl">
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
|
|||||||
@ -5,11 +5,12 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
<#if (!carrier_apt_status.appointment_reference?? || carrier_apt_status.appointment_reference == "")>
|
<#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !="">
|
||||||
<#stop "appointment_reference is not valid or empty" >
|
"RefID": "${carrier_apt_status.appointment_reference?json_string}",
|
||||||
</#if>
|
<#else>
|
||||||
"RefID": "${carrier_apt_status.appointment_reference?trim?json_string}",
|
"RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}",
|
||||||
"RefDate": {
|
</#if>
|
||||||
|
"RefDate": {
|
||||||
"DateTime": "${ref_datetime}",
|
"DateTime": "${ref_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,10 +5,11 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
<#if (!carrier_apt_status.appointment_reference?? || carrier_apt_status.appointment_reference == "")>
|
<#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !="">
|
||||||
<#stop "appointment_reference is not valid or empty" >
|
"RefID": "${carrier_apt_status.appointment_reference?json_string}",
|
||||||
</#if>
|
<#else>
|
||||||
"RefID": "${carrier_apt_status.appointment_reference?trim?json_string}",
|
"RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}",
|
||||||
|
</#if>
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${ref_datetime}",
|
"DateTime": "${ref_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
|||||||
@ -5,10 +5,11 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
<#if (!carrier_apt_status.appointment_reference?? || carrier_apt_status.appointment_reference == "")>
|
<#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !="">
|
||||||
<#stop "appointment_reference is not valid or empty" >
|
"RefID": "${carrier_apt_status.appointment_reference?json_string}",
|
||||||
</#if>
|
<#else>
|
||||||
"RefID": "${carrier_apt_status.appointment_reference?trim?json_string}",
|
"RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}",
|
||||||
|
</#if>
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${ref_datetime}",
|
"DateTime": "${ref_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
|||||||
22
RFXtoRP_HsaLstCarSta_LoadingCompleted.ftl
Normal file
22
RFXtoRP_HsaLstCarSta_LoadingCompleted.ftl
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
[
|
||||||
|
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) />
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
<#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !="">
|
||||||
|
"RefID": "${carrier_apt_status.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}",
|
||||||
|
</#if>
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${ref_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload":{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
22
RFXtoRP_HsaLstCarSta_LoadingStarted.ftl
Normal file
22
RFXtoRP_HsaLstCarSta_LoadingStarted.ftl
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
[
|
||||||
|
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) />
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
<#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !="">
|
||||||
|
"RefID": "${carrier_apt_status.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}",
|
||||||
|
</#if>
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${ref_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload":{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
@ -5,10 +5,11 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
<#if (!carrier_apt_status.appointment_reference?? || carrier_apt_status.appointment_reference == "")>
|
<#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !="">
|
||||||
<#stop "appointment_reference is not valid or empty" >
|
"RefID": "${carrier_apt_status.appointment_reference?json_string}",
|
||||||
</#if>
|
<#else>
|
||||||
"RefID": "${carrier_apt_status.appointment_reference?trim?json_string}",
|
"RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}",
|
||||||
|
</#if>
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${ref_datetime}",
|
"DateTime": "${ref_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
|||||||
@ -5,10 +5,11 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
<#if (!carrier_apt_status.appointment_reference?? || carrier_apt_status.appointment_reference == "")>
|
<#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !="">
|
||||||
<#stop "appointment_reference is not valid or empty" >
|
"RefID": "${carrier_apt_status.appointment_reference?json_string}",
|
||||||
</#if>
|
<#else>
|
||||||
"RefID": "${carrier_apt_status.appointment_reference?trim?json_string}",
|
"RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}",
|
||||||
|
</#if>
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${ref_datetime}",
|
"DateTime": "${ref_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
|||||||
@ -14,7 +14,36 @@
|
|||||||
"AppointmentID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}",
|
"AppointmentID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}",
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false">
|
||||||
|
<#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") || carrier_apt.planned_unloading_end_datetime?starts_with("00") || carrier_apt.planned_unloading_end_datetime?contains("-00-")>
|
||||||
|
<#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend is not initialized" >
|
||||||
|
</#if>
|
||||||
|
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||||
|
<#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_unloading_end_datetime?datetime.iso) />
|
||||||
|
<#if (duration <= 0)>
|
||||||
|
<#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" >
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" >
|
||||||
|
<#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-") || carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-")>
|
||||||
|
<#stop "planned_load_start_datetime or planned_load_end_datetime field of appointmend is not initialized" >
|
||||||
|
</#if>
|
||||||
|
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_LOADING>
|
||||||
|
<#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_load_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) />
|
||||||
|
<#if (duration <= 0)>
|
||||||
|
<#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" >
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
||||||
|
<#stop "Not managed">
|
||||||
|
<#else>
|
||||||
|
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN>
|
||||||
|
<#assign duration = 0 /> <#-- à confirmer -->
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
||||||
|
"Emails": ["francis.reat@hardis-group.com","laurie.montant@hardis-group.com"], <#-- à changer -->
|
||||||
<#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0)>
|
<#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0)>
|
||||||
"Commissions": [
|
"Commissions": [
|
||||||
<#list carrier_apt.physical_receipt_list?filter(l ->l??) as physical_receipt>
|
<#list carrier_apt.physical_receipt_list?filter(l ->l??) as physical_receipt>
|
||||||
@ -30,8 +59,32 @@
|
|||||||
]
|
]
|
||||||
}<#sep>,</#sep>
|
}<#sep>,</#sep>
|
||||||
</#list>
|
</#list>
|
||||||
]
|
],
|
||||||
|
<#else>
|
||||||
|
"Reason": "no commission", <#-- à changer -->
|
||||||
</#if>
|
</#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" >
|
||||||
|
<#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">
|
||||||
|
<#stop "Not managed">
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
}]
|
||||||
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
Loading…
x
Reference in New Issue
Block a user