You've already forked reflex-wms-connector
SCPN1-11079
This commit is contained in:
@@ -64,6 +64,7 @@
|
||||
}
|
||||
<#else>
|
||||
<#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 eventRP.appointmentCustomFields?has_content>
|
||||
{
|
||||
@@ -82,11 +83,11 @@
|
||||
</#if>
|
||||
<#assign AddComma = true />
|
||||
</#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 AddComma == true>
|
||||
,
|
||||
</#if>
|
||||
|
||||
<#if eventRP.appointmentCustomFields?has_content>
|
||||
{
|
||||
<#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_dissociations_by_number>
|
||||
@@ -104,7 +105,7 @@
|
||||
</#if>
|
||||
<#assign AddComma = true />
|
||||
</#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 AddComma == true>
|
||||
,
|
||||
@@ -119,11 +120,11 @@
|
||||
</#if>
|
||||
<#assign AddComma = true />
|
||||
</#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 AddComma == true>
|
||||
,
|
||||
</#if>
|
||||
|
||||
<#if eventRP.appointmentCustomFields?has_content>
|
||||
{
|
||||
<#assign apiRestReflexID = ApiRestReflexID.appointment_post_anticipated_receipt_dissociations_by_number>
|
||||
@@ -134,6 +135,50 @@
|
||||
</#if>
|
||||
<#assign AddComma = true />
|
||||
</#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>
|
||||
<#-- *********************************************** Action = reasonUpdated or slotUpdated ******************** -->
|
||||
<#if eventRP.reasonUpdated || eventRP.slotUpdated || eventRP.carrierInformationUpdated>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"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",
|
||||
"uri_substitutions": {
|
||||
"physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}",
|
||||
@@ -9,22 +9,19 @@
|
||||
},
|
||||
"payload" :
|
||||
{
|
||||
<#assign orderCustomFields = eventRP.orderCustomFields >
|
||||
<#assign executionflowCustomFields = eventRP.executionflowCustomFields >
|
||||
<#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||
<#assign removedCommissions = eventRP.removedUnloadCommissions />
|
||||
<#else>
|
||||
<#assign removedCommissions = eventRP.removedLoadCommissions />
|
||||
</#if>
|
||||
|
||||
"anticipated_receipt_list": [
|
||||
<#list removedCommissions?filter(l -> (l.OrderID?? && (!l.ExecutionflowID?? || l.ExecutionflowID == ""))) as removedCommission>
|
||||
"preparation_list": [
|
||||
<#list removedCommissions?filter(l -> (l.ExecutionflowID?? && l.ExecutionflowID != "")) as removedCommission>
|
||||
{
|
||||
"activity": "${orderCustomFields[removedCommission.OrderID].activity_code?json_string}",
|
||||
"originator_code": "${orderCustomFields[removedCommission.OrderID].originator_code?json_string}",
|
||||
"anticipated_receipt_reference": "${orderCustomFields[removedCommission.OrderID].anticipated_receipt_reference?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}"
|
||||
"activity_code": "${executionflowCustomFields[removedCommission.ExecutionflowID].activity_code?json_string}",
|
||||
"preparation_year": "${executionflowCustomFields[removedCommission.ExecutionflowID].preparation_year?json_string}",
|
||||
"preparation_number": "${executionflowCustomFields[removedCommission.ExecutionflowID].preparation_number?json_string}"
|
||||
}
|
||||
<#sep>,</#sep>
|
||||
</#list>
|
||||
|
||||
@@ -1,30 +1,26 @@
|
||||
{
|
||||
"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",
|
||||
"uri_substitutions": {
|
||||
"physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}",
|
||||
"appointment_year":"${eventRP.appointmentCustomFields.year?json_string}",
|
||||
"appointment_number":"${eventRP.appointmentCustomFields.number?json_string}"
|
||||
"appointment_reference":"${eventRP.refid?json_string}"
|
||||
},
|
||||
"payload" :
|
||||
{
|
||||
<#assign orderCustomFields = eventRP.orderCustomFields >
|
||||
<#assign executionflowCustomFields = eventRP.executionflowCustomFields >
|
||||
<#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||
<#assign removedCommissions = eventRP.removedUnloadCommissions />
|
||||
<#else>
|
||||
<#assign removedCommissions = eventRP.removedLoadCommissions />
|
||||
</#if>
|
||||
|
||||
"anticipated_receipt_list": [
|
||||
<#list removedCommissions?filter(l -> (l.OrderID?? && (!l.ExecutionflowID?? || l.ExecutionflowID == ""))) as removedCommission>
|
||||
"preparation_list": [
|
||||
<#list removedCommissions?filter(l -> (l.ExecutionflowID?? && l.ExecutionflowID != "")) as removedCommission>
|
||||
{
|
||||
"activity": "${orderCustomFields[removedCommission.OrderID].activity_code?json_string}",
|
||||
"originator_code": "${orderCustomFields[removedCommission.OrderID].originator_code?json_string}",
|
||||
"anticipated_receipt_reference": "${orderCustomFields[removedCommission.OrderID].anticipated_receipt_reference?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}"
|
||||
"activity_code": "${executionflowCustomFields[removedCommission.ExecutionflowID].activity_code?json_string}",
|
||||
"preparation_year": "${executionflowCustomFields[removedCommission.ExecutionflowID].preparation_year?json_string}",
|
||||
"preparation_number": "${executionflowCustomFields[removedCommission.ExecutionflowID].preparation_number?json_string}"
|
||||
}
|
||||
<#sep>,</#sep>
|
||||
</#list>
|
||||
|
||||
Reference in New Issue
Block a user