From 77436cce0788d12bdcc313c1ae2bdd1160ae237b Mon Sep 17 00:00:00 2001 From: frea Date: Thu, 7 Sep 2023 10:23:04 +0200 Subject: [PATCH] =?UTF-8?q?add=20fichier=20sur=20les=20familles=20p=C3=A9r?= =?UTF-8?q?emption.ftl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ExpiryGroupList.ftl | 4 ++++ RFXtoRP_HfExpGrpList.ftl | 28 ++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 ExpiryGroupList.ftl create mode 100644 RFXtoRP_HfExpGrpList.ftl diff --git a/ExpiryGroupList.ftl b/ExpiryGroupList.ftl new file mode 100644 index 0000000..79fffe8 --- /dev/null +++ b/ExpiryGroupList.ftl @@ -0,0 +1,4 @@ +<#assign ExpiryGroupList = {}/> +<#assign ExpiryGroupList64 = ""/> + + \ No newline at end of file diff --git a/RFXtoRP_HfExpGrpList.ftl b/RFXtoRP_HfExpGrpList.ftl new file mode 100644 index 0000000..4c31349 --- /dev/null +++ b/RFXtoRP_HfExpGrpList.ftl @@ -0,0 +1,28 @@ +<#-- *********************************************** Parameter global ******************** --> +<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> +<#assign projectRP = project> +<#assign organisationRP = organisation> +<#include "ExpiryGroupList.ftl"> +<#assign aDateTime = .now> + + +<#switch cloudEventMsg.action> + <#case "C"> + <#case "U"> + <#case "D"> + <#-- *********************************************** Action = CREATE or UPDATE ******************** --> + <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> + <#assign file = JsonUtil.jsonToMap(dataRfx)> + + <#assign temp = ExpiryGroupList64> + <#list file.expiry_group_list as expiry_group> + <#assign temp = JsonUtil.update(temp,cloudEventMsg.action,expiry_group.exipiry_group_code,expiry_group.priority_date_type_code)> + + <#assign output = JsonUtil.print(temp)> +${output} + <#break> + + <#default> + <#stop> + +