Merge branch 'v11-connector-2.0' into 'release/2.0'
v11-connector-2.0 See merge request r-d-technique/tiers/reflex-wms-connector!124
This commit is contained in:
commit
c04c8c581f
15
README.md
15
README.md
@ -1,9 +1,20 @@
|
||||
# Reflex Platform Core FTLs
|
||||
|
||||
## Overview
|
||||
|
||||
The **Reflex WMS Connector** is a set of **FreeMarker templates (FTL)** designed to transform **outgoing JSON flows from Reflex WMS** into **flows compatible with Reflex Platform**.
|
||||
|
||||
These FTL core files aim to translate data flow from Reflex WMS into Reflex platform API.
|
||||
This connector does not contain any standalone executable code: it is intended to be used by **Reflex integration engines** or **data exchange pipelines**, where it applies the mapping rules defined in the `.ftl` files.
|
||||
|
||||
## Role of the FTL Files
|
||||
|
||||
- Each `.ftl` file corresponds to a **flow type** (order, stock, receipt, shipment, etc.).
|
||||
- These templates use the **FreeMarker** syntax to:
|
||||
- Extract the required fields from the WMS source flow.
|
||||
- Apply transformation rules (mapping, conversions, enrichments).
|
||||
- Generate a **final structured JSON** for Reflex Platform.
|
||||
|
||||
You can find more info about those files in the Reflex platform documentation center : https://docs.viz.reflex-platform.com/connectivity/partnerapp/reflex-wms-connector/
|
||||
## Useful Resources
|
||||
|
||||
- [FreeMarker Documentation](https://freemarker.apache.org/docs/index.html)
|
||||
- [Reflex Platform](https://auth.reflex-platform.com/)
|
||||
|
||||
31
RFXtoRP_HliPrepaL.ftl
Normal file
31
RFXtoRP_HliPrepaL.ftl
Normal file
@ -0,0 +1,31 @@
|
||||
<#-- **** input parameters ***** -->
|
||||
<#-- input : message RFX -->
|
||||
<#-- project : projectId in ReflexPlatform -->
|
||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
<#assign organisationRP = organisation>
|
||||
<#include "RFX_PartnerAPP_Settings.ftl">
|
||||
|
||||
<#assign aDateTime = .now>
|
||||
|
||||
<#switch cloudEventMsg.action>
|
||||
<#case "C">
|
||||
<#--<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign preparationOrderLines = JsonUtil.jsonToMap(dataRfx)>
|
||||
<#stop "no generic FTL file available yet for preparationOrderLines">
|
||||
<#break>
|
||||
<#case "D">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign preparationOrderLines = JsonUtil.jsonToMap(dataRfx)>
|
||||
<#stop "no generic FTL file available yet for preparationOrderLines">
|
||||
<#break>
|
||||
<#break>
|
||||
|
||||
<#default>
|
||||
<#stop>
|
||||
</#switch>
|
||||
34
RFXtoRP_HliReceiptLr.ftl
Normal file
34
RFXtoRP_HliReceiptLr.ftl
Normal file
@ -0,0 +1,34 @@
|
||||
<#-- **** input parameters ***** -->
|
||||
<#-- input : message RFX -->
|
||||
<#-- project : projectId in ReflexPlatform -->
|
||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
<#assign organisationRP = organisation>
|
||||
|
||||
<#assign aDateTime = .now>
|
||||
|
||||
<#switch cloudEventMsg.action>
|
||||
<#case "C">
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = CREATE ******************** -->
|
||||
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign receiptLines = JsonUtil.jsonToMap(dataRfx)>
|
||||
|
||||
<#stop "no generic FTL file available yet for receiptLines">
|
||||
<#break>
|
||||
|
||||
<#case "D">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign receiptLines = JsonUtil.jsonToMap(dataRfx)>
|
||||
|
||||
<#stop "no generic FTL file available yet for receiptLines">
|
||||
<#break>
|
||||
|
||||
<#default>
|
||||
<#stop >
|
||||
</#switch>
|
||||
|
||||
32
RFXtoRP_HlrProL.ftl
Normal file
32
RFXtoRP_HlrProL.ftl
Normal file
@ -0,0 +1,32 @@
|
||||
<#-- **** input parameters ***** -->
|
||||
<#-- input : message RFX -->
|
||||
<#-- project : projectId in ReflexPlatform -->
|
||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
<#assign organisationRP = organisation>
|
||||
|
||||
<#assign aDateTime = .now>
|
||||
|
||||
<#switch cloudEventMsg.action>
|
||||
<#case "C">
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign preparationOrderLines = JsonUtil.jsonToMap(dataRfx)>
|
||||
|
||||
<#stop "no generic FTL file available yet for preparationOrderLines">
|
||||
<#break>
|
||||
|
||||
<#case "D">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign preparationOrderLines = JsonUtil.jsonToMap(dataRfx)>
|
||||
|
||||
<#stop "no generic FTL file available yet for preparationOrderLines">
|
||||
<#break>
|
||||
<#default>
|
||||
<#stop >
|
||||
</#switch>
|
||||
|
||||
@ -17,7 +17,6 @@
|
||||
<#assign dispute = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
<#if dispute.dispute_closed == true >
|
||||
<#if ((dispute.dispute_type_code=="030" || dispute.dispute_type_code=="070") && dispute.dispute_reception?? && dispute.dispute_reception.reception_reference!="") || (dispute.dispute_type_code=="050" && dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string!="")>
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimCreated>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
@ -35,9 +34,6 @@
|
||||
<#else>
|
||||
<#stop>
|
||||
</#if>
|
||||
<#else>
|
||||
<#stop "Reference is empty">
|
||||
</#if>
|
||||
</#if>
|
||||
]
|
||||
<#break>
|
||||
|
||||
@ -43,17 +43,32 @@
|
||||
<#include "RFXtoRP_HsaDispute_ClaimMetadata.ftl">,
|
||||
<#-- To configure -->
|
||||
<#include "RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl">
|
||||
<#if dispute.dispute_type_code=="050" >
|
||||
"EntityID":"${dispute.dispute_preparation.preparation_order_list[0].preparation_order_physical_depot_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_activity_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string}",
|
||||
"DisplayID":"${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string}",
|
||||
<#if dispute.dispute_type_code=="050" > <#-- Preparation -->
|
||||
<#if dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?? && dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference!="">
|
||||
"EntityID":"${dispute.dispute_preparation.preparation_order_list[0].preparation_order_physical_depot_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_activity_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string}",
|
||||
"DisplayID":"${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string}",
|
||||
<#else>
|
||||
"EntityID":"O${dispute.dispute_preparation.preparation_order_list[0].preparation_order_physical_depot_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_activity_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_year_number?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_number?trim?json_string}",
|
||||
"DisplayID":"O${dispute.dispute_preparation.preparation_order_list[0].preparation_order_physical_depot_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_activity_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_year_number?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_number?trim?json_string}",
|
||||
</#if>
|
||||
<#else>
|
||||
<#if dispute.dispute_type_code=="030" || dispute.dispute_type_code=="070" >
|
||||
<#if dispute.dispute_reception.reception_type_code=="030">
|
||||
"EntityID":"${dispute.dispute_reception.reception_supplier.supplier_transfer_physical_depot?json_string}${dispute.dispute_reception.reception_supplier.supplier_activity_code?json_string}${dispute.dispute_reception.reception_contractor_code?json_string}${dispute.dispute_reception.reception_reference?json_string}",
|
||||
"DisplayID":"${dispute.dispute_reception.reception_reference?json_string}",
|
||||
<#if dispute.dispute_reception.reception_type_code=="030"> <#-- Receipt transfer type -->
|
||||
<#if dispute.dispute_reception.reception_supplier.supplier_transfer_physical_depot?? && dispute.dispute_reception.reception_supplier.supplier_transfer_physical_depot!="" >
|
||||
"EntityID":"${dispute.dispute_reception.reception_supplier.supplier_transfer_physical_depot?json_string}${dispute.dispute_reception.reception_supplier.supplier_activity_code?json_string}${dispute.dispute_reception.reception_contractor_code?json_string}${dispute.dispute_reception.reception_reference?json_string}",
|
||||
"DisplayID":"${dispute.dispute_reception.reception_reference?json_string}",
|
||||
<#else>
|
||||
<#if dispute.dispute_reception.reception_reference?? && dispute.dispute_reception.reception_reference!="">
|
||||
"EntityID":"R${dispute.dispute_reception.reception_physical_depot_code?json_string}${dispute.dispute_reception.reception_activity_code?json_string}${dispute.dispute_reception.reception_contractor_code?json_string}${dispute.dispute_reception.reception_year_number?json_string}${dispute.dispute_reception.reception_number?json_string}",
|
||||
"DisplayID":"${dispute.dispute_reception.reception_reference?json_string}",
|
||||
<#else>
|
||||
"EntityID":"R${dispute.dispute_reception.reception_physical_depot_code?json_string}${dispute.dispute_reception.reception_activity_code?json_string}${dispute.dispute_reception.reception_contractor_code?json_string}${dispute.dispute_reception.reception_year_number?json_string}${dispute.dispute_reception.reception_number?json_string}",
|
||||
"DisplayID":"R${dispute.dispute_reception.reception_physical_depot_code?json_string}${dispute.dispute_reception.reception_activity_code?json_string}${dispute.dispute_reception.reception_contractor_code?json_string}${dispute.dispute_reception.reception_year_number?json_string}${dispute.dispute_reception.reception_number?json_string}",
|
||||
</#if>
|
||||
</#if>
|
||||
<#else>
|
||||
<#if dispute.dispute_reception.reception_type_code=="010" || dispute.dispute_reception.reception_type_code=="020" >
|
||||
"EntityID":"${dispute.dispute_reception.reception_physical_depot_code?json_string}${dispute.dispute_reception.reception_activity_code?json_string}${dispute.dispute_reception.reception_contractor_code?json_string}${dispute.dispute_reception.reception_reference?json_string}",
|
||||
"EntityID":"R${dispute.dispute_reception.reception_physical_depot_code?json_string}${dispute.dispute_reception.reception_activity_code?json_string}${dispute.dispute_reception.reception_contractor_code?json_string}${dispute.dispute_reception.reception_year_number?json_string}${dispute.dispute_reception.reception_number?json_string}",
|
||||
"DisplayID":"${dispute.dispute_reception.reception_reference?json_string}",
|
||||
<#else>
|
||||
<#stop "WMS type code not supported">
|
||||
|
||||
@ -47,7 +47,6 @@
|
||||
<#if (reflexMvtStockInterface.ipg_move_type == "100" ||
|
||||
reflexMvtStockInterface.ipg_move_type == "110" ||
|
||||
reflexMvtStockInterface.ipg_move_type == "120") >
|
||||
<#if reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!="">
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsReceived>
|
||||
@ -56,10 +55,6 @@
|
||||
<#include "RFXtoRP_HsaIpgMove_GoodsReceived.ftl">
|
||||
}
|
||||
]
|
||||
<#else>
|
||||
<#-- Case of IPG move type volontarilly ignored-->
|
||||
<#stop " Reference receipt is empty">
|
||||
</#if>
|
||||
<#else>
|
||||
<#stop>
|
||||
</#if>
|
||||
|
||||
@ -26,19 +26,36 @@
|
||||
<#else>
|
||||
"PriorityDate": "1970-01-01T00:00:00Z",
|
||||
</#if>
|
||||
|
||||
<#-- Goods received Segmentation Keys inclusion -->
|
||||
<#include "RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl">
|
||||
},
|
||||
|
||||
<#if reflexMvtStockInterface.receipt_reference!="">
|
||||
"ExecutionflowID": "${reflexMvtStockInterface.original_receipt_physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_reference?trim?json_string}",
|
||||
"OrderID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}",
|
||||
<#if reflexMvtStockInterface.ipg_move_type?? & reflexMvtStockInterface.ipg_move_type=="120"> <#-- if it is a transfer-type movement -->
|
||||
<#if reflexMvtStockInterface.origin_order_line_reference?? && reflexMvtStockInterface.origin_order_line_reference!="">
|
||||
"ExecutionflowID": "${reflexMvtStockInterface.original_receipt_physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.origin_order_line_reference?trim?json_string}",
|
||||
"OrderID": "${reflexMvtStockInterface.origin_order_line_reference?trim?json_string}",
|
||||
<#else>
|
||||
<#if reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!="">
|
||||
"ExecutionflowID": "${reflexMvtStockInterface.original_receipt_physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_reference?trim?json_string}",
|
||||
"OrderID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}",
|
||||
<#else>
|
||||
"ExecutionflowID": "R${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_year_number}${reflexMvtStockInterface.receipt_number}",
|
||||
"OrderID": "R${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_year_number}${reflexMvtStockInterface.receipt_number}",
|
||||
</#if>
|
||||
</#if>
|
||||
<#else>
|
||||
"ExecutionflowID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}",
|
||||
"OrderID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}",
|
||||
<#if reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!="">
|
||||
"ExecutionflowID": "R${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_year_number}${reflexMvtStockInterface.receipt_number}",
|
||||
"OrderID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}",
|
||||
<#else>
|
||||
"ExecutionflowID": "R${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_year_number}${reflexMvtStockInterface.receipt_number}",
|
||||
"OrderID": "R${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_year_number}${reflexMvtStockInterface.receipt_number}",
|
||||
</#if>
|
||||
</#if>
|
||||
<#if reflexMvtStockInterface.origin_order_line_number_reference?? && reflexMvtStockInterface.origin_order_line_number_reference!=0>
|
||||
"LineID": "${reflexMvtStockInterface.origin_order_line_number_reference}",
|
||||
<#else>
|
||||
"LineID": "${reflexMvtStockInterface.receipt_line_number}",
|
||||
</#if>
|
||||
"LineID": "${reflexMvtStockInterface.receipt_line_number}",
|
||||
"ActorID": "${RFXtoRPprefixDepot(reflexMvtStockInterface.physical_depot_code?trim?json_string)}",
|
||||
"Quantity": {
|
||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||
|
||||
@ -24,7 +24,8 @@
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaItm_ItemCreated.ftl">
|
||||
<#else>
|
||||
<#stop "no LV for the item">
|
||||
<#-- "no LV for the item"-->
|
||||
<#stop>
|
||||
</#if>
|
||||
}
|
||||
]
|
||||
|
||||
@ -17,7 +17,6 @@
|
||||
<#assign preparationStatusInterface = JsonUtil.jsonToMap(dataRfx) />
|
||||
[
|
||||
<#--**Pick batch runned (200) **-->
|
||||
<#if preparationStatusInterface.preparation_order_originator_reference?? && preparationStatusInterface.preparation_order_originator_reference!="">
|
||||
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "200" >
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationExpected>
|
||||
@ -64,9 +63,6 @@
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
<#else>
|
||||
<#stop "PRO reference is empty">
|
||||
</#if>
|
||||
]
|
||||
<#break>
|
||||
|
||||
|
||||
@ -8,7 +8,11 @@
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"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}",
|
||||
<#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}",
|
||||
<#else>
|
||||
"RefID": "O${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}",
|
||||
</#if>
|
||||
"RefDate": {
|
||||
"DateTime": "${preparation_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
|
||||
@ -7,7 +7,11 @@
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"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}",
|
||||
<#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}",
|
||||
<#else>
|
||||
"RefID": "O${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}",
|
||||
</#if>
|
||||
"RefDate": {
|
||||
"DateTime": "${preparation_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
|
||||
@ -7,7 +7,11 @@
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"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}",
|
||||
<#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}",
|
||||
<#else>
|
||||
"RefID": "O${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}",
|
||||
</#if>
|
||||
"RefDate": {
|
||||
"DateTime": "${preparation_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
|
||||
@ -7,7 +7,11 @@
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"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}",
|
||||
<#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}",
|
||||
<#else>
|
||||
"RefID": "O${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}",
|
||||
</#if>
|
||||
"RefDate": {
|
||||
"DateTime": "${preparation_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
|
||||
@ -7,7 +7,11 @@
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"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}",
|
||||
<#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}",
|
||||
<#else>
|
||||
"RefID": "O${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}",
|
||||
</#if>
|
||||
"RefDate": {
|
||||
"DateTime": "${preparation_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
|
||||
32
RFXtoRP_HsrPackBranch.ftl
Normal file
32
RFXtoRP_HsrPackBranch.ftl
Normal file
@ -0,0 +1,32 @@
|
||||
<#-- **** input parameters ***** -->
|
||||
<#-- input : message RFX -->
|
||||
<#-- project : projectId in ReflexPlatform -->
|
||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
<#assign organisationRP = organisation>
|
||||
|
||||
<#assign aDateTime = .now>
|
||||
|
||||
<#switch cloudEventMsg.action>
|
||||
<#case "C">
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign packBranch = JsonUtil.jsonToMap(dataRfx)>
|
||||
|
||||
<#stop "no generic FTL file available yet for Pack Branch">
|
||||
<#break>
|
||||
|
||||
<#case "D">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign packBranch = JsonUtil.jsonToMap(dataRfx)>
|
||||
|
||||
<#stop "no generic FTL file available yet for Pack Branch">
|
||||
<#break>
|
||||
<#default>
|
||||
<#stop >
|
||||
</#switch>
|
||||
|
||||
32
RFXtoRP_HsrPackOrder.ftl
Normal file
32
RFXtoRP_HsrPackOrder.ftl
Normal file
@ -0,0 +1,32 @@
|
||||
<#-- **** input parameters ***** -->
|
||||
<#-- input : message RFX -->
|
||||
<#-- project : projectId in ReflexPlatform -->
|
||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
<#assign organisationRP = organisation>
|
||||
|
||||
<#assign aDateTime = .now>
|
||||
|
||||
<#switch cloudEventMsg.action>
|
||||
<#case "C">
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign packOrder = JsonUtil.jsonToMap(dataRfx)>
|
||||
|
||||
<#stop "no generic FTL file available yet for Pack Order">
|
||||
<#break>
|
||||
|
||||
<#case "D">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign packOrder = JsonUtil.jsonToMap(dataRfx)>
|
||||
|
||||
<#stop "no generic FTL file available yet for Pack Order">
|
||||
<#break>
|
||||
<#default>
|
||||
<#stop >
|
||||
</#switch>
|
||||
|
||||
@ -17,80 +17,91 @@
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign preparationOrder = JsonUtil.jsonToMap(dataRfx)>
|
||||
|
||||
<#if preparationOrder.total_lv_validated !=0>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsPrepared>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl">
|
||||
},
|
||||
{
|
||||
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl">
|
||||
}
|
||||
|
||||
<#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="">
|
||||
,
|
||||
<#if preparationOrder.total_lv_validated?? && preparationOrder.total_lv_validated !=0>
|
||||
<#if preparationOrder.preparation_type_code=="010" || preparationOrder.preparation_type_code=="030">
|
||||
<#if preparationOrder.preparation_line_lst??>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCarrierUpdated>
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsPrepared>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPrepa_CarrierUpdated.ftl">
|
||||
}
|
||||
</#if>
|
||||
|
||||
<#assign refIDHmap ={}>
|
||||
<#assign hd_numberHmap ={}>
|
||||
<#assign hd_numberHmapHUadded ={}>
|
||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") as preparation_line>
|
||||
<#list preparation_line.despatched_ipg_list as despatched_ipg>
|
||||
<#assign HUadded_packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) />
|
||||
<#if !hd_numberHmap[despatched_ipg.hd_number]?? && (trackingNumberSource==2 || trackingNumberSource==3 || (despatched_ipg.consignment_unit_id!="" && trackingNumberSource==1))>
|
||||
<#assign hd_numberHmap += {despatched_ipg.hd_number,despatched_ipg.hd_number}>
|
||||
,
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl">
|
||||
}
|
||||
</#if>
|
||||
<#if despatched_ipg.carton_number != "000000000000000000" && despatched_ipg.carton_number!=despatched_ipg.hd_number >
|
||||
,
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitHUsAdded>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPrepa_HandlingunitHUsAdded.ftl">
|
||||
<#include "RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl">
|
||||
},
|
||||
{
|
||||
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl">
|
||||
<#include "RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl">
|
||||
}
|
||||
<#if !hd_numberHmapHUadded[despatched_ipg.hd_number]?? && (trackingNumberSource==2 || trackingNumberSource==3 )>
|
||||
<#assign hd_numberHmapHUadded += {despatched_ipg.hd_number,despatched_ipg.hd_number}>
|
||||
,
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPrepa_HUsAdded_TrackingHuLabelled.ftl">
|
||||
}
|
||||
</#if>
|
||||
|
||||
</#if>
|
||||
<#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="">
|
||||
,
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCarrierUpdated>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPrepa_CarrierUpdated.ftl">
|
||||
}
|
||||
</#if>
|
||||
|
||||
<#assign refIDHmap ={}>
|
||||
<#assign hd_numberHmap ={}>
|
||||
<#assign hd_numberHmapHUadded ={}>
|
||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? ) as preparation_line>
|
||||
<#list preparation_line.despatched_ipg_list as despatched_ipg>
|
||||
<#assign HUadded_packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) />
|
||||
<#if !hd_numberHmap[despatched_ipg.hd_number]?? && (trackingNumberSource==2 || trackingNumberSource==3 || (despatched_ipg.consignment_unit_id!="" && trackingNumberSource==1))>
|
||||
<#assign hd_numberHmap += {despatched_ipg.hd_number,despatched_ipg.hd_number}>
|
||||
,
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl">
|
||||
}
|
||||
</#if>
|
||||
<#if despatched_ipg.carton_number != "000000000000000000" && despatched_ipg.carton_number!=despatched_ipg.hd_number >
|
||||
,
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitHUsAdded>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPrepa_HandlingunitHUsAdded.ftl">
|
||||
},
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl">
|
||||
}
|
||||
<#if !hd_numberHmapHUadded[despatched_ipg.hd_number]?? && (trackingNumberSource==2 || trackingNumberSource==3 )>
|
||||
<#assign hd_numberHmapHUadded += {despatched_ipg.hd_number,despatched_ipg.hd_number}>
|
||||
,
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPrepa_HUsAdded_TrackingHuLabelled.ftl">
|
||||
}
|
||||
</#if>
|
||||
|
||||
</#if>
|
||||
</#list>
|
||||
</#list>
|
||||
</#list>
|
||||
<#assign refIDHmap ={}>
|
||||
]
|
||||
<#assign refIDHmap ={}>
|
||||
]
|
||||
<#else>
|
||||
<#-- No line-->
|
||||
<#stop>
|
||||
</#if>
|
||||
<#else>
|
||||
<#-- Preparation Type not supported-->
|
||||
<#stop>
|
||||
</#if>
|
||||
<#else>
|
||||
<#stop "no confirmed quantity for the preparation - preparation closed">
|
||||
<#-- no confirmed quantity for the preparation - preparation closed-->
|
||||
<#stop>
|
||||
</#if>
|
||||
|
||||
|
||||
|
||||
@ -3,8 +3,12 @@
|
||||
<#include "ActorPrefix.ftl">
|
||||
[
|
||||
<#assign refIDHmap_local ={}>
|
||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.preparation_order_originator_reference!="") as preparation_line>
|
||||
<#assign OrderOriginReference = preparation_line.preparation_order_originator_reference?trim?json_string>
|
||||
<#list preparationOrder.preparation_line_lst as preparation_line>
|
||||
<#if preparation_line.preparation_order_originator_reference?? && preparation_line.preparation_order_originator_reference!="">
|
||||
<#assign OrderOriginReference = "${preparation_line.pro_physical_depot_code?trim?json_string}${preparationOrder.activity_code?trim?json_string}${preparation_line.pro_originator_code?trim?json_string}${preparation_line.preparation_order_originator_reference?trim?json_string}">
|
||||
<#else>
|
||||
<#assign OrderOriginReference = "O${preparation_line.pro_physical_depot_code?trim?json_string}${preparationOrder.activity_code?trim?json_string}${preparation_line.pro_originator_code?trim?json_string}${preparation_line.pro_year}${preparation_line.pro_number}">
|
||||
</#if>
|
||||
<#if !refIDHmap_local[OrderOriginReference]?? >
|
||||
<#if refIDHmap_local?size != 0 >
|
||||
,
|
||||
@ -15,7 +19,7 @@
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID":{
|
||||
"RefID": "${preparation_line.pro_physical_depot_code?trim?json_string}${preparationOrder.activity_code?trim?json_string}${preparation_line.pro_originator_code?trim?json_string}${preparation_line.preparation_order_originator_reference?trim?json_string}"
|
||||
"RefID": "${OrderOriginReference}"
|
||||
},
|
||||
"Payload":{
|
||||
"Carrier": {
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
[
|
||||
<#assign dispatched_datetime = RfxDateTimetoUTCWithTimezone(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_rfx) />
|
||||
<#assign refIDHmap_local ={}>
|
||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.despatched_ipg_list?size != 0 && l.preparation_order_originator_reference!="") as preparation_line>
|
||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.despatched_ipg_list?size != 0) as preparation_line>
|
||||
<#list preparation_line.despatched_ipg_list as despatched_ipg>
|
||||
<#if !refIDHmap_local[despatched_ipg.hd_number]?? >
|
||||
<#if refIDHmap_local?size != 0 >
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ActorPrefix.ftl">
|
||||
[
|
||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.despatched_ipg_list?size != 0 && l.preparation_order_originator_reference!="") as preparation_line>
|
||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.despatched_ipg_list?size != 0 ) as preparation_line>
|
||||
<#list preparation_line.despatched_ipg_list as despatched_ipg>
|
||||
<#assign packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) />
|
||||
{
|
||||
@ -112,8 +112,14 @@
|
||||
<#-- Segmentation Keys inclusion -->
|
||||
<#include "RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl">
|
||||
},
|
||||
"OrderID": "${preparation_line.preparation_order_originator_reference?trim?json_string}",
|
||||
"ExecutionflowID": "${preparation_line.pro_physical_depot_code?trim?json_string}${preparationOrder.activity_code?trim?json_string}${preparation_line.pro_originator_code?trim?json_string}${preparation_line.preparation_order_originator_reference?trim?json_string}",
|
||||
<#if preparation_line.preparation_order_originator_reference?? && preparation_line.preparation_order_originator_reference!="">
|
||||
"OrderID": "${preparation_line.preparation_order_originator_reference?trim?json_string}",
|
||||
"ExecutionflowID": "${preparation_line.pro_physical_depot_code?trim?json_string}${preparationOrder.activity_code?trim?json_string}${preparation_line.pro_originator_code?trim?json_string}${preparation_line.preparation_order_originator_reference?trim?json_string}",
|
||||
<#else>
|
||||
"OrderID": "O${preparation_line.pro_physical_depot_code?trim?json_string}${preparationOrder.activity_code?trim?json_string}${preparation_line.pro_originator_code?trim?json_string}${preparation_line.pro_year}${preparation_line.pro_number}",
|
||||
"ExecutionflowID": "O${preparation_line.pro_physical_depot_code?trim?json_string}${preparationOrder.activity_code?trim?json_string}${preparation_line.pro_originator_code?trim?json_string}${preparation_line.pro_year}${preparation_line.pro_number}",
|
||||
</#if>
|
||||
|
||||
<#if (preparation_line.pro_originator_reference_line_number!0) != 0>
|
||||
"LineID": "${preparation_line.pro_originator_reference_line_number}",
|
||||
<#else>
|
||||
|
||||
@ -16,30 +16,23 @@
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
|
||||
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
|
||||
<#-- check preparation type code (internal order and reservation are ignored) -->
|
||||
<#if preparation_order.preparation_type_code == "010" || preparation_order.preparation_type_code == "030">
|
||||
<#-- Only if preparation order not confirmed -->
|
||||
<#if preparation_order.preparation_order_confirmed == "false" >
|
||||
<#if preparation_order.line_list??>
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl">
|
||||
}
|
||||
<#else>
|
||||
<#-- preparation order already confirmed -->
|
||||
<#stop>
|
||||
</#if>
|
||||
|
||||
<#else>
|
||||
<#-- No line -->
|
||||
<#stop>
|
||||
</#if>
|
||||
<#else>
|
||||
<#-- preparation order type not supported -->
|
||||
<#stop>
|
||||
<#-- Preparation order type not supported -->
|
||||
<#stop>
|
||||
</#if>
|
||||
<#else>
|
||||
<#stop "PRO reference is empty">
|
||||
</#if>
|
||||
]
|
||||
<#break>
|
||||
|
||||
@ -48,20 +41,24 @@
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPro_ExecutionflowCancelled.ftl">
|
||||
}
|
||||
<#if preparation_order.preparation_type_code == "010" || preparation_order.preparation_type_code == "030" >
|
||||
<#if preparation_order.line_list??>
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPro_ExecutionflowCancelled.ftl">
|
||||
}
|
||||
<#else>
|
||||
<#-- No line -->
|
||||
<#stop>
|
||||
</#if>
|
||||
<#else>
|
||||
<#stop "PRO reference is empty">
|
||||
<#-- Preparation order type not supported -->
|
||||
<#stop>
|
||||
</#if>
|
||||
]
|
||||
<#break>
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop >
|
||||
</#switch>
|
||||
|
||||
@ -7,7 +7,11 @@
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"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}",
|
||||
<#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}",
|
||||
<#else>
|
||||
"RefID": "O${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>
|
||||
"RefDate": {
|
||||
"DateTime": "${preparation_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
|
||||
@ -9,7 +9,11 @@
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"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}",
|
||||
<#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}",
|
||||
<#else>
|
||||
"RefID": "O${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>
|
||||
"RefDate": {
|
||||
"DateTime": "${pro_creation_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
@ -31,43 +35,51 @@
|
||||
},
|
||||
"ShipFromAcked": true,
|
||||
"ShipTo": {
|
||||
<#if preparation_order.intermediate_consignee_code?? && preparation_order.intermediate_consignee_code!="">
|
||||
"ActorID": "${RFXtoRPprefixDepot(preparation_order.intermediate_consignee_code?json_string)}"
|
||||
<#if preparation_order.preparation_type_code == "030" && preparation_order.optional_attributes.intermediate_consignee_transfer_physical_depot?? && preparation_order.optional_attributes.intermediate_consignee_transfer_physical_depot!="" && preparation_order.optional_attributes.transfer_intermediate_consignee=="true">
|
||||
"ActorID": "${RFXtoRPprefixDepot(preparation_order.optional_attributes.intermediate_consignee_transfer_physical_depot?json_string)}"
|
||||
<#else>
|
||||
<#if preparation_order.address.address_type_code == "" &&
|
||||
preparation_order.address.name_or_company_name == "" &&
|
||||
preparation_order.address.additional_address_data_1 == "" &&
|
||||
preparation_order.address.additional_address_data_2 == "" &&
|
||||
preparation_order.address.post_code_area_name == "" &&
|
||||
preparation_order.address.territorial_division_code == "" &&
|
||||
preparation_order.address.postal_code == "" &&
|
||||
preparation_order.address.iso_country_code == "">
|
||||
"ActorID": "${RFXtoRPprefixConsignee(preparation_order.end_consignee_code?json_string)}"
|
||||
<#if preparation_order.preparation_type_code == "030">
|
||||
"ActorID": "${RFXtoRPprefixDepot(preparation_order.end_consignee_code?json_string)}"
|
||||
<#else>
|
||||
"Actor":
|
||||
{
|
||||
"Name" : "${(preparation_order.address.name_or_company_name!"")?json_string}",
|
||||
"Address" :
|
||||
{
|
||||
"City" : "${(preparation_order.address.post_code_area_name!"")?json_string}",
|
||||
"CountryCode" : "${preparation_order.address.iso_country_code!""}",
|
||||
"PostalCode" : "${preparation_order.address.postal_code!""}",
|
||||
"StreetAddressOne" : "${(preparation_order.address.street_and_number_and_po_box!"")?json_string}",
|
||||
"StreetAddressTwo" : "${(preparation_order.address.additional_address_data_1!"")?json_string}",
|
||||
"StreetAddressThree" : "${(preparation_order.address.additional_address_data_2!"")?json_string}"
|
||||
}
|
||||
},
|
||||
"Contact" :
|
||||
{
|
||||
"FirstName" : "${(preparation_order.address.first_name!"")?json_string}",
|
||||
"LastName" : "${(preparation_order.address.last_name!"")?json_string}",
|
||||
"Emails" : ${splitEmailsIntoArray((preparation_order.address.mail_address!"")?json_string)},
|
||||
"Phones" : ["${(preparation_order.address.mobile_phone_number!"")?json_string}","${(preparation_order.address.land_line_phone_number!"")?json_string}", "${(preparation_order.address.fax_number!"")?json_string}" ]
|
||||
}
|
||||
<#if preparation_order.address.address_type_code == "" &&
|
||||
preparation_order.address.name_or_company_name == "" &&
|
||||
preparation_order.address.additional_address_data_1 == "" &&
|
||||
preparation_order.address.additional_address_data_2 == "" &&
|
||||
preparation_order.address.post_code_area_name == "" &&
|
||||
preparation_order.address.territorial_division_code == "" &&
|
||||
preparation_order.address.postal_code == "" &&
|
||||
preparation_order.address.iso_country_code == "">
|
||||
"ActorID": "${RFXtoRPprefixConsignee(preparation_order.end_consignee_code?json_string)}"
|
||||
<#else>
|
||||
"Actor":
|
||||
{
|
||||
"Name" : "${(preparation_order.address.name_or_company_name!"")?json_string}",
|
||||
"Address" :
|
||||
{
|
||||
"City" : "${(preparation_order.address.post_code_area_name!"")?json_string}",
|
||||
"CountryCode" : "${preparation_order.address.iso_country_code!""}",
|
||||
"PostalCode" : "${preparation_order.address.postal_code!""}",
|
||||
"StreetAddressOne" : "${(preparation_order.address.street_and_number_and_po_box!"")?json_string}",
|
||||
"StreetAddressTwo" : "${(preparation_order.address.additional_address_data_1!"")?json_string}",
|
||||
"StreetAddressThree" : "${(preparation_order.address.additional_address_data_2!"")?json_string}"
|
||||
}
|
||||
},
|
||||
"Contact" :
|
||||
{
|
||||
"FirstName" : "${(preparation_order.address.first_name!"")?json_string}",
|
||||
"LastName" : "${(preparation_order.address.last_name!"")?json_string}",
|
||||
"Emails" : ${splitEmailsIntoArray((preparation_order.address.mail_address!"")?json_string)},
|
||||
"Phones" : ["${(preparation_order.address.mobile_phone_number!"")?json_string}","${(preparation_order.address.land_line_phone_number!"")?json_string}", "${(preparation_order.address.fax_number!"")?json_string}" ]
|
||||
}
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
},
|
||||
"OrderID":"${preparation_order.originator_reference?trim?json_string}",
|
||||
},
|
||||
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
|
||||
"OrderID": "${preparation_order.originator_reference?trim?json_string}",
|
||||
<#else>
|
||||
"OrderID": "O${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 preparation_order.line_list??>
|
||||
"Lines" : [
|
||||
<#list preparation_order.line_list as preparation_order_line >
|
||||
|
||||
@ -15,103 +15,126 @@
|
||||
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
||||
<#if receipt.receipt_reference ?? && receipt.receipt_reference!="">
|
||||
<#if receipt.receipt_type = "030">
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl">
|
||||
<#if receipt.receipt_type?? && receipt.receipt_type = "030" && receipt.line_list??> <#-- if reception is a transfer type -->
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl">
|
||||
|
||||
},
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrReceiptList_TransfertReceiptExpected.ftl">
|
||||
},
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrReceiptList_TransfertReceiptExpected.ftl">
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
<#else>
|
||||
<#if receipt.line_list ??>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl">
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl">
|
||||
|
||||
},
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
|
||||
},
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
<#else>
|
||||
<#stop>
|
||||
</#if>
|
||||
</#if>
|
||||
<#else>
|
||||
<#stop "Receipt reference is empty">
|
||||
</#if>
|
||||
<#break>
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
||||
<#if receipt.receipt_type == "030" && receipt.receipt_confirmed == "true" && receipt.confirmation_total_level_1==0 && receipt.confirmation_total_level_2==0 && receipt.confirmation_total_level_3==0>
|
||||
<#if receipt.receipt_type?? && receipt.receipt_type == "030" && receipt.receipt_confirmed == "true" && receipt.confirmation_total_level_1==0 && receipt.confirmation_total_level_2==0 && receipt.confirmation_total_level_3==0>
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrReceiptList_TransfertExecutionflowCancelled.ftl">
|
||||
}
|
||||
<#else>
|
||||
<#if receipt.receipt_type == "030" && receipt.receipt_confirmed == "true">
|
||||
<#else>
|
||||
<#if receipt.receipt_type?? && receipt.receipt_type == "030" && receipt.receipt_confirmed == "true">
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrReceiptList_TransfertExecutionflowReceiptCompleted.ftl">
|
||||
}
|
||||
<#else>
|
||||
<#if receipt.receipt_confirmed == "true" && receipt.confirmation_total_level_1==0 && receipt.confirmation_total_level_2==0 && receipt.confirmation_total_level_3==0>
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl">
|
||||
}
|
||||
<#else>
|
||||
<#if receipt.receipt_confirmed == "true" >
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl">
|
||||
}
|
||||
<#else>
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||
<#if receipt.receipt_confirmed?? && receipt.receipt_confirmed == "true" && receipt.confirmation_total_level_1==0 && receipt.confirmation_total_level_2==0 && receipt.confirmation_total_level_3==0>
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl">
|
||||
},
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
|
||||
}
|
||||
</#if>
|
||||
</#if>
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl">
|
||||
}
|
||||
<#else>
|
||||
<#if receipt.receipt_confirmed ?? && receipt.receipt_confirmed == "true" >
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl">
|
||||
}
|
||||
<#else>
|
||||
<#if receipt.receipt_type?? && receipt.receipt_type == "030" && receipt.receipt_confirmed == "false" && receipt.line_list??>
|
||||
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl">
|
||||
|
||||
},
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrReceiptList_TransfertReceiptExpected.ftl">
|
||||
|
||||
}
|
||||
]
|
||||
<#else>
|
||||
<#stop> <#-- Receipt reference for transfer is empty-->
|
||||
</#if>
|
||||
<#else>
|
||||
<#if receipt.line_list ??>
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl">
|
||||
},
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
|
||||
}
|
||||
<#else>
|
||||
<#stop>
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
<#else>
|
||||
<#stop "Receipt reference is empty">
|
||||
</#if>
|
||||
</#if>
|
||||
]
|
||||
<#break>
|
||||
|
||||
@ -119,8 +142,8 @@
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
||||
<#if receipt.line_list ??>
|
||||
[
|
||||
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
||||
{
|
||||
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||
@ -128,10 +151,10 @@
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl">
|
||||
}
|
||||
<#else>
|
||||
<#stop "Receipt reference is empty">
|
||||
</#if>
|
||||
]
|
||||
<#else>
|
||||
<#stop> <#-- No line-->
|
||||
</#if>
|
||||
<#break>
|
||||
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
"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_reference?trim?json_string}",
|
||||
"RefID": "R${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}",
|
||||
"RefDate": {
|
||||
"DateTime": "${receipt_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
"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_reference?trim?json_string}",
|
||||
"RefID": "R${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}",
|
||||
"RefDate": {
|
||||
"DateTime": "${receipt_creation_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
@ -37,8 +37,11 @@
|
||||
"ActorID": "${RFXtoRPprefixDepot(receipt.physical_depot_code?trim?json_string)}"
|
||||
},
|
||||
"ShipToAcked": true,
|
||||
"OrderID":"${receipt.receipt_reference?trim?json_string}",
|
||||
|
||||
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
||||
"OrderID":"${receipt.receipt_reference?trim?json_string}",
|
||||
<#else>
|
||||
"OrderID":"R${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}",
|
||||
</#if>
|
||||
<#if receipt.carrier_informations.carrier_code != "">
|
||||
"Carrier":
|
||||
{
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
"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_reference?trim?json_string}",
|
||||
"RefID": "R${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}",
|
||||
"RefDate": {
|
||||
"DateTime": "${receipt_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
|
||||
@ -8,8 +8,8 @@
|
||||
"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_reference?trim?json_string}",
|
||||
"RefDate": {
|
||||
"RefID": "R${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}",
|
||||
"RefDate": {
|
||||
"DateTime": "${receipt_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
|
||||
@ -1,24 +1,67 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.modification_datetime,time_zone_rfx) />
|
||||
|
||||
<#assign refIDHmap_local ={}>
|
||||
[
|
||||
{
|
||||
"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.receipt_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.receipt_reference?trim?json_string}",
|
||||
</#if>
|
||||
"RefDate": {
|
||||
"DateTime": "${receipt_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
<#if receipt.receipt_reference?? && receipt.receipt_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.receipt_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.receipt_reference?trim?json_string}",
|
||||
</#if>
|
||||
"RefDate": {
|
||||
"DateTime": "${receipt_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
"Payload": {
|
||||
}
|
||||
},
|
||||
"Payload": {
|
||||
}
|
||||
}
|
||||
<#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_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
"Payload": {
|
||||
}
|
||||
}
|
||||
</#if>
|
||||
<#else>
|
||||
{
|
||||
"Header": {"ProjectID": "${projectRP}"},
|
||||
"ID": {
|
||||
"RefID": "R${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>
|
||||
</#if>
|
||||
</#list>
|
||||
</#if>
|
||||
</#if>
|
||||
]
|
||||
|
||||
@ -1,98 +1,278 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ReflexUtils.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 ={}>
|
||||
[
|
||||
{
|
||||
<#assign receipt_datetime = RfxDateTimetoUTCWithTimezone(receipt.receipt_datetime,time_zone_rfx) />
|
||||
<#assign receipt_creation_datetime = RfxDateTimetoUTCWithTimezone(receipt.creation_datetime,time_zone_rfx) />
|
||||
"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.receipt_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.receipt_reference?trim?json_string}",
|
||||
</#if>
|
||||
"RefDate": {
|
||||
"DateTime": "${receipt_creation_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
"Payload": {
|
||||
"CreationDateTime": {
|
||||
"DateTime": "${receipt_creation_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
},
|
||||
<#if receipt.receipt_reference?? && receipt.receipt_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.receipt_reference?trim?json_string}",
|
||||
<#else>
|
||||
"RefID": "R${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}",
|
||||
</#if>
|
||||
"RefDate": {
|
||||
"DateTime": "${receipt_creation_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
"Payload": {
|
||||
"CreationDateTime": {
|
||||
"DateTime": "${receipt_creation_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
},
|
||||
<#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="">
|
||||
"OrderID": "${receipt.receipt_reference?trim?json_string}",
|
||||
<#else>
|
||||
"OrderID": "R${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}",
|
||||
</#if>
|
||||
"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":
|
||||
<#-- Header Metadata inclusion -->
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl">,
|
||||
"ShipFrom":
|
||||
{
|
||||
"ActorID":"${RFXtoRPprefixCarrier(receipt.carrier_informations.carrier_code?trim?json_string)}"
|
||||
"ActorID": "${RFXtoRPprefixSupplier(receipt.original_code?trim?json_string)}"
|
||||
},
|
||||
</#if>
|
||||
|
||||
<#if receipt.line_list??>
|
||||
"Lines" : [
|
||||
<#list receipt.line_list as line>
|
||||
"ShipTo" :
|
||||
{
|
||||
"LineID": "${line.receipt_line_number}",
|
||||
<#-- Line Metadata inclusion -->
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl">,
|
||||
"RequestedContent":
|
||||
"ActorID": "${RFXtoRPprefixDepot(receipt.physical_depot_code?trim?json_string)}"
|
||||
},
|
||||
"ShipToAcked": true,
|
||||
<#if receipt.carrier_informations.carrier_code != "">
|
||||
"Carrier":
|
||||
{
|
||||
"Goods":
|
||||
"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":
|
||||
{
|
||||
"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}",
|
||||
"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>
|
||||
"PriorityDate": "1970-01-01T00:00:00Z",
|
||||
<#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>
|
||||
</#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}"
|
||||
<#-- 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}"
|
||||
}
|
||||
}
|
||||
<#sep>,</#sep>
|
||||
</#list>
|
||||
],
|
||||
</#if>
|
||||
"RequestedMilestones" :
|
||||
{
|
||||
"RequestedDeliveryDateTime" :
|
||||
{
|
||||
"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_line.origin_order_line_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}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</#if>
|
||||
<#else>
|
||||
{
|
||||
"Header": {"ProjectID": "${projectRP}"},
|
||||
"ID": {
|
||||
"RefID": "R${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.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}",
|
||||
<#-- 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>
|
||||
]
|
||||
|
||||
@ -1,23 +1,67 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.confirmation_datetime,time_zone_rfx) />
|
||||
<#assign refIDHmap_local ={}>
|
||||
[
|
||||
{
|
||||
"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.receipt_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.receipt_reference?trim?json_string}",
|
||||
</#if>
|
||||
"RefDate": {
|
||||
"DateTime": "${receipt_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
<#if receipt.receipt_reference?? && receipt.receipt_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.receipt_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.receipt_reference?trim?json_string}",
|
||||
</#if>
|
||||
"RefDate": {
|
||||
"DateTime": "${receipt_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
"Payload": {
|
||||
}
|
||||
},
|
||||
"Payload": {
|
||||
}
|
||||
}
|
||||
]
|
||||
<#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_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
"Payload": {
|
||||
}
|
||||
}
|
||||
</#if>
|
||||
<#else>
|
||||
{
|
||||
"Header": {"ProjectID": "${projectRP}"},
|
||||
"ID": {
|
||||
"RefID": "R${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>
|
||||
</#if>
|
||||
</#list>
|
||||
</#if>
|
||||
</#if>
|
||||
]
|
||||
@ -1,25 +1,67 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.creation_datetime,time_zone_rfx) />
|
||||
|
||||
<#assign refIDHmap_local ={}>
|
||||
[
|
||||
{
|
||||
"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.receipt_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.receipt_reference?trim?json_string}",
|
||||
</#if>
|
||||
"RefDate": {
|
||||
"DateTime": "${receipt_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
<#if receipt.receipt_reference?? && receipt.receipt_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.receipt_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.receipt_reference?trim?json_string}",
|
||||
</#if>
|
||||
"RefDate": {
|
||||
"DateTime": "${receipt_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
"Payload": {
|
||||
}
|
||||
},
|
||||
|
||||
"Payload": {}
|
||||
|
||||
}
|
||||
]
|
||||
<#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_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
"Payload": {
|
||||
}
|
||||
}
|
||||
</#if>
|
||||
<#else>
|
||||
{
|
||||
"Header": {"ProjectID": "${projectRP}"},
|
||||
"ID": {
|
||||
"RefID": "R${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>
|
||||
</#if>
|
||||
</#list>
|
||||
</#if>
|
||||
</#if>
|
||||
]
|
||||
@ -105,14 +105,6 @@
|
||||
"batch_1": "${batch_1?json_string}",
|
||||
"base_lv_quantity": "true",
|
||||
"any_lv": "false"
|
||||
<#--
|
||||
"stock_reservation": "false",
|
||||
"forced_priority_date_min_lead_time": "false",
|
||||
"temp_substitution_possible": "false",
|
||||
"substitution_possible": "false"
|
||||
-->
|
||||
|
||||
|
||||
}
|
||||
<#sep>,</#sep>
|
||||
</#list>
|
||||
|
||||
@ -57,15 +57,9 @@
|
||||
"grade_code": "${grade_code}",
|
||||
"batch_1": "${batch_1?json_string!""}",
|
||||
"optional_attributes": {
|
||||
<#--"held_for_check": "false",
|
||||
"hold_code": "false", -->
|
||||
<#include "RPtoRFX_Receipt_OptionalAttributes.ftl">
|
||||
"hold_for_specific_code": "false"
|
||||
}
|
||||
<#--"quality_control_attributes": {
|
||||
"qcf_to_create_for_receipt_line": "false",
|
||||
"exclude_item_from_inspection": "false"
|
||||
} -->
|
||||
|
||||
}
|
||||
}<#sep>,</#sep>
|
||||
</#list>
|
||||
]
|
||||
|
||||
@ -14,4 +14,4 @@
|
||||
}
|
||||
]
|
||||
</#if>,
|
||||
-->
|
||||
-->
|
||||
|
||||
16
RPtoRFX_Receipt_OptionalAttributes.ftl
Normal file
16
RPtoRFX_Receipt_OptionalAttributes.ftl
Normal file
@ -0,0 +1,16 @@
|
||||
<#-- Here are the fields that can be added
|
||||
"batch_2": "string",
|
||||
"batch_3": "string",
|
||||
"anticipated_receipt_line_activity_code": "str",
|
||||
"anticipated_receipt_line_physical_depot_code": "str",
|
||||
"anticipated_receipt_line_originator_code": "string",
|
||||
"anticipated_receipt_reference": "string",
|
||||
"anticipated_receipt_planned_date": "0000-00-00",
|
||||
"anticipated_receipt_reference_line_no": 999999,
|
||||
"reservation_consignee_code": "string",
|
||||
"reservation_consignee_group_code": "string",
|
||||
"pro_reservation_reference": "string",
|
||||
"held_for_check": "false",
|
||||
"held_for_repacking": "false",
|
||||
"hold_code": "str"
|
||||
-->
|
||||
Loading…
x
Reference in New Issue
Block a user