This commit is contained in:
Laurie MONTANT 2024-09-11 14:59:45 +02:00
parent 50fb9b467f
commit 0a0121c020
4 changed files with 56 additions and 17 deletions

View File

@ -16,13 +16,16 @@
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign dispute = JsonUtil.jsonToMap(dataRfx)>
[
<#if dispute.dispute_closed == true >
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimCreated>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaDispute_Created.ftl">
}
<#else>
<#stop>
</#if>
]
<#break>

View File

@ -1,5 +1,6 @@
<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
<#include "Table.ftl">
[
{
"Header": {
@ -7,7 +8,7 @@
},
"ID": {
<#if dispute.dispute_preparation??>
"RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?trim?json_string}${dispute.dispute_preparation.preparation_activity_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list.preparation_order_contractor_code?trim?json_string}${dispute.dispute_year_number?trim?json_string}${dispute.dispute_number?trim?json_string}"
"RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?trim?json_string}${dispute.dispute_preparation.preparation_activity_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?trim?json_string}${dispute.dispute_year_number?trim?json_string}${dispute.dispute_number?trim?json_string}"
<#else>
<#if dispute.dispute_reception??>
"RefID": "${dispute.dispute_reception.reception_physical_depot_code?trim?json_string}${dispute.dispute_reception.reception_activity_code?trim?json_string}${dispute.dispute_reception.reception_contractor_code?trim?json_string}${dispute.dispute_year_number?trim?json_string}${dispute.dispute_number?trim?json_string}"
@ -16,22 +17,35 @@
},
"Payload": {
<#-- Case of dispute on preparation -->
<#if dispute.dispute_type_code=="050" >
"EntityID":"${dispute.dispute_preparation.preparation_order_list.preparation_order_contractor_reference}",
<#if dispute.dispute_reason_code == "001"> <#--Enter your Reflex Reason code and mappe it with Platform reason code-->
"ClaimTypeID":"CLAIMTYPE_${projectRP}_ORDER_RETARDLIV"
</#if>
<#else>
<#-- Case of dispute on receipt -->
<#if dispute.dispute_type_code=="070" || dispute.dispute_type_code=="030" >
"EntityID":"${dispute.dispute_reception.reception_reference}",
<#if dispute.dispute_reason_code == "M1"> <#--Enter your Reflex Reason code and mappe it with Platform reason code-->
"ClaimTypeID":"CLAIMTYPE_${projectRP}_ORDER_RETARDLIV"
</#if>
</#if>
<#if dispute.dispute_reference?? && dispute.dispute_reference!="">
"Title":"${dispute.dispute_reference?trim?json_string}",
<#else>
"Title":"",
</#if>
"Amount": {
<#-- "Currency": "${TableCurrency[dispute.dispute_amount_unit]}",-->
"Currency":"EUR",
"Value": "${dispute.dispute_amount}"
},
<#if dispute.dispute_type_code=="050" >
"EntityID":"${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string}",
<#else>
<#if dispute.dispute_type_code=="070" || dispute.dispute_type_code=="030" >
"EntityID":"${dispute.dispute_reception.reception_reference?trim?json_string}",
<#else>
<#stop "Type not supported" >
</#if>
</#if>
<#-- To configure -->
<#include "RFXtoRP_HsaDispute_ReasonCode.ftl">
<#if TableReasonCode[dispute.dispute_reason_code]??>
"ClaimTypeID":"${TableReasonCode[dispute.dispute_reason_code]}"
<#else>
<#stop "Claim reason code not supported" >
</#if>
}
}
]

View File

@ -0,0 +1,13 @@
<#-- Specify table for reason code -->
<#-- <#assign TableReasonCode = {
"001":"CLAIMTYPE_${projectRP}_ORDER_Delay",
"M1":"CLAIMTYPE_${projectRP}_ORDER_casse",
"XXX":"CLAIMTYPE_${projectRP}_ACTOR_claimtype",
"XXX":"CLAIMTYPE_${projectRP}_HANDLINGUNIT_claimtype",
"XXX":"CLAIMTYPE_${projectRP}_MOVEMENT_claimtype"
}/>-->

9
Table.ftl Normal file
View File

@ -0,0 +1,9 @@
<#-- Table criticality -->
<#assign TableCriticality = {
"1": "CLAIM_CRITICALITY_LOW",
"2":"CLAIM_CRITICALITY_MEDIUM",
"3":"CLAIM_CRITICALITY_HIGH",
"4":"CLAIM_CRITICALITY_BLOCKING"
}>