Files
reflex-wms-connector/RFXtoRP_HliAntRecLr.ftl
2026-06-18 13:22:20 +02:00

55 lines
1.9 KiB
Java

<#-- **** input parameters ***** -->
<#-- input : message HARDIS WMS -->
<#-- project : projectId in HARDIS SC NETWORK -->
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
<#assign organisationRP = organisation>
<#assign aDateTime = .now>
<#switch cloudEventMsg.action>
<#case "C">
<#-- *********************************************** Action = CREATE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign AncReceipt = JsonUtil.jsonToMap(dataRfx)>
[
<#if AncReceipt.line_list?? && AncReceipt.line_list[0]??>
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.OrderLinesAdded>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HliAntRecLr_OrderLinesAdded.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.OrderReceiptExpected>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrAntRec_ReceiptExpected.ftl">
}
]
<#else>
<#stop>
</#if>
<#break>
<#case "U">
<#-- *********************************************** Action = UPDATE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign AncReceipt = JsonUtil.jsonToMap(dataRfx)>
<#stop>
<#break>
<#case "D">
<#-- *********************************************** Action = DELETE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign AncReceipt = JsonUtil.jsonToMap(dataRfx)>
<#stop>
<#break>
<#default>
<#stop >
</#switch>