motifs
This commit is contained in:
parent
ca33a85694
commit
843bf837b2
@ -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 cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
<#assign organisationRP = organisation>
|
<#assign organisationRP = organisation>
|
||||||
@ -6,14 +10,29 @@
|
|||||||
<#assign aDateTime = .now>
|
<#assign aDateTime = .now>
|
||||||
|
|
||||||
<#switch cloudEventMsg.action>
|
<#switch cloudEventMsg.action>
|
||||||
<#case "C">
|
<#case "C">
|
||||||
<#case "U">
|
<#case "U">
|
||||||
<#case "D">
|
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||||
<#stop "no generic FTL file available yet for Dispute">
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#break>
|
<#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>
|
<#default>
|
||||||
<#stop "event not supported">
|
<#stop "event not supported">
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
40
RFXtoRP_HsaDispute_Created.ftl
Normal file
40
RFXtoRP_HsaDispute_Created.ftl
Normal 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>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -18,21 +18,21 @@
|
|||||||
"Value": { "String" : "no batch"}
|
"Value": { "String" : "no batch"}
|
||||||
<#else>
|
<#else>
|
||||||
"Value": { "String" : "${reflexMvtStockInterface.batch_1}"}
|
"Value": { "String" : "${reflexMvtStockInterface.batch_1}"}
|
||||||
</#if>
|
</#if>
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Key": "HeldForSpecificCode",
|
"Key": "HeldForSpecificCode",
|
||||||
"Value": { "Bool" : "${reflexMvtStockInterface.ipg_specific_code_held}"}
|
"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",
|
"Key": "ManufacturingDate",
|
||||||
"Value": "Timestamp": {
|
"Value": "Timestamp": {
|
||||||
"AuthorTimeZone": "${time_zone_rfx}",
|
"AuthorTimeZone": "${time_zone_rfx}",
|
||||||
"DateTime": "${manufacturing_date}"
|
"DateTime": "${manufacturing_date}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
-->
|
-->
|
||||||
|
|||||||
@ -24,7 +24,9 @@
|
|||||||
<#include "RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl">,
|
<#include "RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl">,
|
||||||
|
|
||||||
<#-- Item Photo URI could be added here -->
|
<#-- 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 -->
|
<#-- Loop for the Logistical Variants - LV -->
|
||||||
<#if item.logistical_variant_list??>
|
<#if item.logistical_variant_list??>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user