SCPN1-10882

This commit is contained in:
2026-06-09 10:35:38 +02:00
parent bc61336671
commit f54b605e77
10 changed files with 322 additions and 24 deletions

View File

@@ -1,5 +1,5 @@
<#-- **** input parameters ***** -->
<#-- input : message HARDIS WMS -->
<#-- input : message HARDIS WMS for anticipated receipt -->
<#-- project : projectId in HARDIS SC NETWORK -->
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
@@ -14,31 +14,61 @@
<#-- *********************************************** Action = CREATE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign ancReceipt = JsonUtil.jsonToMap(dataRfx)>
[
<#assign AncReceipt = JsonUtil.jsonToMap(dataRfx)>
[
<#if AncReceipt.line_list?? && AncReceipt.line_list[0]??>
{
<#stop >
}
<#assign apiReflexPlatformID = ApiReflexPlatformID.OrderCreated>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrAntRec_Created.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)>
<#assign AncReceipt = JsonUtil.jsonToMap(dataRfx)>
[
{
<#stop >
}
<#if AncReceipt.generated?? && AncReceipt.generated.total_level_1_quantity==0 && AncReceipt.generated.total_level_2_quantity==0 && AncReceipt.generated.total_level_3_quantity==0 && AncReceipt.anticipated_receipt_closed == "true" && AncReceipt.all_receipt_validated=="true">
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.OrderCancelled>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrAntRec_Cancelled.ftl">
}
<#else>
<#if AncReceipt.anticipated_receipt_closed == "true" && AncReceipt.all_receipt_validated=="true">
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.OrderReceiptCompleted>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrAntRec_ReceiptCompleted.ftl">
}
</#if>
</#if>
]
<#break>
<#case "D">
<#-- *********************************************** Action = DELETE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign ancReceipt = JsonUtil.jsonToMap(dataRfx)>
<#assign AncReceipt = JsonUtil.jsonToMap(dataRfx)>
[
{
<#stop >
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.OrderCancelled>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrAntRec_Cancelled.ftl">
}
]
<#break>