You've already forked reflex-wms-connector
Expiry group management
This commit is contained in:
@@ -4,19 +4,20 @@
|
||||
<#assign organisationRP = organisation>
|
||||
<#include "ExpiryGroupList.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 ******************** -->
|
||||
<#-- *********************************************** 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,expiry_group.priority_date_type_code)>
|
||||
<#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}
|
||||
@@ -25,4 +26,3 @@ ${output}
|
||||
<#default>
|
||||
<#stop>
|
||||
</#switch>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user