You've already forked reflex-wms-connector
SCPN1-11079
This commit is contained in:
@@ -64,6 +64,7 @@
|
|||||||
}
|
}
|
||||||
<#else>
|
<#else>
|
||||||
<#if eventRP.commissionsUpdated>
|
<#if eventRP.commissionsUpdated>
|
||||||
|
<#-- Associate receipts to appointment -->
|
||||||
<#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING && eventRP.addedUnloadCommissions?? && eventRP.addedUnloadCommissions != "" && eventRP.addedUnloadCommissions?filter(x -> (x.ExecutionflowID?? && x.ExecutionflowID != ""))?size != 0>
|
<#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING && eventRP.addedUnloadCommissions?? && eventRP.addedUnloadCommissions != "" && eventRP.addedUnloadCommissions?filter(x -> (x.ExecutionflowID?? && x.ExecutionflowID != ""))?size != 0>
|
||||||
<#if eventRP.appointmentCustomFields?has_content>
|
<#if eventRP.appointmentCustomFields?has_content>
|
||||||
{
|
{
|
||||||
@@ -82,11 +83,11 @@
|
|||||||
</#if>
|
</#if>
|
||||||
<#assign AddComma = true />
|
<#assign AddComma = true />
|
||||||
</#if>
|
</#if>
|
||||||
|
<#-- Dissociate receipts from appointment -->
|
||||||
<#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING && eventRP.removedUnloadCommissions?? && eventRP.removedUnloadCommissions!="" && eventRP.removedUnloadCommissions?filter(x -> (x.ExecutionflowID?? && x.ExecutionflowID != ""))?size != 0>
|
<#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING && eventRP.removedUnloadCommissions?? && eventRP.removedUnloadCommissions!="" && eventRP.removedUnloadCommissions?filter(x -> (x.ExecutionflowID?? && x.ExecutionflowID != ""))?size != 0>
|
||||||
<#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_post_physical_receipt_dissociations_by_number>
|
||||||
@@ -104,7 +105,7 @@
|
|||||||
</#if>
|
</#if>
|
||||||
<#assign AddComma = true />
|
<#assign AddComma = true />
|
||||||
</#if>
|
</#if>
|
||||||
|
<#-- Associate anticipated receipts to appointment -->
|
||||||
<#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING && eventRP.addedUnloadCommissions?? && eventRP.addedUnloadCommissions != "" && eventRP.addedUnloadCommissions?filter(x -> (!x.ExecutionflowID?? || x.ExecutionflowID == ""))?size != 0>
|
<#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING && eventRP.addedUnloadCommissions?? && eventRP.addedUnloadCommissions != "" && eventRP.addedUnloadCommissions?filter(x -> (!x.ExecutionflowID?? || x.ExecutionflowID == ""))?size != 0>
|
||||||
<#if AddComma == true>
|
<#if AddComma == true>
|
||||||
,
|
,
|
||||||
@@ -119,11 +120,11 @@
|
|||||||
</#if>
|
</#if>
|
||||||
<#assign AddComma = true />
|
<#assign AddComma = true />
|
||||||
</#if>
|
</#if>
|
||||||
|
<#-- Dissociate anticipated receipts from appointment -->
|
||||||
<#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING && eventRP.removedUnloadCommissions?? && eventRP.removedUnloadCommissions!="" && eventRP.removedUnloadCommissions?filter(x -> (!x.ExecutionflowID?? || x.ExecutionflowID == ""))?size != 0>
|
<#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING && eventRP.removedUnloadCommissions?? && eventRP.removedUnloadCommissions!="" && eventRP.removedUnloadCommissions?filter(x -> (!x.ExecutionflowID?? || x.ExecutionflowID == ""))?size != 0>
|
||||||
<#if AddComma == true>
|
<#if AddComma == true>
|
||||||
,
|
,
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
<#if eventRP.appointmentCustomFields?has_content>
|
<#if eventRP.appointmentCustomFields?has_content>
|
||||||
{
|
{
|
||||||
<#assign apiRestReflexID = ApiRestReflexID.appointment_post_anticipated_receipt_dissociations_by_number>
|
<#assign apiRestReflexID = ApiRestReflexID.appointment_post_anticipated_receipt_dissociations_by_number>
|
||||||
@@ -134,6 +135,50 @@
|
|||||||
</#if>
|
</#if>
|
||||||
<#assign AddComma = true />
|
<#assign AddComma = true />
|
||||||
</#if>
|
</#if>
|
||||||
|
<#-- Associate preparations to appointment -->
|
||||||
|
<#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_LOADING && eventRP.addedLoadCommissions?? && eventRP.addedLoadCommissions != "" && eventRP.addedLoadCommissions?filter(x -> (x.ExecutionflowID?? && x.ExecutionflowID != ""))?size != 0>
|
||||||
|
<#if AddComma == true>
|
||||||
|
,
|
||||||
|
</#if>
|
||||||
|
<#if eventRP.appointmentCustomFields?has_content>
|
||||||
|
{
|
||||||
|
<#assign apiRestReflexID = ApiRestReflexID.appointment_post_preparation_associations_by_number>
|
||||||
|
"apiRestReflexID" : "${apiRestReflexID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RPtoRFX_CarrierAppointmentPreparationAssociationByNumber.ftl">
|
||||||
|
}
|
||||||
|
<#else>
|
||||||
|
{
|
||||||
|
<#assign apiRestReflexID = ApiRestReflexID.appointment_post_preparation_associations_by_ref>
|
||||||
|
"apiRestReflexID" : "${apiRestReflexID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RPtoRFX_CarrierAppointmentPreparationAssociationByRef.ftl">
|
||||||
|
}
|
||||||
|
</#if>
|
||||||
|
<#assign AddComma = true />
|
||||||
|
</#if>
|
||||||
|
<#-- Dissociate preparations from appointment -->
|
||||||
|
<#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_LOADING && eventRP.removedLoadCommissions?? && eventRP.removedLoadCommissions!="" && eventRP.removedLoadCommissions?filter(x -> (x.ExecutionflowID?? && x.ExecutionflowID != ""))?size != 0>
|
||||||
|
<#if AddComma == true>
|
||||||
|
,
|
||||||
|
</#if>
|
||||||
|
<#if eventRP.appointmentCustomFields?has_content>
|
||||||
|
{
|
||||||
|
<#assign apiRestReflexID = ApiRestReflexID.appointment_post_preparation_dissociations_by_number>
|
||||||
|
"apiRestReflexID" : "${apiRestReflexID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RPtoRFX_CarrierAppointmentPreparationDissociationByNumber.ftl">
|
||||||
|
}
|
||||||
|
<#else>
|
||||||
|
{
|
||||||
|
<#assign apiRestReflexID = ApiRestReflexID.appointment_post_preparation_dissociations_by_ref>
|
||||||
|
"apiRestReflexID" : "${apiRestReflexID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RPtoRFX_CarrierAppointmentPreparationDissociationByRef.ftl">
|
||||||
|
}
|
||||||
|
</#if>
|
||||||
|
<#assign AddComma = true />
|
||||||
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
<#-- *********************************************** Action = reasonUpdated or slotUpdated ******************** -->
|
<#-- *********************************************** Action = reasonUpdated or slotUpdated ******************** -->
|
||||||
<#if eventRP.reasonUpdated || eventRP.slotUpdated || eventRP.carrierInformationUpdated>
|
<#if eventRP.reasonUpdated || eventRP.slotUpdated || eventRP.carrierInformationUpdated>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
"payload" :
|
"payload" :
|
||||||
{
|
{
|
||||||
<#assign executionflowCustomFields = eventRP.executionflowCustomFields >
|
<#assign executionflowCustomFields = eventRP.executionflowCustomFields >
|
||||||
<#if appointment.AppointmentType == 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 />
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"id" : {"refid" : "${eventRP.refid?json_string}","actorID":"${RPtoRFXprefixDepot(eventRP.actor)}"},
|
"id" : {"refid" : "${eventRP.refid?json_string}","actorID":"${RPtoRFXprefixDepot(eventRP.actor)}"},
|
||||||
"route" : "rest/public/v1/physical_depots/{physical_depot_code}/appointment_years/{appointment_year}/appointment_numbers/{appointment_number}/anticipated_receipt_dissociations",
|
"route" : "rest/public/v1/physical_depots/{physical_depot_code}/appointment_years/{appointment_year}/appointment_numbers/{appointment_number}/preparation_dissociations",
|
||||||
"method" : "POST",
|
"method" : "POST",
|
||||||
"uri_substitutions": {
|
"uri_substitutions": {
|
||||||
"physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}",
|
"physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}",
|
||||||
@@ -9,22 +9,19 @@
|
|||||||
},
|
},
|
||||||
"payload" :
|
"payload" :
|
||||||
{
|
{
|
||||||
<#assign orderCustomFields = eventRP.orderCustomFields >
|
<#assign executionflowCustomFields = eventRP.executionflowCustomFields >
|
||||||
<#if appointment.AppointmentType == 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 />
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
"anticipated_receipt_list": [
|
"preparation_list": [
|
||||||
<#list removedCommissions?filter(l -> (l.OrderID?? && (!l.ExecutionflowID?? || l.ExecutionflowID == ""))) as removedCommission>
|
<#list removedCommissions?filter(l -> (l.ExecutionflowID?? && l.ExecutionflowID != "")) as removedCommission>
|
||||||
{
|
{
|
||||||
"activity": "${orderCustomFields[removedCommission.OrderID].activity_code?json_string}",
|
"activity_code": "${executionflowCustomFields[removedCommission.ExecutionflowID].activity_code?json_string}",
|
||||||
"originator_code": "${orderCustomFields[removedCommission.OrderID].originator_code?json_string}",
|
"preparation_year": "${executionflowCustomFields[removedCommission.ExecutionflowID].preparation_year?json_string}",
|
||||||
"anticipated_receipt_reference": "${orderCustomFields[removedCommission.OrderID].anticipated_receipt_reference?json_string}",
|
"preparation_number": "${executionflowCustomFields[removedCommission.ExecutionflowID].preparation_number?json_string}"
|
||||||
"planned_receipt_date": "${orderCustomFields[removedCommission.OrderID].planned_receipt_datetime?json_string}",
|
|
||||||
"anticipated_receipt_year": "${orderCustomFields[removedCommission.OrderID].anticipated_receipt_year?json_string}",
|
|
||||||
"anticipated_receipt_number": "${orderCustomFields[removedCommission.OrderID].anticipated_receipt_number?json_string}"
|
|
||||||
}
|
}
|
||||||
<#sep>,</#sep>
|
<#sep>,</#sep>
|
||||||
</#list>
|
</#list>
|
||||||
|
|||||||
@@ -1,33 +1,29 @@
|
|||||||
{
|
{
|
||||||
"id" : {"refid" : "${eventRP.refid?json_string}","actorID":"${RPtoRFXprefixDepot(eventRP.actor)}"},
|
"id" : {"refid" : "${eventRP.refid?json_string}","actorID":"${RPtoRFXprefixDepot(eventRP.actor)}"},
|
||||||
"route" : "rest/public/v1/physical_depots/{physical_depot_code}/appointment_years/{appointment_year}/appointment_numbers/{appointment_number}/anticipated_receipt_dissociations",
|
"route" : "rest/public/v1/physical_depots/{physical_depot_code}/carrier_appointments/{appointment_reference}/preparation_dissociations",
|
||||||
"method" : "POST",
|
"method" : "POST",
|
||||||
"uri_substitutions": {
|
"uri_substitutions": {
|
||||||
"physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}",
|
"physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}",
|
||||||
"appointment_year":"${eventRP.appointmentCustomFields.year?json_string}",
|
"appointment_reference":"${eventRP.refid?json_string}"
|
||||||
"appointment_number":"${eventRP.appointmentCustomFields.number?json_string}"
|
|
||||||
},
|
},
|
||||||
"payload" :
|
"payload" :
|
||||||
{
|
{
|
||||||
<#assign orderCustomFields = eventRP.orderCustomFields >
|
<#assign executionflowCustomFields = eventRP.executionflowCustomFields >
|
||||||
<#if appointment.AppointmentType == 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 />
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
"anticipated_receipt_list": [
|
"preparation_list": [
|
||||||
<#list removedCommissions?filter(l -> (l.OrderID?? && (!l.ExecutionflowID?? || l.ExecutionflowID == ""))) as removedCommission>
|
<#list removedCommissions?filter(l -> (l.ExecutionflowID?? && l.ExecutionflowID != "")) as removedCommission>
|
||||||
{
|
{
|
||||||
"activity": "${orderCustomFields[removedCommission.OrderID].activity_code?json_string}",
|
"activity_code": "${executionflowCustomFields[removedCommission.ExecutionflowID].activity_code?json_string}",
|
||||||
"originator_code": "${orderCustomFields[removedCommission.OrderID].originator_code?json_string}",
|
"preparation_year": "${executionflowCustomFields[removedCommission.ExecutionflowID].preparation_year?json_string}",
|
||||||
"anticipated_receipt_reference": "${orderCustomFields[removedCommission.OrderID].anticipated_receipt_reference?json_string}",
|
"preparation_number": "${executionflowCustomFields[removedCommission.ExecutionflowID].preparation_number?json_string}"
|
||||||
"planned_receipt_date": "${orderCustomFields[removedCommission.OrderID].planned_receipt_datetime?json_string}",
|
|
||||||
"anticipated_receipt_year": "${orderCustomFields[removedCommission.OrderID].anticipated_receipt_year?json_string}",
|
|
||||||
"anticipated_receipt_number": "${orderCustomFields[removedCommission.OrderID].anticipated_receipt_number?json_string}"
|
|
||||||
}
|
}
|
||||||
<#sep>,</#sep>
|
<#sep>,</#sep>
|
||||||
</#list>
|
</#list>
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user