commit first

This commit is contained in:
2025-01-06 17:56:10 +01:00
parent d3c7d5a96c
commit b6415fa316
12 changed files with 272 additions and 19 deletions

View File

@@ -2,6 +2,9 @@
<#-- input : message RFX -->
<#-- project : projectId in ReflexPlatform -->
<#-- organisation : organisationtId in ReflexPlatform -->
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
@@ -15,6 +18,22 @@
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
<#assign refID = RFXtoRPprefixConsignee(actor.code?trim?json_string)>
<#assign payLoad = '{"Header": {"ProjectID": "${projectRP!""}"},"IDs": [{"RefID": "${refID}"}]}' />
<#assign queryApiReflexPlatformID = QueryApiReflexPlatformID.ActorGetByIds>
<#assign response = QueryApiReflexPlatformCall.call(queryApiReflexPlatformID,payLoad) />
<#assign actorRP = JsonUtil.jsonToMap(response)>
<#if actorRP?? && actorRP.Objects?? && actorRP.Objects[0]?? && actorRP.Objects[0].ID.RefID?? >
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaCons_ActorUpdated.ftl">
}
]
<#else>
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
@@ -23,6 +42,7 @@
<#include "RFXtoRP_HsaSup_ActorCreated.ftl">
}
]
</#if>
<#break>
<#case "D">