SCPN1-10471

SCPN1-10402
This commit is contained in:
2026-03-24 17:10:45 +01:00
parent 37495ca141
commit f602f74da1
10 changed files with 85 additions and 77 deletions

View File

@@ -28,70 +28,79 @@
<#assign AddComma = false /> <#assign AddComma = false />
<#assign appointment = eventRP.data /> <#assign appointment = eventRP.data />
[ [
<#if eventRP.commissionsUpdated> <#if appointment?? && appointment.Status?? && appointment.Status.Current?? && appointment.Status.Current.StatusCode?? && appointment.Status.Current.StatusCode == AppointmentStatusCode.APPOINTMENT_0150_ALLOCATION_ERROR>
<#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING" && eventRP.addedUnloadCommissions?? && eventRP.addedUnloadCommissions != ""> {
<#if eventRP.appointmentCustomFields?has_content> <#assign apiRestReflexID = ApiRestReflexID.appointment_post_create>
{ "apiRestReflexID" : "${apiRestReflexID}",
<#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_number> "datas" :
"apiRestReflexID" : "${apiRestReflexID}", <#include "RPtoRFX_CarrierAppointmentCreated.ftl">
"datas" : }
<#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl"> <#else>
} <#if eventRP.commissionsUpdated>
<#else> <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING" && eventRP.addedUnloadCommissions?? && eventRP.addedUnloadCommissions != "">
{ <#if eventRP.appointmentCustomFields?has_content>
<#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_ref> {
"apiRestReflexID" : "${apiRestReflexID}", <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_number>
"datas" : "apiRestReflexID" : "${apiRestReflexID}",
<#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl"> "datas" :
} <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl">
}
<#else>
{
<#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_ref>
"apiRestReflexID" : "${apiRestReflexID}",
"datas" :
<#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl">
}
</#if>
<#assign AddComma = true />
</#if> </#if>
<#assign AddComma = true /> <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING" && eventRP.removedUnloadCommissions?? && eventRP.removedUnloadCommissions!="">
</#if> <#if AddComma == true>
<#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING" && eventRP.removedUnloadCommissions?? && eventRP.removedUnloadCommissions!=""> ,
</#if>
<#if eventRP.appointmentCustomFields?has_content>
{
<#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_dissociations_by_number>
"apiRestReflexID" : "${apiRestReflexID}",
"datas" :
<#include "RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl">
}
<#else>
{
<#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_dissociations_by_ref>
"apiRestReflexID" : "${apiRestReflexID}",
"datas" :
<#include "RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl">
}
</#if>
<#assign AddComma = true />
</#if>
</#if>
<#-- *********************************************** Action = reasonUpdated or slotUpdated ******************** -->
<#if eventRP.reasonUpdated || eventRP.slotUpdated || eventRP.carrierInformationUpdated>
<#if AddComma == true> <#if AddComma == true>
, ,
</#if> </#if>
<#if eventRP.appointmentCustomFields?has_content> <#if eventRP.appointmentCustomFields?has_content>
{ {
<#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_dissociations_by_number> <#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_number>
"apiRestReflexID" : "${apiRestReflexID}", "apiRestReflexID" : "${apiRestReflexID}",
"datas" : "datas" :
<#include "RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl"> <#include "RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl">
} }
<#else> <#else>
{ {
<#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_dissociations_by_ref> <#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_ref>
"apiRestReflexID" : "${apiRestReflexID}", "apiRestReflexID" : "${apiRestReflexID}",
"datas" : "datas" :
<#include "RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl"> <#include "RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl">
} }
</#if> </#if>
<#assign AddComma = true /> <#assign AddComma = true />
</#if> </#if>
</#if> </#if>
<#-- *********************************************** Action = reasonUpdated or slotUpdated ******************** -->
<#if eventRP.reasonUpdated || eventRP.slotUpdated || eventRP.carrierInformationUpdated>
<#if AddComma == true>
,
</#if>
<#if eventRP.appointmentCustomFields?has_content>
{
<#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_number>
"apiRestReflexID" : "${apiRestReflexID}",
"datas" :
<#include "RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl">
}
<#else>
{
<#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_ref>
"apiRestReflexID" : "${apiRestReflexID}",
"datas" :
<#include "RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByRef.ftl">
}
</#if>
<#assign AddComma = true />
</#if>
] ]
<#break> <#break>
<#-- *********************************************** Action = Canceled ******************** --> <#-- *********************************************** Action = Canceled ******************** -->

View File

@@ -9,7 +9,7 @@
{ {
"appointment_reference": "${eventRP.refid?json_string}", "appointment_reference": "${eventRP.refid?json_string}",
<#switch appointment.AppointmentType> <#switch appointment.AppointmentType>
<#case "APPOINTMENT_TYPE_LOADING"> <#case AppointmentType.APPOINTMENT_TYPE_LOADING>
"unloading_appointment" : "false", "unloading_appointment" : "false",
"load_appointment" : "true", "load_appointment" : "true",
<#if appointment.TimeZone?? && appointment.TimeZone!=""> <#if appointment.TimeZone?? && appointment.TimeZone!="">
@@ -20,7 +20,7 @@
"planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}", "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}",
</#if> </#if>
<#break> <#break>
<#case "APPOINTMENT_TYPE_UNLOADING"> <#case AppointmentType.APPOINTMENT_TYPE_UNLOADING>
"unloading_appointment" : "true", "unloading_appointment" : "true",
"load_appointment" : "false", "load_appointment" : "false",
<#if appointment.TimeZone?? && appointment.TimeZone!=""> <#if appointment.TimeZone?? && appointment.TimeZone!="">
@@ -35,30 +35,29 @@
<#stop "appointment.AppointmentType not implemented" > <#stop "appointment.AppointmentType not implemented" >
</#switch> </#switch>
<#include "RPtoRFX_CarrierAppointmentDefaultData.ftl"> <#include "RPtoRFX_CarrierAppointmentDefaultData.ftl">
<#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING" > <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING >
<#if appointment.Unloading?? && appointment.Unloading.Projects?? && appointment.Unloading.Projects[0]?? && <#if appointment.Unloading?? && appointment.Unloading.Projects?? && appointment.Unloading.Projects[0]?? &&
appointment.Unloading.Projects[0].Commissions?? && appointment.Unloading.Projects[0].Commissions?? &&
appointment.Unloading.Projects[0].Commissions[0]?? && appointment.Unloading.Projects[0].Commissions[0]??>
appointment.Unloading.Projects[0].Commissions[0].OrderID?? &&
appointment.Unloading.Projects[0].Commissions[0].OrderID != "">
"physical_receipt_list": [ "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}", "receipt_activity": "${custom.value.activity_code?json_string}",
"physical_receipt_reference": "${custom.value.reference?json_string}", "originator_code": "${custom.value.originator_code?json_string}",
"receipt_year": "${custom.value.order_year?json_string}", "physical_receipt_reference": "${custom.value.reference?json_string}",
"receipt_number": "${custom.value.order_number?json_string}" "receipt_year": "${custom.value.order_year?json_string}",
"receipt_number": "${custom.value.order_number?json_string}"
} }
<#sep>,</#sep> <#sep>,</#sep>
</#list> </#list>
</#list>
], ],
<#else> <#else>
"appointment_designation":"${(appointment.Reason!"")!?json_string}", "appointment_designation":"${(appointment.Reason!"")!?json_string}",
</#if> </#if>
<#else> <#else>
<#if appointment.AppointmentType == "APPOINTMENT_TYPE_LOADING"> <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_LOADING>
"appointment_designation":"${(appointment.Reason!"")?json_string}", "appointment_designation":"${(appointment.Reason!"")?json_string}",
</#if> </#if>
</#if> </#if>

View File

@@ -10,7 +10,7 @@
"payload" : "payload" :
{ {
<#assign executionflowCustomFields = eventRP.executionflowCustomFields > <#assign executionflowCustomFields = eventRP.executionflowCustomFields >
<#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING"> <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING>
<#assign addedCommissions = eventRP.addedUnloadCommissions /> <#assign addedCommissions = eventRP.addedUnloadCommissions />
<#else> <#else>
<#assign addedCommissions = eventRP.addedLoadCommissions /> <#assign addedCommissions = eventRP.addedLoadCommissions />

View File

@@ -9,7 +9,7 @@
"payload" : "payload" :
{ {
<#assign executionflowCustomFields = eventRP.executionflowCustomFields > <#assign executionflowCustomFields = eventRP.executionflowCustomFields >
<#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING"> <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING>
<#assign addedCommissions = eventRP.addedUnloadCommissions /> <#assign addedCommissions = eventRP.addedUnloadCommissions />
<#else> <#else>
<#assign addedCommissions = eventRP.addedLoadCommissions /> <#assign addedCommissions = eventRP.addedLoadCommissions />

View File

@@ -10,7 +10,7 @@
"payload" : "payload" :
{ {
<#assign executionflowCustomFields = eventRP.executionflowCustomFields > <#assign executionflowCustomFields = eventRP.executionflowCustomFields >
<#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING"> <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING>
<#assign removedCommissions = eventRP.removedUnloadCommissions /> <#assign removedCommissions = eventRP.removedUnloadCommissions />
<#else> <#else>
<#assign removedCommissions = eventRP.removedLoadCommissions /> <#assign removedCommissions = eventRP.removedLoadCommissions />

View File

@@ -9,7 +9,7 @@
"payload" : "payload" :
{ {
<#assign executionflowCustomFields = eventRP.executionflowCustomFields > <#assign executionflowCustomFields = eventRP.executionflowCustomFields >
<#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING"> <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING>
<#assign removedCommissions = eventRP.removedUnloadCommissions /> <#assign removedCommissions = eventRP.removedUnloadCommissions />
<#else> <#else>
<#assign removedCommissions = eventRP.removedLoadCommissions /> <#assign removedCommissions = eventRP.removedLoadCommissions />

View File

@@ -12,7 +12,7 @@
"unloading_appointment" : "${eventRP.appointmentCustomFields.unloading?json_string}", "unloading_appointment" : "${eventRP.appointmentCustomFields.unloading?json_string}",
"load_appointment" : "${eventRP.appointmentCustomFields.loading?json_string}", "load_appointment" : "${eventRP.appointmentCustomFields.loading?json_string}",
<#switch appointment.AppointmentType> <#switch appointment.AppointmentType>
<#case "APPOINTMENT_TYPE_LOADING"> <#case AppointmentType.APPOINTMENT_TYPE_LOADING>
<#if appointment.TimeZone?? && appointment.TimeZone!=""> <#if appointment.TimeZone?? && appointment.TimeZone!="">
"planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}",
"planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}",
@@ -21,7 +21,7 @@
"planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}", "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}",
</#if> </#if>
<#break> <#break>
<#case "APPOINTMENT_TYPE_UNLOADING"> <#case AppointmentType.APPOINTMENT_TYPE_UNLOADING>
<#if appointment.TimeZone?? && appointment.TimeZone!=""> <#if appointment.TimeZone?? && appointment.TimeZone!="">
"planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", "planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}",
"planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", "planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}",

View File

@@ -9,7 +9,7 @@
"payload" : "payload" :
{ {
<#switch appointment.AppointmentType> <#switch appointment.AppointmentType>
<#case "APPOINTMENT_TYPE_LOADING"> <#case AppointmentType.APPOINTMENT_TYPE_LOADING>
"unloading_appointment" : "false", "unloading_appointment" : "false",
"load_appointment" : "true", "load_appointment" : "true",
<#if appointment.TimeZone?? && appointment.TimeZone!=""> <#if appointment.TimeZone?? && appointment.TimeZone!="">
@@ -20,7 +20,7 @@
"planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}", "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}",
</#if> </#if>
<#break> <#break>
<#case "APPOINTMENT_TYPE_UNLOADING"> <#case AppointmentType.APPOINTMENT_TYPE_UNLOADING>
"unloading_appointment" : "true", "unloading_appointment" : "true",
"load_appointment" : "false", "load_appointment" : "false",
<#if appointment.TimeZone?? && appointment.TimeZone!=""> <#if appointment.TimeZone?? && appointment.TimeZone!="">

View File

@@ -13,7 +13,7 @@
"unloading_appointment" : "${eventRP.appointmentCustomFields.unloading?json_string}", "unloading_appointment" : "${eventRP.appointmentCustomFields.unloading?json_string}",
"load_appointment" : "${eventRP.appointmentCustomFields.loading?json_string}", "load_appointment" : "${eventRP.appointmentCustomFields.loading?json_string}",
<#switch appointment.AppointmentType> <#switch appointment.AppointmentType>
<#case "APPOINTMENT_TYPE_LOADING"> <#case AppointmentType.APPOINTMENT_TYPE_LOADING>
<#if appointment.TimeZone?? && appointment.TimeZone!=""> <#if appointment.TimeZone?? && appointment.TimeZone!="">
"planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}",
"planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}",
@@ -22,7 +22,7 @@
"planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}", "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}",
</#if> </#if>
<#break> <#break>
<#case "APPOINTMENT_TYPE_UNLOADING"> <#case AppointmentType.APPOINTMENT_TYPE_UNLOADING>
<#if appointment.TimeZone?? && appointment.TimeZone!=""> <#if appointment.TimeZone?? && appointment.TimeZone!="">
"planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", "planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}",
"planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", "planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}",

View File

@@ -10,7 +10,7 @@
{ {
<#include "RPtoRFX_CarrierAppointmentDataUpdated.ftl"> <#include "RPtoRFX_CarrierAppointmentDataUpdated.ftl">
<#switch appointment.AppointmentType> <#switch appointment.AppointmentType>
<#case "APPOINTMENT_TYPE_LOADING"> <#case AppointmentType.APPOINTMENT_TYPE_LOADING>
"unloading_appointment" : "false", "unloading_appointment" : "false",
"load_appointment" : "true", "load_appointment" : "true",
<#if appointment.TimeZone?? && appointment.TimeZone!=""> <#if appointment.TimeZone?? && appointment.TimeZone!="">
@@ -21,7 +21,7 @@
"planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}", "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}",
</#if> </#if>
<#break> <#break>
<#case "APPOINTMENT_TYPE_UNLOADING"> <#case AppointmentType.APPOINTMENT_TYPE_UNLOADING>
"unloading_appointment" : "true", "unloading_appointment" : "true",
"load_appointment" : "false", "load_appointment" : "false",
<#if appointment.TimeZone?? && appointment.TimeZone!=""> <#if appointment.TimeZone?? && appointment.TimeZone!="">