40 lines
1.1 KiB
Java
40 lines
1.1 KiB
Java
<#-- **** input parameters ***** -->
|
|
<#-- input : message HARDIS WMS -->
|
|
<#-- project : projectId in HARDIS SC NETWORK -->
|
|
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
|
|
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
|
<#assign projectRP = project>
|
|
<#assign organisationRP = organisation>
|
|
|
|
<#assign aDateTime = .now>
|
|
|
|
<#stop>
|
|
|
|
<#switch cloudEventMsg.action>
|
|
<#case "C">
|
|
<#case "U">
|
|
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
|
[
|
|
{
|
|
|
|
}
|
|
]
|
|
<#break>
|
|
|
|
<#case "D">
|
|
<#-- *********************************************** Action = DELETE *************************** -->
|
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
|
[
|
|
{
|
|
|
|
}
|
|
]
|
|
<#break>
|
|
|
|
<#default>
|
|
<#stop >
|
|
</#switch> |