SCPN1-8863
This commit is contained in:
parent
b01ba5205b
commit
fa17314de3
@ -17,7 +17,6 @@
|
|||||||
<#assign preparationStatusInterface = JsonUtil.jsonToMap(dataRfx) />
|
<#assign preparationStatusInterface = JsonUtil.jsonToMap(dataRfx) />
|
||||||
[
|
[
|
||||||
<#--**Pick batch runned (200) **-->
|
<#--**Pick batch runned (200) **-->
|
||||||
<#if preparationStatusInterface.preparation_type_code=="010" || (preparationStatusInterface.preparation_type_code=="030" && preparationStatusInterface.preparation_order_originator_reference!="")>
|
|
||||||
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "200" >
|
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "200" >
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationExpected>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationExpected>
|
||||||
@ -64,9 +63,6 @@
|
|||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
<#else>
|
|
||||||
<#stop> <#-- Preparation type not supported-->
|
|
||||||
</#if>
|
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
<#if preparationStatusInterface.preparation_order_originator_reference?? && preparationStatusInterface.preparation_order_originator_reference!="">
|
<#if preparationStatusInterface.preparation_order_originator_reference?? && preparationStatusInterface.preparation_order_originator_reference!="">
|
||||||
"RefID": "${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
"RefID": "${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
||||||
<#else>
|
<#else>
|
||||||
"RefID": "${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_year}${preparationStatusInterface.preparation_order_number}",
|
"RefID": "${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_year}${preparationStatusInterface.preparation_order_number}",
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
<#if preparationStatusInterface.preparation_order_originator_reference?? && preparationStatusInterface.preparation_order_originator_reference!="">
|
<#if preparationStatusInterface.preparation_order_originator_reference?? && preparationStatusInterface.preparation_order_originator_reference!="">
|
||||||
"RefID": "${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
"RefID": "${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
||||||
<#else>
|
<#else>
|
||||||
"RefID": "${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_year}${preparationStatusInterface.preparation_order_number}",
|
"RefID": "${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_year}${preparationStatusInterface.preparation_order_number}",
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
<#if preparationStatusInterface.preparation_order_originator_reference?? && preparationStatusInterface.preparation_order_originator_reference!="">
|
<#if preparationStatusInterface.preparation_order_originator_reference?? && preparationStatusInterface.preparation_order_originator_reference!="">
|
||||||
"RefID": "${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
"RefID": "${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
||||||
<#else>
|
<#else>
|
||||||
"RefID": "${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_year}${preparationStatusInterface.preparation_order_number}",
|
"RefID": "${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_year}${preparationStatusInterface.preparation_order_number}",
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
<#if preparationStatusInterface.preparation_order_originator_reference?? && preparationStatusInterface.preparation_order_originator_reference!="">
|
<#if preparationStatusInterface.preparation_order_originator_reference?? && preparationStatusInterface.preparation_order_originator_reference!="">
|
||||||
"RefID": "${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
"RefID": "${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
||||||
<#else>
|
<#else>
|
||||||
"RefID": "${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_year}${preparationStatusInterface.preparation_order_number}",
|
"RefID": "${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_year}${preparationStatusInterface.preparation_order_number}",
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
<#if preparationStatusInterface.preparation_order_originator_reference?? && preparationStatusInterface.preparation_order_originator_reference!="">
|
<#if preparationStatusInterface.preparation_order_originator_reference?? && preparationStatusInterface.preparation_order_originator_reference!="">
|
||||||
"RefID": "${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
"RefID": "${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
||||||
<#else>
|
<#else>
|
||||||
"RefID": "${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_year}${preparationStatusInterface.preparation_order_number}",
|
"RefID": "${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_year}${preparationStatusInterface.preparation_order_number}",
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
|
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
<#-- check preparation type code (internal order and reservation are ignored) -->
|
<#-- check preparation type code (internal order and reservation are ignored) -->
|
||||||
<#if preparation_order.preparation_type_code == "010" || (preparation_order.preparation_type_code == "030" && preparation_order.originator_reference?? && preparation_order.originator_reference!="")>
|
<#if preparation_order.preparation_type_code == "010" || preparation_order.preparation_type_code == "030">
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
|||||||
@ -12,7 +12,6 @@
|
|||||||
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
|
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
|
||||||
"RefID": "${preparation_order.physical_depot_code?trim?json_string}${preparation_order.activity_code?trim?json_string}${preparation_order.originator_code?trim?json_string}${preparation_order.originator_reference?trim?json_string}",
|
"RefID": "${preparation_order.physical_depot_code?trim?json_string}${preparation_order.activity_code?trim?json_string}${preparation_order.originator_code?trim?json_string}${preparation_order.originator_reference?trim?json_string}",
|
||||||
<#else>
|
<#else>
|
||||||
|
|
||||||
"RefID": "${preparation_order.physical_depot_code?trim?json_string}${preparation_order.activity_code?trim?json_string}${preparation_order.originator_code?trim?json_string}${preparation_order.preparation_order_year}${preparation_order.preparation_order_number}",
|
"RefID": "${preparation_order.physical_depot_code?trim?json_string}${preparation_order.activity_code?trim?json_string}${preparation_order.originator_code?trim?json_string}${preparation_order.preparation_order_year}${preparation_order.preparation_order_number}",
|
||||||
</#if>
|
</#if>
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
|
|||||||
@ -15,8 +15,7 @@
|
|||||||
|
|
||||||
<#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">
|
<#if receipt.receipt_type = "030"> <#-- if reception is a transfer reception -->
|
||||||
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||||
@ -33,9 +32,6 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#else>
|
|
||||||
<#stop> <#-- Receipt reference for transfert is empty-->
|
|
||||||
</#if>
|
|
||||||
<#else>
|
<#else>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
|
|||||||
@ -47,6 +47,18 @@
|
|||||||
}
|
}
|
||||||
</#if>
|
</#if>
|
||||||
<#else>
|
<#else>
|
||||||
|
{
|
||||||
|
"Header": {"ProjectID": "${projectRP}"},
|
||||||
|
"ID": {
|
||||||
|
"RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year?trim?json_string}${receipt.receipt_number?trim?json_string}",
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${receipt_status_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload": {
|
||||||
|
}
|
||||||
|
}
|
||||||
<#break>
|
<#break>
|
||||||
</#if>
|
</#if>
|
||||||
</#list>
|
</#list>
|
||||||
|
|||||||
@ -1,99 +1,272 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
<#include "ActorPrefix.ftl">
|
<#include "ActorPrefix.ftl">
|
||||||
|
<#assign receipt_datetime = RfxDateTimetoUTCWithTimezone(receipt.receipt_datetime,time_zone_rfx) />
|
||||||
|
<#assign receipt_creation_datetime = RfxDateTimetoUTCWithTimezone(receipt.creation_datetime,time_zone_rfx) />
|
||||||
|
<#assign refIDHmap_local ={}>
|
||||||
[
|
[
|
||||||
{
|
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
||||||
<#assign receipt_datetime = RfxDateTimetoUTCWithTimezone(receipt.receipt_datetime,time_zone_rfx) />
|
{
|
||||||
<#assign receipt_creation_datetime = RfxDateTimetoUTCWithTimezone(receipt.creation_datetime,time_zone_rfx) />
|
"Header": {"ProjectID": "${projectRP}"},
|
||||||
"Header": {
|
"ID": {
|
||||||
"ProjectID": "${projectRP}"
|
<#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="">
|
||||||
},
|
"RefID": "${receipt.origin_order_line_depot?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}",
|
||||||
"ID": {
|
<#else>
|
||||||
<#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="">
|
"RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}",
|
||||||
"RefID": "${receipt.origin_order_line_depot?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}",
|
</#if>
|
||||||
<#else>
|
"RefDate": {
|
||||||
"RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}",
|
"DateTime": "${receipt_creation_datetime}",
|
||||||
</#if>
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
"RefDate": {
|
},
|
||||||
|
"Payload": {
|
||||||
|
"CreationDateTime": {
|
||||||
"DateTime": "${receipt_creation_datetime}",
|
"DateTime": "${receipt_creation_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
"CreationDateTime": {
|
|
||||||
"DateTime": "${receipt_creation_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
},
|
|
||||||
"OrderID":"${receipt.receipt_reference?trim?json_string}",
|
|
||||||
<#-- Header Metadata inclusion -->
|
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl">,
|
|
||||||
|
|
||||||
"ShipFrom":
|
|
||||||
{
|
|
||||||
"ActorID": "${RFXtoRPprefixSupplier(receipt.original_code?trim?json_string)}"
|
|
||||||
},
|
|
||||||
"ShipTo" :
|
|
||||||
{
|
|
||||||
"ActorID": "${RFXtoRPprefixDepot(receipt.physical_depot_code?trim?json_string)}"
|
|
||||||
},
|
|
||||||
"ShipToAcked": true,
|
|
||||||
|
|
||||||
<#if receipt.carrier_informations.carrier_code != "">
|
|
||||||
"Carrier":
|
|
||||||
{
|
|
||||||
"ActorID":"${RFXtoRPprefixCarrier(receipt.carrier_informations.carrier_code?trim?json_string)}"
|
|
||||||
},
|
|
||||||
</#if>
|
|
||||||
|
|
||||||
<#if receipt.line_list??>
|
|
||||||
"Lines" : [
|
|
||||||
<#list receipt.line_list as line>
|
|
||||||
{
|
|
||||||
"LineID": "${line.receipt_line_number}",
|
|
||||||
<#-- Line Metadata inclusion -->
|
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl">,
|
|
||||||
"RequestedContent":
|
|
||||||
{
|
|
||||||
"Goods":
|
|
||||||
{
|
|
||||||
"ItemID": "${line.item_code?trim?json_string!"0"}",
|
|
||||||
"LVBranchID": "${line.item_lv_code?json_string!"0"}",
|
|
||||||
<#if (line.line_without_detail?? && 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}",
|
|
||||||
<#else>
|
|
||||||
<#if (line.line_detail?? && line.line_detail?size == 1 && line.line_detail[0].priority_date?length != 0) && (line.line_detail[0].priority_date?starts_with("00") == false)>
|
|
||||||
<#assign line_detail_priority_date = line.line_detail[0].priority_date?datetime(rfx_date_format_default)?iso_utc />
|
|
||||||
"PriorityDate": "${line_detail_priority_date}",
|
|
||||||
<#else>
|
|
||||||
"PriorityDate": "1970-01-01T00:00:00Z",
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
<#-- Segmentation Keys inclusion -->
|
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl">
|
|
||||||
},
|
},
|
||||||
"Quantity" :
|
"OrderID":"${receipt.receipt_reference?trim?json_string}",
|
||||||
|
<#-- Header Metadata inclusion -->
|
||||||
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl">,
|
||||||
|
"ShipFrom":
|
||||||
|
{
|
||||||
|
"ActorID": "${RFXtoRPprefixSupplier(receipt.original_code?trim?json_string)}"
|
||||||
|
},
|
||||||
|
"ShipTo" :
|
||||||
|
{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(receipt.physical_depot_code?trim?json_string)}"
|
||||||
|
},
|
||||||
|
"ShipToAcked": true,
|
||||||
|
<#if receipt.carrier_informations.carrier_code != "">
|
||||||
|
"Carrier":
|
||||||
|
{
|
||||||
|
"ActorID":"${RFXtoRPprefixCarrier(receipt.carrier_informations.carrier_code?trim?json_string)}"
|
||||||
|
},
|
||||||
|
</#if>
|
||||||
|
<#if receipt.line_list??>
|
||||||
|
"Lines" : [
|
||||||
|
<#list receipt.line_list as line>
|
||||||
|
{
|
||||||
|
"LineID": "${line.receipt_line_number}",
|
||||||
|
<#-- Line Metadata inclusion -->
|
||||||
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl">,
|
||||||
|
"RequestedContent":
|
||||||
{
|
{
|
||||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
"Goods":
|
||||||
"Value": "${line.order_quantity_in_lv!0}"
|
{
|
||||||
|
"ItemID": "${line.item_code?trim?json_string!"0"}",
|
||||||
|
"LVBranchID": "${line.item_lv_code?json_string!"0"}",
|
||||||
|
<#if (line.line_without_detail?? && 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}",
|
||||||
|
<#else>
|
||||||
|
<#if (line.line_detail?? && line.line_detail?size == 1 && line.line_detail[0].priority_date?length != 0) && (line.line_detail[0].priority_date?starts_with("00") == false)>
|
||||||
|
<#assign line_detail_priority_date = line.line_detail[0].priority_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
|
"PriorityDate": "${line_detail_priority_date}",
|
||||||
|
<#else>
|
||||||
|
"PriorityDate": "1970-01-01T00:00:00Z",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
<#-- Segmentation Keys inclusion -->
|
||||||
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl">
|
||||||
|
},
|
||||||
|
"Quantity" :
|
||||||
|
{
|
||||||
|
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||||
|
"Value": "${line.order_quantity_in_lv!0}"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
<#sep>,</#sep>
|
||||||
}
|
</#list>
|
||||||
<#sep>,</#sep>
|
],
|
||||||
</#list>
|
</#if>
|
||||||
],
|
"RequestedMilestones" :
|
||||||
</#if>
|
{
|
||||||
|
"RequestedDeliveryDateTime" :
|
||||||
"RequestedMilestones" :
|
{
|
||||||
{
|
"DateTime": "${receipt_datetime}",
|
||||||
"RequestedDeliveryDateTime" :
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
{
|
}
|
||||||
"DateTime": "${receipt_datetime}",
|
}
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
<#else>
|
||||||
]
|
<#if receipt.line_list??>
|
||||||
|
<#list receipt.line_list as receipt_line >
|
||||||
|
<#if receipt_line.origin_order_line_reference!="">
|
||||||
|
<#if !refIDHmap_local[receipt_line.origin_order_line_reference]?? >
|
||||||
|
<#if refIDHmap_local?size != 0 >
|
||||||
|
,
|
||||||
|
</#if>
|
||||||
|
<#assign refIDHmap_local +={receipt_line.origin_order_line_reference,receipt_line.origin_order_line_reference}>
|
||||||
|
{
|
||||||
|
"Header": {"ProjectID": "${projectRP}"},
|
||||||
|
"ID": {
|
||||||
|
<#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="">
|
||||||
|
"RefID": "${receipt.origin_order_line_depot?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt_line.origin_order_line_reference?trim?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt_line.origin_order_line_reference?trim?json_string}",
|
||||||
|
</#if>
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${receipt_creation_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload": {
|
||||||
|
"CreationDateTime": {
|
||||||
|
"DateTime": "${receipt_creation_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
},
|
||||||
|
"OrderID":"${receipt.receipt_reference?trim?json_string}",
|
||||||
|
<#-- Header Metadata inclusion -->
|
||||||
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl">,
|
||||||
|
"ShipFrom":
|
||||||
|
{
|
||||||
|
"ActorID": "${RFXtoRPprefixSupplier(receipt.original_code?trim?json_string)}"
|
||||||
|
},
|
||||||
|
"ShipTo" :
|
||||||
|
{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(receipt.physical_depot_code?trim?json_string)}"
|
||||||
|
},
|
||||||
|
"ShipToAcked": true,
|
||||||
|
<#if receipt.carrier_informations.carrier_code != "">
|
||||||
|
"Carrier":
|
||||||
|
{
|
||||||
|
"ActorID":"${RFXtoRPprefixCarrier(receipt.carrier_informations.carrier_code?trim?json_string)}"
|
||||||
|
},
|
||||||
|
</#if>
|
||||||
|
<#if receipt.line_list??>
|
||||||
|
"Lines" : [
|
||||||
|
<#list receipt.line_list as line>
|
||||||
|
{
|
||||||
|
"LineID": "${line.receipt_line_number}",
|
||||||
|
<#-- Line Metadata inclusion -->
|
||||||
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl">,
|
||||||
|
"RequestedContent":
|
||||||
|
{
|
||||||
|
"Goods":
|
||||||
|
{
|
||||||
|
"ItemID": "${line.item_code?trim?json_string!"0"}",
|
||||||
|
"LVBranchID": "${line.item_lv_code?json_string!"0"}",
|
||||||
|
<#if (line.line_without_detail?? && 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}",
|
||||||
|
<#else>
|
||||||
|
<#if (line.line_detail?? && line.line_detail?size == 1 && line.line_detail[0].priority_date?length != 0) && (line.line_detail[0].priority_date?starts_with("00") == false)>
|
||||||
|
<#assign line_detail_priority_date = line.line_detail[0].priority_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
|
"PriorityDate": "${line_detail_priority_date}",
|
||||||
|
<#else>
|
||||||
|
"PriorityDate": "1970-01-01T00:00:00Z",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
<#-- Segmentation Keys inclusion -->
|
||||||
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl">
|
||||||
|
},
|
||||||
|
"Quantity" :
|
||||||
|
{
|
||||||
|
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||||
|
"Value": "${line.order_quantity_in_lv!0}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
<#sep>,</#sep>
|
||||||
|
</#list>
|
||||||
|
],
|
||||||
|
</#if>
|
||||||
|
"RequestedMilestones" :
|
||||||
|
{
|
||||||
|
"RequestedDeliveryDateTime" :
|
||||||
|
{
|
||||||
|
"DateTime": "${receipt_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
<#else>
|
||||||
|
{
|
||||||
|
"Header": {"ProjectID": "${projectRP}"},
|
||||||
|
"ID": {
|
||||||
|
"RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year?trim?json_string}${receipt.receipt_number?trim?json_string}",
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${receipt_creation_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload": {
|
||||||
|
"CreationDateTime": {
|
||||||
|
"DateTime": "${receipt_creation_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
},
|
||||||
|
"OrderID":"${receipt.receipt_reference?trim?json_string}",
|
||||||
|
<#-- Header Metadata inclusion -->
|
||||||
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl">,
|
||||||
|
"ShipFrom":
|
||||||
|
{
|
||||||
|
"ActorID": "${RFXtoRPprefixSupplier(receipt.original_code?trim?json_string)}"
|
||||||
|
},
|
||||||
|
"ShipTo" :
|
||||||
|
{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(receipt.physical_depot_code?trim?json_string)}"
|
||||||
|
},
|
||||||
|
"ShipToAcked": true,
|
||||||
|
<#if receipt.carrier_informations.carrier_code != "">
|
||||||
|
"Carrier":
|
||||||
|
{
|
||||||
|
"ActorID":"${RFXtoRPprefixCarrier(receipt.carrier_informations.carrier_code?trim?json_string)}"
|
||||||
|
},
|
||||||
|
</#if>
|
||||||
|
<#if receipt.line_list??>
|
||||||
|
"Lines" : [
|
||||||
|
<#list receipt.line_list as line>
|
||||||
|
{
|
||||||
|
"LineID": "${line.receipt_line_number}",
|
||||||
|
<#-- Line Metadata inclusion -->
|
||||||
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl">,
|
||||||
|
"RequestedContent":
|
||||||
|
{
|
||||||
|
"Goods":
|
||||||
|
{
|
||||||
|
"ItemID": "${line.item_code?trim?json_string!"0"}",
|
||||||
|
"LVBranchID": "${line.item_lv_code?json_string!"0"}",
|
||||||
|
<#if (line.line_without_detail?? && 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}",
|
||||||
|
<#else>
|
||||||
|
<#if (line.line_detail?? && line.line_detail?size == 1 && line.line_detail[0].priority_date?length != 0) && (line.line_detail[0].priority_date?starts_with("00") == false)>
|
||||||
|
<#assign line_detail_priority_date = line.line_detail[0].priority_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
|
"PriorityDate": "${line_detail_priority_date}",
|
||||||
|
<#else>
|
||||||
|
"PriorityDate": "1970-01-01T00:00:00Z",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
<#-- Segmentation Keys inclusion -->
|
||||||
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl">
|
||||||
|
},
|
||||||
|
"Quantity" :
|
||||||
|
{
|
||||||
|
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||||
|
"Value": "${line.order_quantity_in_lv!0}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
<#sep>,</#sep>
|
||||||
|
</#list>
|
||||||
|
],
|
||||||
|
</#if>
|
||||||
|
"RequestedMilestones" :
|
||||||
|
{
|
||||||
|
"RequestedDeliveryDateTime" :
|
||||||
|
{
|
||||||
|
"DateTime": "${receipt_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
<#break>
|
||||||
|
</#if>
|
||||||
|
</#list>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
]
|
||||||
|
|||||||
@ -47,6 +47,18 @@
|
|||||||
}
|
}
|
||||||
</#if>
|
</#if>
|
||||||
<#else>
|
<#else>
|
||||||
|
{
|
||||||
|
"Header": {"ProjectID": "${projectRP}"},
|
||||||
|
"ID": {
|
||||||
|
"RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year?trim?json_string}${receipt.receipt_number?trim?json_string}",
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${receipt_status_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload": {
|
||||||
|
}
|
||||||
|
}
|
||||||
<#break>
|
<#break>
|
||||||
</#if>
|
</#if>
|
||||||
</#list>
|
</#list>
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.creation_datetime,time_zone_rfx) />
|
<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.creation_datetime,time_zone_rfx) />
|
||||||
|
|
||||||
<#assign refIDHmap_local ={}>
|
<#assign refIDHmap_local ={}>
|
||||||
[
|
[
|
||||||
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
||||||
@ -33,11 +32,7 @@
|
|||||||
{
|
{
|
||||||
"Header": {"ProjectID": "${projectRP}"},
|
"Header": {"ProjectID": "${projectRP}"},
|
||||||
"ID": {
|
"ID": {
|
||||||
<#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="" >
|
"RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year?trim?json_string}${receipt.receipt_number?trim?json_string}",
|
||||||
"RefID": "${receipt.origin_order_line_depot?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt_line.origin_order_line_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
"RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt_line.origin_order_line_reference?trim?json_string}",
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${receipt_status_datetime}",
|
"DateTime": "${receipt_status_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user