29 lines
1.1 KiB
Java
29 lines
1.1 KiB
Java
<#-- *********************************************** Parameter global ******************** -->
|
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
|
<#assign projectRP = project>
|
|
<#assign organisationRP = organisation>
|
|
<#include "HfExpGrpList.ftl">
|
|
<#assign aDateTime = .now>
|
|
<#assign Date_Tye_Code_KV = {"010":"PRODUCTION_DATE","020":"PRODUCTION_DATE","030":"BEST_BEFORE_DATE","040":"SELL_BY_DATE","050":"USE_BY_DATE"} >
|
|
|
|
|
|
<#switch cloudEventMsg.action>
|
|
<#case "C">
|
|
<#case "U">
|
|
<#case "D">
|
|
<#-- *********************************************** Action = CREATE or UPDATE or DELETE ******************** -->
|
|
<#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,Date_Tye_Code_KV[expiry_group.priority_date_type_code])>
|
|
</#list>
|
|
<#assign output = JsonUtil.print(temp)>
|
|
${output}
|
|
<#break>
|
|
|
|
<#default>
|
|
<#stop>
|
|
</#switch>
|