This commit is contained in:
Laurie MONTANT 2024-09-06 16:14:11 +02:00
parent ca33a85694
commit 843bf837b2
4 changed files with 74 additions and 13 deletions

View File

@ -1,4 +1,8 @@
<#-- *********************************************** Parameter global ******************** -->
<#-- **** input parameters ***** -->
<#-- input : message RFX -->
<#-- project : projectId in ReflexPlatform -->
<#-- organisation : organisationtId in ReflexPlatform -->
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
<#assign organisationRP = organisation>
@ -6,14 +10,29 @@
<#assign aDateTime = .now>
<#switch cloudEventMsg.action>
<#case "C">
<#case "U">
<#case "D">
<#stop "no generic FTL file available yet for Dispute">
<#break>
<#case "C">
<#case "U">
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign dispute = JsonUtil.jsonToMap(dataRfx)>
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimCreated>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaDispute_Created.ftl">
}
]
<#break>
<#case "D">
<#-- *********************************************** Action = DELETE ******************** -->
<#stop "event not supported - Case D ">
<#break>
<#default>
<#stop "event not supported">
<#default>
<#stop "event not supported">
</#switch>

View File

@ -0,0 +1,40 @@
<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
[
{
"Header": {
"ProjectID": "${projectRP}"
},
"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}"
<#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}"
</#if>
</#if>
},
"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>
}
}
]

View File

@ -18,21 +18,21 @@
"Value": { "String" : "no batch"}
<#else>
"Value": { "String" : "${reflexMvtStockInterface.batch_1}"}
</#if>
</#if>
},
{
"Key": "HeldForSpecificCode",
"Value": { "Bool" : "${reflexMvtStockInterface.ipg_specific_code_held}"}
},
{
<#assign manufacturing_date = reflexMvtStockInterface.manufacture_date?datetime(rfx_date_format_default)?iso_utc />
<#assign manufacturing_date = reflexMvtStockInterface.manufacture_date?datetime(rfx_date_format_default)?iso_utc />
"Key": "ManufacturingDate",
"Value": "Timestamp": {
"AuthorTimeZone": "${time_zone_rfx}",
"DateTime": "${manufacturing_date}"
}
}
}
]
-->

View File

@ -24,7 +24,9 @@
<#include "RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl">,
<#-- Item Photo URI could be added here -->
<#--"PhotoURI": " ", -->
<#if item.url?? && item.url!=="">
"PhotoURI": "${item.url?json_string}",
</#if>
<#-- Loop for the Logistical Variants - LV -->
<#if item.logistical_variant_list??>