receipt list
This commit is contained in:
parent
a7055b1a1e
commit
80f25f29ad
@ -12,8 +12,13 @@
|
|||||||
<#switch cloudEventMsg.action>
|
<#switch cloudEventMsg.action>
|
||||||
<#case "C">
|
<#case "C">
|
||||||
<#-- *********************************************** Action = CREATE ******************** -->
|
<#-- *********************************************** Action = CREATE ******************** -->
|
||||||
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
|
||||||
|
<#if receipt.receipt_type = "030">
|
||||||
|
<#stop "ignored message because receipt type = transfert">
|
||||||
|
<#else>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||||
@ -22,7 +27,8 @@
|
|||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl">
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl">
|
||||||
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
</#if>
|
||||||
<#break>
|
<#break>
|
||||||
<#case "U">
|
<#case "U">
|
||||||
<#-- *********************************************** Action = UPDATE ******************** -->
|
<#-- *********************************************** Action = UPDATE ******************** -->
|
||||||
|
|||||||
@ -38,44 +38,9 @@
|
|||||||
"Carrier" : {"ActorID": "${receipt.carrier_informations.carrier_code}"},
|
"Carrier" : {"ActorID": "${receipt.carrier_informations.carrier_code}"},
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
<#-- If receipt got lines -->
|
|
||||||
<#if receipt.line_list??>
|
|
||||||
"Lines" : [
|
"Lines" : [
|
||||||
<#list receipt.line_list as line>
|
<#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}",
|
"LineID": "${line.receipt_line_number}",
|
||||||
<#-- Line Metadata inclusion -->
|
<#-- 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)>
|
<#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 />
|
<#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}",
|
"PriorityDate": "${line_without_detail_priority_date}",
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
<#-- Line Segmentation Keys inclusion -->
|
<#-- Line Segmentation Keys inclusion -->
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineSegmentationKeys.ftl">
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineSegmentationKeys.ftl">
|
||||||
|
|
||||||
<#else>
|
<#else>
|
||||||
<#stop "Reception non transfert avec detail">
|
<#stop "line with detail">
|
||||||
</#if>
|
</#if>
|
||||||
},
|
},
|
||||||
"Quantity" :
|
"Quantity" :
|
||||||
@ -107,11 +72,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</#if>
|
|
||||||
<#sep>,</#sep>
|
<#sep>,</#sep>
|
||||||
</#list>
|
</#list>
|
||||||
],
|
],
|
||||||
</#if>
|
|
||||||
|
|
||||||
"RequestedMilestones" :
|
"RequestedMilestones" :
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user