receipt list
This commit is contained in:
parent
a7055b1a1e
commit
80f25f29ad
@ -12,8 +12,13 @@
|
||||
<#switch cloudEventMsg.action>
|
||||
<#case "C">
|
||||
<#-- *********************************************** Action = CREATE ******************** -->
|
||||
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
||||
|
||||
<#if receipt.receipt_type = "030">
|
||||
<#stop "ignored message because receipt type = transfert">
|
||||
<#else>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||
@ -23,6 +28,7 @@
|
||||
|
||||
}
|
||||
]
|
||||
</#if>
|
||||
<#break>
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = UPDATE ******************** -->
|
||||
|
||||
@ -38,44 +38,9 @@
|
||||
"Carrier" : {"ActorID": "${receipt.carrier_informations.carrier_code}"},
|
||||
</#if>
|
||||
|
||||
<#-- If receipt got lines -->
|
||||
<#if receipt.line_list??>
|
||||
|
||||
"Lines" : [
|
||||
<#list receipt.line_list as line>
|
||||
|
||||
<#-- if receipt type = 030 (transfert) -->
|
||||
<#if receipt.receipt_type = "030">
|
||||
|
||||
<#list line.line_detail as detail>
|
||||
{
|
||||
"LineID": "${line.receipt_line_number}${detail.receipt_detail_number}",
|
||||
<#-- Line Metadata inclusion -->
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl">,
|
||||
"RequestedContent":
|
||||
{
|
||||
"Goods":
|
||||
{
|
||||
"ItemID": "${line.item_code!"0"}",
|
||||
"LVBranchID": "${line.item_lv_code!"0"}",
|
||||
<#if (detail.priority_date?length != 0) && (detail.priority_date?starts_with("00") == false)>
|
||||
<#assign line_detail_priority_date = detail.priority_date?datetime(rfx_date_format_default)?iso_utc />
|
||||
"PriorityDate": "${line_detail_priority_date}",
|
||||
</#if>
|
||||
|
||||
<#-- Line Segmentation Keys inclusion -->
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineSegmentationKeys.ftl">
|
||||
|
||||
},
|
||||
"Quantity" :
|
||||
{
|
||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||
"Value": "${detail.confirmation_lv_quantity!0}"
|
||||
}
|
||||
}
|
||||
}<#sep>,</#sep>
|
||||
</#list>
|
||||
<#-- receipt type different from transfert non transfert -->
|
||||
<#else>
|
||||
{
|
||||
"LineID": "${line.receipt_line_number}",
|
||||
<#-- Line Metadata inclusion -->
|
||||
@ -90,13 +55,13 @@
|
||||
<#if (line.line_without_detail.priority_date?length != 0) && (line.line_without_detail.priority_date?starts_with("00") == false)>
|
||||
<#assign line_without_detail_priority_date = line.line_without_detail.priority_date?datetime(rfx_date_format_default)?iso_utc />
|
||||
"PriorityDate": "${line_without_detail_priority_date}",
|
||||
</#if>
|
||||
</#if>
|
||||
|
||||
<#-- Line Segmentation Keys inclusion -->
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineSegmentationKeys.ftl">
|
||||
|
||||
<#else>
|
||||
<#stop "Reception non transfert avec detail">
|
||||
<#stop "line with detail">
|
||||
</#if>
|
||||
},
|
||||
"Quantity" :
|
||||
@ -107,11 +72,9 @@
|
||||
}
|
||||
|
||||
}
|
||||
</#if>
|
||||
<#sep>,</#sep>
|
||||
</#list>
|
||||
],
|
||||
</#if>
|
||||
|
||||
"RequestedMilestones" :
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user