55 lines
1.9 KiB
Java
55 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 dispute = JsonUtil.jsonToMap(dataRfx)>
|
|
[
|
|
<#if dispute.dispute_closed == true >
|
|
<#if (dispute.dispute_reception?? && dispute.dispute_reception.reception_reference!="") || (dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference!="")>
|
|
{
|
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimCreated>
|
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
"datas" :
|
|
<#include "RFXtoRP_HsaDispute_Created.ftl">
|
|
}
|
|
<#if TableReasonCode[dispute.dispute_reason_code]??>
|
|
,
|
|
{
|
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimMessageSent>
|
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
"datas" :
|
|
<#include "RFXtoRP_HsaDispute_MessageSent.ftl">
|
|
}
|
|
<#else>
|
|
<#stop>
|
|
</#if>
|
|
<#else>
|
|
<#stop "Reference is empty">
|
|
</#if>
|
|
</#if>
|
|
]
|
|
<#break>
|
|
|
|
<#case "D">
|
|
<#-- *********************************************** Action = DELETE ******************** -->
|
|
<#stop>
|
|
<#break>
|
|
|
|
|
|
<#default>
|
|
<#stop>
|
|
</#switch>
|
|
|