53 lines
1.9 KiB
Java
53 lines
1.9 KiB
Java
<#-- **** input parameters ***** -->
|
|
<#-- input : message RFX -->
|
|
<#-- project : projectId in ReflexPlatform -->
|
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
|
|
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
|
<#assign projectRP = project>
|
|
<#assign organisationRP = organisation>
|
|
|
|
<#assign aDateTime = .now>
|
|
|
|
<#switch cloudEventMsg.action>
|
|
<#case "C">
|
|
<#--<#case "U">
|
|
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
<#assign preparationOrder = JsonUtil.jsonToMap(dataRfx)>
|
|
[
|
|
{
|
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.GoodsPrepared>
|
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
"datas" :
|
|
<#include "RFXtoRP_HsrPrepa_GoodsPrepared.ftl">
|
|
},
|
|
{
|
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
|
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
"datas" :
|
|
<#include "RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl">
|
|
}
|
|
<#if preparationOrder.preparation_line_lst.despatched_ipg.consignment_unit_id != ""> <#-- if le colis a un tracking - pb listes-->
|
|
,
|
|
{
|
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled>
|
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
"datas" :
|
|
<#include "RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl">
|
|
}
|
|
</#if>
|
|
]
|
|
<#break>
|
|
|
|
<#case "D">
|
|
<#-- *********************************************** Action = DELETE ******************** -->
|
|
<#stop "event not supported (Case D)">
|
|
<#break>
|
|
|
|
|
|
<#default>
|
|
<#stop "event not supported">
|
|
</#switch>
|
|
|