modifs ref vide

This commit is contained in:
Laurie MONTANT 2024-03-14 11:51:49 +01:00
parent c6370e2eb7
commit 4802c74fb8
2 changed files with 97 additions and 98 deletions

View File

@ -18,55 +18,55 @@
[
<#--**Pick batch runned (200) **-->
<#if preparationStatusInterface.preparation_order_originator_reference?? && preparationStatusInterface.preparation_order_originator_reference!="">
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "200" >
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationExpected>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaProStatus_PreparationExpected.ftl">
}
<#else>
<#-- ** Collection started (300) and Preparation in progress (400)** -->
<#if preparationStatusInterface.preparation_status_type == "100" && (preparationStatusInterface.preparation_status_code == "300" || preparationStatusInterface.preparation_status_code == "400") >
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "200" >
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationStarted>
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationExpected>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaProStatus_PreparationStarted.ftl">
<#include "RFXtoRP_HsaProStatus_PreparationExpected.ftl">
}
<#else>
<#-- ****Preparation dispatched (600)** -->
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "600" >
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationCompleted>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaProStatus_PreparationCompleted.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowTransportStarted>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaProStatus_TransportStarted.ftl">
}
<#-- ** Collection started (300) and Preparation in progress (400)** -->
<#if preparationStatusInterface.preparation_status_type == "100" && (preparationStatusInterface.preparation_status_code == "300" || preparationStatusInterface.preparation_status_code == "400") >
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationStarted>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaProStatus_PreparationStarted.ftl">
}
<#else>
<#-- ****Preparation cancelled (650)**** -->
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "650" >
<#-- ****Preparation dispatched (600)** -->
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "600" >
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationCompleted>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaProStatus_ExecutionflowCancelled.ftl">
<#include "RFXtoRP_HsaProStatus_PreparationCompleted.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowTransportStarted>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaProStatus_TransportStarted.ftl">
}
<#else>
<#stop>
<#-- ****Preparation cancelled (650)**** -->
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "650" >
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaProStatus_ExecutionflowCancelled.ftl">
}
<#else>
<#stop>
</#if>
</#if>
</#if>
</#if>
<#else>
<#stop "PRO reference is empty">
</#if>
<#else>
<#stop "PRO reference is empty">
</#if>
]
<#break>

View File

@ -15,74 +15,73 @@
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign preparationOrder = JsonUtil.jsonToMap(dataRfx)>
<#if preparation_line.preparation_order_originator_reference?? && preparation_line.preparation_order_originator_reference??!="">
<#if preparationOrder.total_lv_validated !=0>
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsPrepared>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl">
}
<#if preparationOrder.total_lv_validated !=0>
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsPrepared>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl">
}
<#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" >
,
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCarrierUpdated>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_CarrierUpdated.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.OrderCarrierUpdated>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl">
}
</#if>
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list??) as preparation_line>
<#list preparation_line.despatched_ipg_list as despatched_ipg>
<#if despatched_ipg.consignment_unit_id!="">
,
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl">
}
</#if>
<#if despatched_ipg.carton_number != "000000000000000000" && despatched_ipg.carton_number!=despatched_ipg.hd_number >
,
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitHUsAdded>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_HandlingunitHUsAdded.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl">
}
</#if>
<#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" >
,
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCarrierUpdated>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_CarrierUpdated.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.OrderCarrierUpdated>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl">
}
</#if>
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list??) as preparation_line>
<#list preparation_line.despatched_ipg_list as despatched_ipg>
<#if despatched_ipg.consignment_unit_id!="">
,
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl">
}
</#if>
<#if despatched_ipg.carton_number != "000000000000000000" && despatched_ipg.carton_number!=despatched_ipg.hd_number >
,
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitHUsAdded>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_HandlingunitHUsAdded.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl">
}
</#if>
</#list>
<#-- <#sep>,</#sep> -->
</#list>
<#-- <#sep>,</#sep> -->
</#list>
]
]
<#else>
<#stop "no confirmed quantity for the preparation - preparation closed">
</#if>
<#else>
<#stop "no confirmed quantity for the preparation - preparation closed">
<#stop "PRO reference is empty">
</#if>
<#break>