You've already forked reflex-wms-connector
Compare commits
42 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2752e5b26e | |||
| 6b0a3f0b24 | |||
| c4f2161edb | |||
| 80736c4a30 | |||
| e2a8404311 | |||
| 11ab7068cd | |||
| 3aee512fa1 | |||
| 40d767406a | |||
| d5efde68a9 | |||
| f31be2092e | |||
| 24564d199e | |||
| 5397b211b4 | |||
| c3e584c43b | |||
| cdc4ab6c3c | |||
| 9b4506912c | |||
| e7fa9ec7b7 | |||
| 53c400be49 | |||
| bb6e68a697 | |||
| 969560a0d1 | |||
| 3f693dc4cb | |||
| 02e8dc2566 | |||
| 546891463b | |||
| c5afde166a | |||
| 9e16ebae85 | |||
| 546d46fc42 | |||
| f14616784a | |||
| 4115d9ec5f | |||
| 9d99c0c65e | |||
| ff25781b84 | |||
| a045b37b7b | |||
| 337b011d4e | |||
| 7b4dfe0288 | |||
| da75ead70f | |||
| b168b16931 | |||
| f76d632303 | |||
| 5963948635 | |||
| 80965f3927 | |||
| 7ae70dae92 | |||
| dbffc01a70 | |||
| 2681a4dc24 | |||
| 9380d39bb6 | |||
| ba13f7cf59 |
19
README.md
19
README.md
@@ -1,20 +1,11 @@
|
|||||||
# HARDIS SC NETWORK Core FTLs
|
# Reflex Platform Core FTLs
|
||||||
## Overview
|
|
||||||
The **HARDIS WMS Connector** is a set of **FreeMarker templates (FTL)** designed to transform **outgoing JSON flows from HARDIS WMS** into **flows compatible with HARDIS SC NETWORK**.
|
|
||||||
|
|
||||||
The **HARDIS WMS Connector** is a set of **FreeMarker templates (FTL)** designed to transform **outgoing JSON flows from HARDIS WMS** into **flows compatible with HARDIS SC NETWORK**.
|
|
||||||
|
|
||||||
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
|
These FTL core files aim to translate data flow from Reflex WMS into Reflex platform API.
|
||||||
|
|
||||||
- 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 HARDIS SC NETWORK.
|
|
||||||
|
|
||||||
## Useful Resources
|
|
||||||
|
|
||||||
- [FreeMarker Documentation](https://freemarker.apache.org/docs/index.html)
|
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/
|
||||||
- [HARDIS SC NETWORK](https://auth.reflex-platform.com/)
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1 @@
|
|||||||
<#-- To configure the tracking setting carrier -->
|
|
||||||
<#assign trackingNumberSource = 3>
|
<#assign trackingNumberSource = 3>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message HARDIS WMS -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
<#-- sum_elt : nb element in snapshot (optional parameter) -->
|
<#-- sum_elt : nb element in snapshot (optional parameter) -->
|
||||||
|
|
||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
|
|||||||
@@ -1,12 +1,6 @@
|
|||||||
<#-- use protobuf of class HfDtlStockLs to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HfDtlStockLs to find Reflex WMS fields names -->
|
||||||
|
|
||||||
<#--
|
<#--
|
||||||
<#-- Best practices:
|
|
||||||
If the SK is of type:
|
|
||||||
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
|
||||||
- boolean: possible values: true and false
|
|
||||||
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
|
||||||
- decimal number: the separator is a point (e.g. 10.5)
|
|
||||||
|
|
||||||
"SegmentationKeys": [
|
"SegmentationKeys": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<#-- ****
|
<#-- ****
|
||||||
HARDIS WMS provides some of their environment parameters through the class HfRpConfig
|
Reflex WMS provides some of their environment parameters through the class HfRpConfig
|
||||||
those parameters are stored in FTL file HfRpConfig.ftl for later use in some of the data ftl files
|
those parameters are stored in FTL file HfRpConfig.ftl for later use in some of the data ftl files
|
||||||
*** -->
|
*** -->
|
||||||
|
|
||||||
|
|||||||
@@ -1,100 +0,0 @@
|
|||||||
<#-- **** input parameters ***** -->
|
|
||||||
<#-- input : message HARDIS WMS -->
|
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
|
||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "HfRpConfig.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 preparationOrder = JsonUtil.jsonToMap(dataRfx)>
|
|
||||||
|
|
||||||
<#if preparationOrder.total_lv_validated !=0>
|
|
||||||
<#if preparationOrder.preparation_line_lst??>
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsPrepared>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl">
|
|
||||||
},
|
|
||||||
{
|
|
||||||
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl">
|
|
||||||
}
|
|
||||||
<#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]?? || !hd_numberHmap[despatched_ipg.carton_number]??) && (trackingNumberSource==2 || trackingNumberSource==3 || (despatched_ipg.consignment_unit_id!="" && trackingNumberSource==1))>
|
|
||||||
,
|
|
||||||
{
|
|
||||||
<#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>
|
|
||||||
<#assign refIDHmap ={}>
|
|
||||||
]
|
|
||||||
<#else>
|
|
||||||
<#-- No line-->
|
|
||||||
<#stop >
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#-- no confirmed quantity for the preparation - preparation closed-->
|
|
||||||
<#stop >
|
|
||||||
</#if>
|
|
||||||
|
|
||||||
|
|
||||||
<#break>
|
|
||||||
<#case "D">
|
|
||||||
<#-- *********************************************** Action = DELETE ******************** -->
|
|
||||||
<#stop>
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
<#default>
|
|
||||||
<#stop>
|
|
||||||
</#switch>
|
|
||||||
@@ -1,125 +0,0 @@
|
|||||||
<#-- **** input parameters ***** -->
|
|
||||||
<#-- input : message HARDIS WMS -->
|
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
|
||||||
<#assign projectRP = project>
|
|
||||||
<#assign organisationRP = organisation>
|
|
||||||
|
|
||||||
<#assign aDateTime = .now>
|
|
||||||
|
|
||||||
<#switch cloudEventMsg.action>
|
|
||||||
<#case "C">
|
|
||||||
<#-- *********************************************** Action = CREATE ******************** -->
|
|
||||||
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
||||||
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
|
||||||
<#if receipt.receipt_type == "030">
|
|
||||||
<#stop "ignored message because receipt type = transfert">
|
|
||||||
<#else>
|
|
||||||
<#if receipt.line_list ??>
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowLinesAdded>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HliReceiptLr_ExecutionflowLinesAdded.ftl">
|
|
||||||
|
|
||||||
},
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
|
|
||||||
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#else>
|
|
||||||
<#-- No line-->
|
|
||||||
<#stop>
|
|
||||||
</#if>
|
|
||||||
</#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_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>
|
|
||||||
<#if receipt.receipt_type == "030">
|
|
||||||
<#stop "ignored message because receipt type = transfert">
|
|
||||||
<#else>
|
|
||||||
<#if receipt.line_list ??>
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowLinesAdded>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HliReceiptLr_ExecutionflowLinesAdded.ftl">
|
|
||||||
},
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
|
|
||||||
}
|
|
||||||
<#else>
|
|
||||||
<#-- No line-->
|
|
||||||
<#stop>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#-- Receipt reference is empty-->
|
|
||||||
<#stop >
|
|
||||||
</#if>
|
|
||||||
]
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
<#case "D">
|
|
||||||
<#-- *********************************************** Action = DELETE ******************** -->
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
||||||
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
|
||||||
[
|
|
||||||
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
|
||||||
<#if receipt.line_list ??>
|
|
||||||
{
|
|
||||||
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl">
|
|
||||||
}
|
|
||||||
<#else>
|
|
||||||
<#-- No line-->
|
|
||||||
<#stop>
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#-- Receipt reference is empty-->
|
|
||||||
<#stop >
|
|
||||||
</#if>
|
|
||||||
]
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
|
|
||||||
<#default>
|
|
||||||
<#stop >
|
|
||||||
</#switch>
|
|
||||||
|
|
||||||
@@ -1,72 +0,0 @@
|
|||||||
<#-- **** input parameters ***** -->
|
|
||||||
<#-- input : message HARDIS WMS -->
|
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
|
||||||
<#assign projectRP = project>
|
|
||||||
<#assign organisationRP = organisation>
|
|
||||||
|
|
||||||
<#assign aDateTime = .now>
|
|
||||||
|
|
||||||
<#switch cloudEventMsg.action>
|
|
||||||
<#case "C">
|
|
||||||
<#case "U">
|
|
||||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
|
||||||
<#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?? && (preparation_order.preparation_type_code == "010" || preparation_order.preparation_type_code == "030")>
|
|
||||||
<#if preparation_order.line_list??>
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowLinesAdded>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HlrProL_ExecutionflowLinesAdded.ftl">
|
|
||||||
}
|
|
||||||
<#else>
|
|
||||||
<#-- No line -->
|
|
||||||
<#stop>
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#-- preparation order type not supported -->
|
|
||||||
<#stop>
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#-- PRO reference is empty -->
|
|
||||||
<#stop>
|
|
||||||
</#if>
|
|
||||||
]
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
<#case "D">
|
|
||||||
<#-- *********************************************** Action = DELETE ******************** -->
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
||||||
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
|
|
||||||
[
|
|
||||||
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
|
|
||||||
<#if preparation_order.line_list??>
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrPro_ExecutionflowCancelled.ftl">
|
|
||||||
}
|
|
||||||
<#else>
|
|
||||||
<#-- No line -->
|
|
||||||
<#stop>
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#-- PRO reference is empty -->
|
|
||||||
<#stop>
|
|
||||||
</#if>
|
|
||||||
]
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
|
|
||||||
<#default>
|
|
||||||
<#stop >
|
|
||||||
</#switch>
|
|
||||||
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#assign planned_final_delivery_start_datetime = RfxDateTimetoUTCWithTimezone(preparation_order.planned_final_delivery_start_datetime,time_zone_rfx) />
|
|
||||||
<#assign pro_creation_datetime = RfxDateTimetoUTCWithTimezone(preparation_order.creation_datetime,time_zone_rfx) />
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
"RefID": "${preparation_order.originator_reference?trim?json_string}",
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${pro_creation_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
<#if preparation_order.line_list??>
|
|
||||||
"Lines" : [
|
|
||||||
<#list preparation_order.line_list as preparation_order_line >
|
|
||||||
{
|
|
||||||
<#if (preparation_order_line.originator_reference_line_number!0) != 0>
|
|
||||||
"LineID": "${preparation_order_line.originator_reference_line_number}",
|
|
||||||
<#else>
|
|
||||||
"LineID": "${preparation_order_line.preparation_order_line_number!0}",
|
|
||||||
</#if>
|
|
||||||
<#-- Line Metadata inclusion -->
|
|
||||||
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_LineMetadata.ftl">,
|
|
||||||
"RequestedContent":
|
|
||||||
{
|
|
||||||
"Goods":
|
|
||||||
{
|
|
||||||
"ItemID": "${preparation_order_line.item_code?trim?json_string!"0"}",
|
|
||||||
"LVBranchID": "${preparation_order_line.item_lv_code?json_string!"0"}",
|
|
||||||
<#if (preparation_order_line.optional_attributes.forced_priority_date?length != 0) && (preparation_order_line.optional_attributes.forced_priority_date?starts_with("00") == false)>
|
|
||||||
<#assign forced_priority_date = preparation_order_line.optional_attributes.forced_priority_date?datetime(rfx_date_format_default)?iso_utc />
|
|
||||||
"PriorityDate": "${forced_priority_date}",
|
|
||||||
</#if>
|
|
||||||
<#-- Segmentation Keys inclusion -->
|
|
||||||
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_SegmentationKeys.ftl">
|
|
||||||
},
|
|
||||||
"Quantity" :
|
|
||||||
{
|
|
||||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
|
||||||
"Value": "${preparation_order_line.base_lv_quantity_to_prepare!0}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}<#sep>,</#sep>
|
|
||||||
</#list>
|
|
||||||
]
|
|
||||||
</#if>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,7 +1,10 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message HARDIS WMS -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ActorPrefix.ftl">
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
@@ -17,7 +20,7 @@
|
|||||||
<#assign carrier = JsonUtil.jsonToMap(dataRfx)>
|
<#assign carrier = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreatedv2>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaCarrier_ActorCreated.ftl">
|
<#include "RFXtoRP_HsaCarrier_ActorCreated.ftl">
|
||||||
|
|||||||
@@ -1,6 +1,3 @@
|
|||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
@@ -11,17 +8,13 @@
|
|||||||
},
|
},
|
||||||
"Payload": {
|
"Payload": {
|
||||||
"Name": "${carrier.carrier_designation?json_string}",
|
"Name": "${carrier.carrier_designation?json_string}",
|
||||||
"ManagedStock": false,
|
|
||||||
"IsCarrier": true,
|
"IsCarrier": true,
|
||||||
<#-- ***Partner ID could be added here *** -->
|
|
||||||
<#-- "PartnerID": "${}", -->
|
|
||||||
|
|
||||||
|
|
||||||
<#include "RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl">,
|
<#include "RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl">,
|
||||||
|
|
||||||
"Address":
|
"Address":
|
||||||
{
|
{
|
||||||
<#-- if HARDIS WMS address is structured -->
|
<#-- if Reflex WMS address is structured -->
|
||||||
<#if carrier.carrier_structured_address?? >
|
<#if carrier.carrier_structured_address?? >
|
||||||
|
|
||||||
"Name": "${carrier.carrier_structured_address.name_or_company?json_string}",
|
"Name": "${carrier.carrier_structured_address.name_or_company?json_string}",
|
||||||
@@ -37,8 +30,7 @@
|
|||||||
</#if>
|
</#if>
|
||||||
"ProvinceCode": "${carrier.carrier_structured_address.territorial_div_code?json_string}",
|
"ProvinceCode": "${carrier.carrier_structured_address.territorial_div_code?json_string}",
|
||||||
"State": "${carrier.carrier_structured_address.country_designation?json_string}"
|
"State": "${carrier.carrier_structured_address.country_designation?json_string}"
|
||||||
|
<#-- if Reflex WMS address is not structured -->
|
||||||
<#-- if HARDIS WMS address is not structured -->
|
|
||||||
<#else>
|
<#else>
|
||||||
<#if carrier.address??>
|
<#if carrier.address??>
|
||||||
"Name": "${carrier.address.company_name?json_string}",
|
"Name": "${carrier.address.company_name?json_string}",
|
||||||
|
|||||||
@@ -1,10 +1,4 @@
|
|||||||
<#-- use protobuf of class HsaCarrier to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsaCarrier to find Reflex WMS fields names -->
|
||||||
|
|
||||||
<#-- Best practices:
|
|
||||||
If the SK is of type:
|
|
||||||
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
|
||||||
- boolean: possible values: true and false
|
|
||||||
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
|
||||||
- decimal number: the separator is a point (e.g. 10.5)-->
|
|
||||||
|
|
||||||
"MetaData": [ ]
|
"MetaData": [ ]
|
||||||
@@ -1,6 +1,3 @@
|
|||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message HARDIS- WMS -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ActorPrefix.ftl">
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
@@ -17,12 +20,13 @@
|
|||||||
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
|
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreatedv2>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaCons_ActorCreated.ftl">
|
<#include "RFXtoRP_HsaCons_ActorCreated.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#case "D">
|
<#case "D">
|
||||||
|
|||||||
@@ -1,6 +1,3 @@
|
|||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
@@ -11,19 +8,13 @@
|
|||||||
},
|
},
|
||||||
"Payload": {
|
"Payload": {
|
||||||
"Name": "${actor.designation?json_string}",
|
"Name": "${actor.designation?json_string}",
|
||||||
"ManagedStock": false,
|
|
||||||
"IsCarrier": false,
|
"IsCarrier": false,
|
||||||
<#-- ***Partner ID could be added here *** -->
|
|
||||||
<#-- "PartnerID": "${}", -->
|
|
||||||
|
|
||||||
|
|
||||||
<#include "RFXtoRP_HsaCons_ActorCreated_Metadata.ftl">,
|
<#include "RFXtoRP_HsaCons_ActorCreated_Metadata.ftl">,
|
||||||
|
|
||||||
|
|
||||||
"Address":
|
"Address":
|
||||||
{
|
{
|
||||||
|
<#-- if Reflex WMS is structured -->
|
||||||
<#-- if HARDIS WMS is structured -->
|
|
||||||
<#if actor.consignee_structured_address??>
|
<#if actor.consignee_structured_address??>
|
||||||
|
|
||||||
"Name": "${actor.consignee_structured_address.name_or_company?json_string}",
|
"Name": "${actor.consignee_structured_address.name_or_company?json_string}",
|
||||||
@@ -40,7 +31,7 @@
|
|||||||
"ProvinceCode": "${actor.consignee_structured_address.territorial_div_code?json_string}",
|
"ProvinceCode": "${actor.consignee_structured_address.territorial_div_code?json_string}",
|
||||||
"State": "${actor.consignee_structured_address.country_designation?json_string}"
|
"State": "${actor.consignee_structured_address.country_designation?json_string}"
|
||||||
|
|
||||||
<#-- if HARDIS WMS is not structured -->
|
<#-- if Reflex WMS is not structured -->
|
||||||
<#else>
|
<#else>
|
||||||
<#if actor.address?? >
|
<#if actor.address?? >
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,4 @@
|
|||||||
<#-- use protobuf of class HsaCons to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsaCons to find Reflex WMS fields names -->
|
||||||
|
|
||||||
<#-- Best practices:
|
|
||||||
If the SK is of type:
|
|
||||||
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
|
||||||
- boolean: possible values: true and false
|
|
||||||
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
|
||||||
- decimal number: the separator is a point (e.g. 10.5)-->
|
|
||||||
|
|
||||||
"MetaData": [ ]
|
"MetaData": [ ]
|
||||||
@@ -1,6 +1,3 @@
|
|||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
<#-- **** 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 desPatch = JsonUtil.jsonToMap(dataRfx)>
|
|
||||||
|
|
||||||
<#stop "no generic FTL file available yet for desPatch">
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
<#case "D">
|
|
||||||
<#-- *********************************************** Action = DELETE ******************** -->
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
||||||
<#assign desPatch = JsonUtil.jsonToMap(dataRfx)>
|
|
||||||
|
|
||||||
<#stop "no generic FTL file available yet for desPatch">
|
|
||||||
<#break>
|
|
||||||
<#default>
|
|
||||||
<#stop >
|
|
||||||
</#switch>
|
|
||||||
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
<#-- **** 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 despNt = JsonUtil.jsonToMap(dataRfx)>
|
|
||||||
|
|
||||||
<#stop "no generic FTL file available yet for despNt">
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
<#case "D">
|
|
||||||
<#-- *********************************************** Action = DELETE ******************** -->
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
||||||
<#assign despNt = JsonUtil.jsonToMap(dataRfx)>
|
|
||||||
|
|
||||||
<#stop "no generic FTL file available yet for despNt">
|
|
||||||
<#break>
|
|
||||||
<#default>
|
|
||||||
<#stop >
|
|
||||||
</#switch>
|
|
||||||
|
|
||||||
@@ -1,12 +1,14 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message HARDIS WMS -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
<#-- For dispute creation WMS to Platform -->
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
<#assign organisationRP = organisation>
|
<#assign organisationRP = organisation>
|
||||||
|
|
||||||
<#assign aDateTime = .now>
|
<#assign aDateTime = .now>
|
||||||
|
|
||||||
<#switch cloudEventMsg.action>
|
<#switch cloudEventMsg.action>
|
||||||
<#case "C">
|
<#case "C">
|
||||||
<#case "U">
|
<#case "U">
|
||||||
@@ -15,7 +17,6 @@
|
|||||||
<#assign dispute = JsonUtil.jsonToMap(dataRfx)>
|
<#assign dispute = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
<#if dispute.dispute_closed == true >
|
<#if dispute.dispute_closed == true >
|
||||||
<#-- Only for preparation and receipt disputes -->
|
|
||||||
<#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!="")>
|
<#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>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimCreated>
|
||||||
@@ -23,11 +24,9 @@
|
|||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaDispute_Created.ftl">
|
<#include "RFXtoRP_HsaDispute_Created.ftl">
|
||||||
}
|
}
|
||||||
<#-- Create the table for reason code in RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl -->
|
|
||||||
<#if TableReasonCode[dispute.dispute_reason_code]??>
|
<#if TableReasonCode[dispute.dispute_reason_code]??>
|
||||||
,
|
,
|
||||||
{
|
{
|
||||||
<#-- Add message in dispute tchat room -->
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimMessageSent>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimMessageSent>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
@@ -37,8 +36,7 @@
|
|||||||
<#stop>
|
<#stop>
|
||||||
</#if>
|
</#if>
|
||||||
<#else>
|
<#else>
|
||||||
<#-- "Reference is empty"-->
|
<#stop "Reference is empty">
|
||||||
<#stop>
|
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
<#-- use protobuf of class HsaDispute to find HARDIS WMS fields names -->
|
|
||||||
|
|
||||||
<#-- Best practices:
|
|
||||||
If the SK is of type:
|
|
||||||
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
|
||||||
- boolean: possible values: true and false
|
|
||||||
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
|
||||||
- decimal number: the separator is a point (e.g. 10.5)-->
|
|
||||||
|
|
||||||
"MetaData": [ ]
|
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
},
|
},
|
||||||
"Payload": {
|
"Payload": {
|
||||||
<#if dispute.dispute_reference?? && dispute.dispute_reference!="">
|
<#if dispute.dispute_reference?? && dispute.dispute_reference!="">
|
||||||
"Title":"${dispute.dispute_reference?trim?json_string}",
|
"Title":"${dispute.dispute_reference?json_string}",
|
||||||
<#else>
|
<#else>
|
||||||
"Title":"",
|
"Title":"",
|
||||||
</#if>
|
</#if>
|
||||||
@@ -39,26 +39,31 @@
|
|||||||
</#if>
|
</#if>
|
||||||
"Value": "${dispute.dispute_amount}"
|
"Value": "${dispute.dispute_amount}"
|
||||||
},
|
},
|
||||||
<#-- Claim metadata inclusion -->
|
|
||||||
<#include "RFXtoRP_HsaDispute_ClaimMetadata.ftl">,
|
|
||||||
<#-- To configure -->
|
<#-- To configure -->
|
||||||
<#include "RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl">
|
<#include "RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl">
|
||||||
<#if dispute.dispute_type_code=="050" >
|
<#if dispute.dispute_type_code=="050" >
|
||||||
"EntityID":"${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string}",
|
"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}",
|
"DisplayID":"${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string}",
|
||||||
<#else>
|
<#else>
|
||||||
<#if dispute.dispute_type_code=="070" || dispute.dispute_type_code=="030" >
|
<#if dispute.dispute_type_code=="030" || dispute.dispute_type_code=="070" >
|
||||||
"EntityID":"${dispute.dispute_reception.reception_reference?trim?json_string}",
|
<#if dispute.dispute_reception.reception_type_code=="030">
|
||||||
"DisplayID":"${dispute.dispute_reception.reception_reference?trim?json_string}",
|
"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_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}",
|
||||||
|
"DisplayID":"${dispute.dispute_reception.reception_reference?json_string}",
|
||||||
<#else>
|
<#else>
|
||||||
<#stop "WMS type code not supported">
|
<#stop "WMS type code not supported">
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
|
||||||
<#if TableReasonCode[dispute.dispute_reason_code]??>
|
<#if TableReasonCode[dispute.dispute_reason_code]??>
|
||||||
"ClaimTypeID":"CLAIMTYPE_${projectRP}_ORDER_${TableReasonCode[dispute.dispute_reason_code]}"
|
"ClaimTypeID":"CLAIMTYPE_${projectRP}_EXECUTIONFLOW_${TableReasonCode[dispute.dispute_reason_code]}"
|
||||||
<#else>
|
<#else>
|
||||||
<#stop "Reason code not supported">
|
<#stop "Claim reason code not supported" >
|
||||||
</#if>
|
</#if>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -66,3 +71,4 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#-- Add refer -->
|
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -47,6 +47,7 @@
|
|||||||
<#if (reflexMvtStockInterface.ipg_move_type == "100" ||
|
<#if (reflexMvtStockInterface.ipg_move_type == "100" ||
|
||||||
reflexMvtStockInterface.ipg_move_type == "110" ||
|
reflexMvtStockInterface.ipg_move_type == "110" ||
|
||||||
reflexMvtStockInterface.ipg_move_type == "120") >
|
reflexMvtStockInterface.ipg_move_type == "120") >
|
||||||
|
<#if reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!="">
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsReceived>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsReceived>
|
||||||
@@ -55,6 +56,10 @@
|
|||||||
<#include "RFXtoRP_HsaIpgMove_GoodsReceived.ftl">
|
<#include "RFXtoRP_HsaIpgMove_GoodsReceived.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
<#else>
|
||||||
|
<#-- Case of IPG move type volontarilly ignored-->
|
||||||
|
<#stop " Reference receipt is empty">
|
||||||
|
</#if>
|
||||||
<#else>
|
<#else>
|
||||||
<#stop>
|
<#stop>
|
||||||
</#if>
|
</#if>
|
||||||
|
|||||||
@@ -21,41 +21,24 @@
|
|||||||
"Goods": {
|
"Goods": {
|
||||||
"ItemID": "${reflexMvtStockInterface.item_code?trim?json_string}",
|
"ItemID": "${reflexMvtStockInterface.item_code?trim?json_string}",
|
||||||
"LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}",
|
"LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}",
|
||||||
<#if (reflexMvtStockInterface.ipg_priority_date!="") && (reflexMvtStockInterface.ipg_priority_date?starts_with("00")== false) >
|
<#if (priority_date!="") && (priority_date?starts_with("00")== false) >
|
||||||
"PriorityDate": "${priority_date}",
|
"PriorityDate": "${priority_date}",
|
||||||
<#else>
|
<#else>
|
||||||
"PriorityDate": "1970-01-01T00:00:00Z",
|
"PriorityDate": "1970-01-01T00:00:00Z",
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
<#-- Goods received Segmentation Keys inclusion -->
|
<#-- Goods received Segmentation Keys inclusion -->
|
||||||
<#include "RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl">
|
<#include "RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl">
|
||||||
},
|
},
|
||||||
<#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!="">
|
<#if reflexMvtStockInterface.receipt_reference!="">
|
||||||
"ExecutionflowID": "${reflexMvtStockInterface.origin_order_line_reference?trim?json_string}",
|
"ExecutionflowID": "${reflexMvtStockInterface.original_receipt_physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_reference?trim?json_string}",
|
||||||
"OrderID": "${reflexMvtStockInterface.origin_order_line_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
<#if reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!="">
|
|
||||||
"ExecutionflowID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}",
|
|
||||||
"OrderID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}",
|
"OrderID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}",
|
||||||
<#else>
|
<#else>
|
||||||
"ExecutionflowID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_year_number}${reflexMvtStockInterface.receipt_number}",
|
"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.originator_code}${reflexMvtStockInterface.receipt_year_number}${reflexMvtStockInterface.receipt_number}",
|
"OrderID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}",
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#if reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!="">
|
|
||||||
"ExecutionflowID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}",
|
|
||||||
"OrderID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
"ExecutionflowID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_year_number}${reflexMvtStockInterface.receipt_number}",
|
|
||||||
"OrderID": "${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}",
|
"LineID": "${reflexMvtStockInterface.receipt_line_number}",
|
||||||
</#if>
|
|
||||||
"ActorID": "${RFXtoRPprefixDepot(reflexMvtStockInterface.physical_depot_code?trim?json_string)}",
|
"ActorID": "${RFXtoRPprefixDepot(reflexMvtStockInterface.physical_depot_code?trim?json_string)}",
|
||||||
"Quantity": {
|
"Quantity": {
|
||||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||||
|
|||||||
@@ -1,12 +1,7 @@
|
|||||||
<#-- use protobuf of class HsaIpgMove to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsaIpgMove to find Reflex WMS fields names -->
|
||||||
|
|
||||||
<#--
|
<#--
|
||||||
<#-- Best practices:
|
|
||||||
If the SK is of type:
|
|
||||||
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
|
||||||
- boolean: possible values: true and false
|
|
||||||
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
|
||||||
- decimal number: the separator is a point (e.g. 10.5)
|
|
||||||
|
|
||||||
"SegmentationKeys": [
|
"SegmentationKeys": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,12 +1,5 @@
|
|||||||
<#-- use protobuf of class HsaIpgMove to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsaIpgMove to find Reflex WMS fields names -->
|
||||||
<#--
|
<#--
|
||||||
<#-- Best practices:
|
|
||||||
If the SK is of type:
|
|
||||||
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
|
||||||
- boolean: possible values: true and false
|
|
||||||
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
|
||||||
- decimal number: the separator is a point (e.g. 10.5)
|
|
||||||
|
|
||||||
"SegmentationKeys": [
|
"SegmentationKeys": [
|
||||||
{
|
{
|
||||||
"Key": "Grade",
|
"Key": "Grade",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message HARDIS WMS -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
@@ -18,10 +18,14 @@
|
|||||||
<#assign item = JsonUtil.jsonToMap(dataRfx)>
|
<#assign item = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
|
<#if item.logistical_variant_list?? >
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ItemCreated>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ItemCreated>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaItm_ItemCreated.ftl">
|
<#include "RFXtoRP_HsaItm_ItemCreated.ftl">
|
||||||
|
<#else>
|
||||||
|
<#stop "no LV for the item">
|
||||||
|
</#if>
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message HARDIS WMS -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
{
|
{
|
||||||
"LVID": "${lv.logistical_variant_code?json_string}",
|
"LVID": "${lv.logistical_variant_code?json_string}",
|
||||||
"Name" : "${lv.lv_type_code?json_string}",
|
"Name" : "${lv.lv_type_code?json_string}",
|
||||||
<#if lv.id_list?? && (lv.id_list?size == lv.id_list?filter(l ->l??)?size)>
|
<#if lv.id_list??>
|
||||||
"Codes": [
|
"Codes": [
|
||||||
<#list lv.id_list as id>
|
<#list lv.id_list as id>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,10 +1,4 @@
|
|||||||
<#-- use protobuf of class HsaItmLv to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsaItmLv to find Reflex Wms fields names -->
|
||||||
|
|
||||||
<#-- Best practices:
|
|
||||||
If the SK is of type:
|
|
||||||
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
|
||||||
- boolean: possible values: true and false
|
|
||||||
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
|
||||||
- decimal number: the separator is a point (e.g. 10.5)-->
|
|
||||||
|
|
||||||
"MetaData": [ ]
|
"MetaData": [ ]
|
||||||
@@ -21,17 +21,15 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
<#-- Item metadata inclusion -->
|
<#-- Item metadata inclusion -->
|
||||||
<#include "RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl">
|
<#include "RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl">,
|
||||||
|
|
||||||
<#-- Item Photo URI could be added here -->
|
<#-- Item Photo URI could be added here -->
|
||||||
<#if item.url?? && item.url!="">
|
<#if item.url?? && item.url!="">
|
||||||
,
|
"PhotoURI": "${item.url?json_string}",
|
||||||
"PhotoURI": "${item.url?json_string}"
|
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
<#-- Loop for the Logistical Variants - LV -->
|
<#-- Loop for the Logistical Variants - LV -->
|
||||||
<#if item.logistical_variant_list?? && (item.logistical_variant_list?size == item.logistical_variant_list?filter(l ->l??)?size)>
|
<#if item.logistical_variant_list??>
|
||||||
,
|
|
||||||
"LogisticVariants": [
|
"LogisticVariants": [
|
||||||
|
|
||||||
<#list item.logistical_variant_list as logistical_variant>
|
<#list item.logistical_variant_list as logistical_variant>
|
||||||
@@ -39,7 +37,7 @@
|
|||||||
"LVID": "${logistical_variant.logistical_variant_code?json_string}",
|
"LVID": "${logistical_variant.logistical_variant_code?json_string}",
|
||||||
"Name" : "${logistical_variant.lv_type_code?json_string}",
|
"Name" : "${logistical_variant.lv_type_code?json_string}",
|
||||||
|
|
||||||
<#if logistical_variant.id_list?? && (logistical_variant.id_list?size == logistical_variant.id_list?filter(l ->l??)?size)>
|
<#if logistical_variant.id_list??>
|
||||||
"Codes": [
|
"Codes": [
|
||||||
<#list logistical_variant.id_list as id>
|
<#list logistical_variant.id_list as id>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,10 +1,4 @@
|
|||||||
<#-- use protobuf of class HsaItm to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsaItm to find Reflex Wms fields names -->
|
||||||
|
|
||||||
<#-- Best practices:
|
|
||||||
If the SK is of type:
|
|
||||||
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
|
||||||
- boolean: possible values: true and false
|
|
||||||
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
|
||||||
- decimal number: the separator is a point (e.g. 10.5)-->
|
|
||||||
|
|
||||||
"MetaData": [ ]
|
"MetaData": [ ]
|
||||||
@@ -1,10 +1,4 @@
|
|||||||
<#-- use protobuf of class HsaItm to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsaItm to find Reflex Wms fields names -->
|
||||||
|
|
||||||
<#-- Best practices:
|
|
||||||
If the SK is of type:
|
|
||||||
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
|
||||||
- boolean: possible values: true and false
|
|
||||||
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
|
||||||
- decimal number: the separator is a point (e.g. 10.5)-->
|
|
||||||
|
|
||||||
"MetaData": [ ]
|
"MetaData": [ ]
|
||||||
@@ -1,89 +1,40 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message HARDIS WMS -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in ReflexPlatform -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ReflexUtils.ftl">
|
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
|
|
||||||
<#assign organisationRP = organisation>
|
<#assign organisationRP = organisation>
|
||||||
|
|
||||||
<#assign aDateTime = .now>
|
<#assign aDateTime = .now>
|
||||||
|
|
||||||
|
<#stop>
|
||||||
|
|
||||||
<#switch cloudEventMsg.action>
|
<#switch cloudEventMsg.action>
|
||||||
<#case "C">
|
<#case "C">
|
||||||
<#case "U">
|
<#case "U">
|
||||||
<#-- *********************************************** Action = Update ******************** -->
|
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign carrier_apt_status = JsonUtil.jsonToMap(dataRfx)>
|
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
||||||
<#if !carrier_apt_status.status??>
|
|
||||||
<#stop 'the updated appointment Status not initialized'>
|
|
||||||
</#if>
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#switch carrier_apt_status.status.carrier_status_code>
|
|
||||||
<#case "010"> <#--Carrier Expected -->
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierExpected>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsaLstCarSta_CarrierExpected.ftl">
|
|
||||||
<#break>
|
|
||||||
<#case "020"> <#--Carrier Arrived-->
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierArrived>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsaLstCarSta_CarrierArrived.ftl">
|
|
||||||
<#break>
|
|
||||||
<#case "040"> <#--Unloading Started -->
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentUnloadingStarted>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsaLstCarSta_UnloadingStarted.ftl">
|
|
||||||
<#break>
|
|
||||||
<#case "050"> <#--Unloading Completed-->
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentUnloadingCompleted>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsaLstCarSta_UnloadingCompleted.ftl">
|
|
||||||
<#break>
|
|
||||||
<#case "060"> <#--Loading Started-->
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentLoadingStarted>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsaLstCarSta_LoadingStarted.ftl">
|
|
||||||
<#break>
|
|
||||||
<#case "070"> <#--Loading Completed-->
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentLoadingCompleted>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsaLstCarSta_LoadingCompleted.ftl">
|
|
||||||
<#break>
|
|
||||||
<#case "090"> <#--Carrier Departed-->
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierDeparted>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsaLstCarSta_CarrierDeparted.ftl">
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
<#default>
|
|
||||||
<#stop 'this updated appointment Status not implemented'>
|
|
||||||
</#switch>
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#case "D">
|
<#case "D">
|
||||||
<#-- *********************************************** Action = Delete ******************** -->
|
<#-- *********************************************** Action = DELETE *************************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign carrier_apt_status = JsonUtil.jsonToMap(dataRfx)>
|
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
||||||
<#stop 'Delete Appointment Status not implemented' >
|
[
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop >
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
[
|
|
||||||
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) />
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
<#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !="">
|
|
||||||
"RefID": "${carrier_apt_status.appointment_reference?json_string}",
|
|
||||||
<#else>
|
|
||||||
"RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}",
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${ref_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload":{
|
|
||||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
[
|
|
||||||
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) />
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
<#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !="">
|
|
||||||
"RefID": "${carrier_apt_status.appointment_reference?json_string}",
|
|
||||||
<#else>
|
|
||||||
"RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}",
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${ref_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload":{
|
|
||||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
[
|
|
||||||
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) />
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
<#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !="">
|
|
||||||
"RefID": "${carrier_apt_status.appointment_reference?json_string}",
|
|
||||||
<#else>
|
|
||||||
"RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}",
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${ref_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload":{
|
|
||||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
[
|
|
||||||
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) />
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
<#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !="">
|
|
||||||
"RefID": "${carrier_apt_status.appointment_reference?json_string}",
|
|
||||||
<#else>
|
|
||||||
"RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}",
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${ref_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload":{
|
|
||||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
[
|
|
||||||
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) />
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
<#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !="">
|
|
||||||
"RefID": "${carrier_apt_status.appointment_reference?json_string}",
|
|
||||||
<#else>
|
|
||||||
"RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}",
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${ref_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload":{
|
|
||||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
[
|
|
||||||
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) />
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
<#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !="">
|
|
||||||
"RefID": "${carrier_apt_status.appointment_reference?json_string}",
|
|
||||||
<#else>
|
|
||||||
"RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}",
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${ref_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload":{
|
|
||||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
[
|
|
||||||
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) />
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
<#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !="">
|
|
||||||
"RefID": "${carrier_apt_status.appointment_reference?json_string}",
|
|
||||||
<#else>
|
|
||||||
"RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}",
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${ref_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload":{
|
|
||||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message HARDIS WMS -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
@@ -16,7 +16,6 @@
|
|||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign preparationStatusInterface = JsonUtil.jsonToMap(dataRfx) />
|
<#assign preparationStatusInterface = JsonUtil.jsonToMap(dataRfx) />
|
||||||
[
|
[
|
||||||
<#if preparationStatusInterface.preparation_type_code=="010" || preparationStatusInterface.preparation_type_code=="030">
|
|
||||||
<#--**Pick batch runned (200) **-->
|
<#--**Pick batch runned (200) **-->
|
||||||
<#if preparationStatusInterface.preparation_order_originator_reference?? && preparationStatusInterface.preparation_order_originator_reference!="">
|
<#if preparationStatusInterface.preparation_order_originator_reference?? && 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" >
|
||||||
@@ -66,11 +65,7 @@
|
|||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
<#else>
|
<#else>
|
||||||
<#--PRO reference is empty-->
|
<#stop "PRO reference is empty">
|
||||||
<#stop >
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#stop >
|
|
||||||
</#if>
|
</#if>
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${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}",
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${preparation_status_datetime}",
|
"DateTime": "${preparation_status_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${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}",
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${preparation_status_datetime}",
|
"DateTime": "${preparation_status_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${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}",
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${preparation_status_datetime}",
|
"DateTime": "${preparation_status_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${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}",
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${preparation_status_datetime}",
|
"DateTime": "${preparation_status_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${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}",
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${preparation_status_datetime}",
|
"DateTime": "${preparation_status_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message HARDIS WMS -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ActorPrefix.ftl">
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
@@ -17,7 +20,7 @@
|
|||||||
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
|
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreatedv2>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaSup_ActorCreated.ftl">
|
<#include "RFXtoRP_HsaSup_ActorCreated.ftl">
|
||||||
|
|||||||
@@ -1,6 +1,3 @@
|
|||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
@@ -11,18 +8,14 @@
|
|||||||
},
|
},
|
||||||
"Payload": {
|
"Payload": {
|
||||||
"Name": "${actor.designation?json_string}",
|
"Name": "${actor.designation?json_string}",
|
||||||
"ManagedStock": false,
|
|
||||||
"IsCarrier": false,
|
"IsCarrier": false,
|
||||||
<#-- ***Partner ID could be added here *** -->
|
|
||||||
<#-- "PartnerID": "${}", -->
|
|
||||||
|
|
||||||
<#include "RFXtoRP_HsaSup_ActorCreated_Metadata.ftl">,
|
<#include "RFXtoRP_HsaSup_ActorCreated_Metadata.ftl">,
|
||||||
|
|
||||||
"Address":
|
"Address":
|
||||||
{
|
{
|
||||||
<#-- if HARDIS WMS address is structured -->
|
<#-- if Reflex WMS address is structured -->
|
||||||
<#if actor.supplier_structured_address?? >
|
<#if actor.supplier_structured_address?? >
|
||||||
|
|
||||||
"Name": "${actor.supplier_structured_address.name_or_company?json_string}",
|
"Name": "${actor.supplier_structured_address.name_or_company?json_string}",
|
||||||
"StreetAddressOne" : "${actor.supplier_structured_address.street_and_PO?json_string}",
|
"StreetAddressOne" : "${actor.supplier_structured_address.street_and_PO?json_string}",
|
||||||
"StreetAddressTwo" : "${actor.supplier_structured_address.additionnal_data?json_string}",
|
"StreetAddressTwo" : "${actor.supplier_structured_address.additionnal_data?json_string}",
|
||||||
@@ -36,8 +29,7 @@
|
|||||||
</#if>
|
</#if>
|
||||||
"ProvinceCode": "${actor.supplier_structured_address.territorial_div_code?json_string}",
|
"ProvinceCode": "${actor.supplier_structured_address.territorial_div_code?json_string}",
|
||||||
"State": "${actor.supplier_structured_address.country_designation?json_string}"
|
"State": "${actor.supplier_structured_address.country_designation?json_string}"
|
||||||
|
<#-- if Reflex WMS address is not structured -->
|
||||||
<#-- if HARDIS WMS address is not structured -->
|
|
||||||
<#else>
|
<#else>
|
||||||
<#if actor.optional_attributes?? >
|
<#if actor.optional_attributes?? >
|
||||||
"Name": "${actor.optional_attributes.company_name?json_string}",
|
"Name": "${actor.optional_attributes.company_name?json_string}",
|
||||||
@@ -47,7 +39,6 @@
|
|||||||
"CountryCode" : ""
|
"CountryCode" : ""
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
},
|
},
|
||||||
<#if actor.optional_attributes?? >
|
<#if actor.optional_attributes?? >
|
||||||
"Phones": ["${actor.optional_attributes.telephone?json_string}",
|
"Phones": ["${actor.optional_attributes.telephone?json_string}",
|
||||||
|
|||||||
@@ -1,10 +1,4 @@
|
|||||||
<#-- use protobuf of class HsaSup to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsaSup to find Reflex WMS fields names -->
|
||||||
|
|
||||||
<#-- Best practices:
|
|
||||||
If the SK is of type:
|
|
||||||
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
|
||||||
- boolean: possible values: true and false
|
|
||||||
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
|
||||||
- decimal number: the separator is a point (e.g. 10.5)-->
|
|
||||||
|
|
||||||
"MetaData": [ ]
|
"MetaData": [ ]
|
||||||
@@ -1,6 +1,3 @@
|
|||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message HARDIS-WMS -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in ReflexPlatform -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ReflexUtils.ftl">
|
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
@@ -12,156 +9,32 @@
|
|||||||
|
|
||||||
<#assign aDateTime = .now>
|
<#assign aDateTime = .now>
|
||||||
|
|
||||||
|
<#stop>
|
||||||
|
|
||||||
<#switch cloudEventMsg.action>
|
<#switch cloudEventMsg.action>
|
||||||
<#case "C">
|
<#case "C">
|
||||||
|
<#case "U">
|
||||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign carrier_apt = JsonUtil.jsonToMap(dataRfx)>
|
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.SiteForceBookAppointment>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl">
|
|
||||||
}
|
}
|
||||||
<#if (carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false" && (carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") || carrier_apt.planned_unloading_end_datetime?starts_with("00") || carrier_apt.planned_unloading_end_datetime?contains("-00-"))) || (carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" && (carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-") || carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-"))) || (carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true" && (carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-") || carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-")))>
|
|
||||||
<#stop "One of the datetime fields of appointment is not initialized" >
|
|
||||||
<#else>
|
|
||||||
,
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCustomFieldsUpdated>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl">
|
|
||||||
}
|
|
||||||
</#if>
|
|
||||||
]
|
|
||||||
<#break>
|
|
||||||
<#case "U">
|
|
||||||
<#-- *********************************************** Action = Update ********************-->
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
||||||
<#assign carrier_apt = JsonUtil.jsonToMap(dataRfx)>
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCustomFieldsUpdated>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl">
|
|
||||||
},
|
|
||||||
<#include "RFXtoRP_HsrCarrierApt_AppointmentMetadataUpdated.ftl">
|
|
||||||
<#if carrier_apt.status?? && (carrier_apt.status.status_code=="999" || carrier_apt.status.status_code=="040" || carrier_apt.status.status_code=="030")>
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.SiteCancelAppointment>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl">
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.status?? && carrier_apt.status.status_code=="100"> <#--Carrier Arrived-->
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierArrived>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrCarrierApt_CarrierArrived.ftl">
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.status?? && carrier_apt.status.status_code=="210"> <#--Unloading Started -->
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentUnloadingStarted>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrCarrierApt_UnloadingStarted.ftl">
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.status?? && carrier_apt.status.status_code=="290"><#--Unloading Completed-->
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentUnloadingCompleted>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrCarrierApt_UnloadingCompleted.ftl">
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.status?? && carrier_apt.status.status_code=="310"><#--Loading Started-->
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentLoadingStarted>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrCarrierApt_LoadingStarted.ftl">
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.status?? && carrier_apt.status.status_code=="390"><#--Loading Completed-->
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentLoadingCompleted>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrCarrierApt_LoadingCompleted.ftl">
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.status?? && carrier_apt.status.status_code=="500"><#--Carrier Departed-->
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierDeparted>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrCarrierApt_CarrierDeparted.ftl">
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0) && ((carrier_apt.unloading_appointment =="true" && carrier_apt.load_appointment =="false") || (carrier_apt.unloading_appointment =="false" && carrier_apt.load_appointment =="true"))>
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.SiteWMSUpdateAppointment>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl">
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#else>
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.SiteForceRescheduleAppointment>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl">
|
|
||||||
}
|
|
||||||
]
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#case "D">
|
<#case "D">
|
||||||
<#-- *********************************************** Action = Delete ******************** -->
|
<#-- *********************************************** Action = DELETE *************************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign carrier_apt = JsonUtil.jsonToMap(dataRfx)>
|
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
<#-- Ajout des lignes-->
|
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.SiteCancelAppointment>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl">
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop >
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -1,52 +0,0 @@
|
|||||||
[
|
|
||||||
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) />
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
|
||||||
"RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo -->
|
|
||||||
<#else>
|
|
||||||
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo -->
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
|
||||||
"RefID": "${carrier_apt.appointment_reference?json_string}",
|
|
||||||
<#else>
|
|
||||||
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${ref_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
},
|
|
||||||
"CustomFields": [
|
|
||||||
{
|
|
||||||
"Key": "depot",
|
|
||||||
"Value": "${carrier_apt.physical_depot?json_string}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Key": "year",
|
|
||||||
"Value": "${carrier_apt.year_number?json_string}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Key": "number",
|
|
||||||
"Value": "${carrier_apt.appointment_number?json_string}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Key": "reference",
|
|
||||||
"Value": "${carrier_apt.appointment_reference?json_string}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Key": "carrier",
|
|
||||||
"Value": "${carrier_apt.planned_carrier?json_string}"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"Payload":{
|
|
||||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
<#-- A décommenter si besoin de les utiliser-->
|
|
||||||
<#-- Uncomment if you need to use them-->
|
|
||||||
<#--{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentMetaDataUpdated>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrCarrierApt_AppointmentMetadataUpdatedToConfigure.ftl">
|
|
||||||
},
|
|
||||||
-->
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
<#--
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
|
||||||
"AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}"
|
|
||||||
<#else>
|
|
||||||
"AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}"
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
|
||||||
"AppointmentID": "${carrier_apt.appointment_reference?json_string}"
|
|
||||||
<#else>
|
|
||||||
"AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}"
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
"ActorID": "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
|
||||||
<#--To configure-->
|
|
||||||
<#-- "MetaData": [
|
|
||||||
{
|
|
||||||
"Key": "string",
|
|
||||||
"Value": {
|
|
||||||
"Bool": "true / false",
|
|
||||||
"Float": 3.1415,
|
|
||||||
"Int": 42,
|
|
||||||
"String": "Hello World !",
|
|
||||||
"Timestamp": {
|
|
||||||
"AuthorTimeZone": "Europe/Paris",
|
|
||||||
"DateTime": "2023-01-01T00:00:00Z"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
-->
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
[
|
|
||||||
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) />
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
|
||||||
"AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo -->
|
|
||||||
<#else>
|
|
||||||
"AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo -->
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
|
||||||
"AppointmentID": "${carrier_apt.appointment_reference?json_string}",
|
|
||||||
<#else>
|
|
||||||
"AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${ref_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload":{
|
|
||||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
[
|
|
||||||
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) />
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
|
||||||
"AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo -->
|
|
||||||
<#else>
|
|
||||||
"AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo -->
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
|
||||||
"AppointmentID": "${carrier_apt.appointment_reference?json_string}",
|
|
||||||
<#else>
|
|
||||||
"AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${ref_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload":{
|
|
||||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
"CarrierInformation": [
|
|
||||||
|
|
||||||
]
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
[
|
|
||||||
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) />
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
|
||||||
"AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo -->
|
|
||||||
<#else>
|
|
||||||
"AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo -->
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
|
||||||
"AppointmentID": "${carrier_apt.appointment_reference?json_string}",
|
|
||||||
<#else>
|
|
||||||
"AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${ref_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload":{
|
|
||||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
[
|
|
||||||
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) />
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
|
||||||
"AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo -->
|
|
||||||
<#else>
|
|
||||||
"AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo -->
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
|
||||||
"AppointmentID": "${carrier_apt.appointment_reference?json_string}",
|
|
||||||
<#else>
|
|
||||||
"AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${ref_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload":{
|
|
||||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
|
|
||||||
"MetaData": [
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
"Quantities": [
|
|
||||||
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
"SegmentationSelections": [
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) />
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
|
||||||
"AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo -->
|
|
||||||
<#else>
|
|
||||||
"AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo -->
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
|
||||||
"AppointmentID": "${carrier_apt.appointment_reference?json_string}",
|
|
||||||
<#else>
|
|
||||||
"AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,148 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
"Header":{
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
|
||||||
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
|
||||||
"AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo -->
|
|
||||||
<#else>
|
|
||||||
"AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo -->
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
|
||||||
"AppointmentID": "${carrier_apt.appointment_reference?json_string}",
|
|
||||||
<#else>
|
|
||||||
"AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
"TimeZone":"${time_zone_rfx}",
|
|
||||||
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false">
|
|
||||||
<#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") || carrier_apt.planned_unloading_end_datetime?starts_with("00") || carrier_apt.planned_unloading_end_datetime?contains("-00-")>
|
|
||||||
<#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend is not initialized" >
|
|
||||||
</#if>
|
|
||||||
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
|
||||||
<#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_unloading_end_datetime?datetime.iso) />
|
|
||||||
<#if (duration <= 0)>
|
|
||||||
<#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" >
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" >
|
|
||||||
<#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-") || carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-")>
|
|
||||||
<#stop "planned_load_start_datetime or planned_load_end_datetime field of appointmend is not initialized" >
|
|
||||||
</#if>
|
|
||||||
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_LOADING>
|
|
||||||
<#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_load_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) />
|
|
||||||
<#if (duration <= 0)>
|
|
||||||
<#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" >
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
|
||||||
<#if carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-") || carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") >
|
|
||||||
<#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend is not initialized" >
|
|
||||||
</#if>
|
|
||||||
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
|
||||||
<#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) />
|
|
||||||
<#if (duration <= 0)>
|
|
||||||
<#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend are not valid" >
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN>
|
|
||||||
<#assign duration = 0 />
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
"AppointmentType": "${appointmentType}",
|
|
||||||
"Emails": ["${carrier_apt.creation_user_email?json_string}"],
|
|
||||||
"CustomFields": [
|
|
||||||
{
|
|
||||||
"Key": "depot",
|
|
||||||
"Value": "${carrier_apt.physical_depot?json_string}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Key": "year",
|
|
||||||
"Value": "${carrier_apt.year_number?json_string}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Key": "number",
|
|
||||||
"Value": "${carrier_apt.appointment_number?json_string}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Key": "reference",
|
|
||||||
"Value": "${carrier_apt.appointment_reference?json_string}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Key": "carrier",
|
|
||||||
"Value": "${carrier_apt.planned_carrier?json_string}"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
<#include "RFXtoRP_HsrCarrierApt_SegmentationSelections.ftl">,
|
|
||||||
<#include "RFXtoRP_HsrCarrierApt_CarrierInformation.ftl">,
|
|
||||||
<#include "RFXtoRP_HsrCarrierApt_MetadataAppointment.ftl">,
|
|
||||||
<#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0)>
|
|
||||||
"Commissions": [
|
|
||||||
<#list carrier_apt.physical_receipt_list?filter(l ->l??) as physical_receipt>
|
|
||||||
{
|
|
||||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
|
||||||
<#if physical_receipt.physical_receipt_reference?? && physical_receipt.physical_receipt_reference!="">
|
|
||||||
"OrderID": "${physical_receipt.physical_receipt_reference?json_string}",
|
|
||||||
"ExecutionflowID": "${physical_receipt.physical_receipt_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
"OrderID": "${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year}${physical_receipt.receipt_number}",
|
|
||||||
"ExecutionflowID": "${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year}${physical_receipt.receipt_number}",
|
|
||||||
</#if>
|
|
||||||
"ProjectID": "${projectRP}",
|
|
||||||
<#include "RFXtoRP_HsrCarrierApt_Quantities.ftl">
|
|
||||||
}<#sep>,</#sep>
|
|
||||||
</#list>
|
|
||||||
],
|
|
||||||
<#else>
|
|
||||||
"Commissions": [
|
|
||||||
{
|
|
||||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
|
||||||
"ProjectID": "${projectRP}",
|
|
||||||
<#include "RFXtoRP_HsrCarrierApt_Quantities.ftl">
|
|
||||||
}
|
|
||||||
],
|
|
||||||
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
|
||||||
"Reason": "UNLOADING AND LOADING / ${carrier_apt.appointment_designation?json_string}",
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.appointment_designation?? && carrier_apt.appointment_designation!="">
|
|
||||||
"Reason": "${carrier_apt.appointment_designation?json_string}",
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
|
||||||
"Reason": "${carrier_apt.appointment_reference?json_string}",
|
|
||||||
<#else>
|
|
||||||
"Reason": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
|
|
||||||
"Slots": [{
|
|
||||||
<#-- calcul de de la durée en fonction des start et end time-->
|
|
||||||
"DurationInSeconds": "${duration}",
|
|
||||||
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false" >
|
|
||||||
<#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-")>
|
|
||||||
<#stop "planned_unloading_start_datetime field of appointmend is not initialized" >
|
|
||||||
</#if>
|
|
||||||
"StartDateTime": "${carrier_apt.planned_unloading_start_datetime}"
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true">
|
|
||||||
<#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-")>
|
|
||||||
<#stop "planned_load_start_datetime field of appointmend is not initialized" >
|
|
||||||
</#if>
|
|
||||||
"StartDateTime": "${carrier_apt.planned_load_start_datetime}"
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
|
||||||
<#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-")>
|
|
||||||
<#stop "planned_unloading_start_datetime field of appointmend is not initialized" >
|
|
||||||
</#if>
|
|
||||||
"StartDateTime": "${carrier_apt.planned_unloading_start_datetime}"
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
[
|
|
||||||
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) />
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
|
||||||
"AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo -->
|
|
||||||
<#else>
|
|
||||||
"AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo -->
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
|
||||||
"AppointmentID": "${carrier_apt.appointment_reference?json_string}",
|
|
||||||
<#else>
|
|
||||||
"AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${ref_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload":{
|
|
||||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
[
|
|
||||||
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) />
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
|
||||||
"AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo -->
|
|
||||||
<#else>
|
|
||||||
"AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo -->
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
|
||||||
"AppointmentID": "${carrier_apt.appointment_reference?json_string}",
|
|
||||||
<#else>
|
|
||||||
"AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${ref_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload":{
|
|
||||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,144 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
<#assign creation_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) />
|
|
||||||
|
|
||||||
"Header":{
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
|
||||||
"AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo -->
|
|
||||||
<#else>
|
|
||||||
"AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo -->
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
|
||||||
"AppointmentID": "${carrier_apt.appointment_reference?json_string}",
|
|
||||||
<#else>
|
|
||||||
"AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false">
|
|
||||||
<#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") || carrier_apt.planned_unloading_end_datetime?starts_with("00") || carrier_apt.planned_unloading_end_datetime?contains("-00-")>
|
|
||||||
<#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend is not initialized" >
|
|
||||||
</#if>
|
|
||||||
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
|
||||||
<#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_unloading_end_datetime?datetime.iso) />
|
|
||||||
<#if (duration <= 0)>
|
|
||||||
<#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" >
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" >
|
|
||||||
<#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-") || carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-")>
|
|
||||||
<#stop "planned_load_start_datetime or planned_load_end_datetime field of appointmend is not initialized" >
|
|
||||||
</#if>
|
|
||||||
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_LOADING>
|
|
||||||
<#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_load_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) />
|
|
||||||
<#if (duration <= 0)>
|
|
||||||
<#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" >
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
|
||||||
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
|
||||||
<#if carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-") || carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") >
|
|
||||||
<#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend is not initialized" >
|
|
||||||
</#if>
|
|
||||||
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
|
||||||
<#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) />
|
|
||||||
<#if (duration <= 0)>
|
|
||||||
<#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend are not valid" >
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN>
|
|
||||||
<#assign duration = 0 /> <#-- à confirmer -->
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
|
||||||
"TimeZone":"${time_zone_rfx}",
|
|
||||||
"CustomFields": [
|
|
||||||
{
|
|
||||||
"Key": "depot",
|
|
||||||
"Value": "${carrier_apt.physical_depot?json_string}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Key": "year",
|
|
||||||
"Value": "${carrier_apt.year_number?json_string}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Key": "number",
|
|
||||||
"Value": "${carrier_apt.appointment_number?json_string}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Key": "reference",
|
|
||||||
"Value": "${carrier_apt.appointment_reference?json_string}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Key": "carrier",
|
|
||||||
"Value": "${carrier_apt.planned_carrier?json_string}"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
<#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0)>
|
|
||||||
"Commissions": [
|
|
||||||
<#list carrier_apt.physical_receipt_list?filter(l ->l??) as physical_receipt>
|
|
||||||
{
|
|
||||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
|
||||||
<#if physical_receipt.physical_receipt_reference?? && physical_receipt.physical_receipt_reference!="">
|
|
||||||
"OrderID": "${physical_receipt.physical_receipt_reference?json_string}",
|
|
||||||
"ExecutionflowID": "${physical_receipt.physical_receipt_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
"OrderID": "${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year}${physical_receipt.receipt_number}",
|
|
||||||
"ExecutionflowID": "${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year}${physical_receipt.receipt_number}",
|
|
||||||
</#if>
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
}<#sep>,</#sep>
|
|
||||||
</#list>
|
|
||||||
],
|
|
||||||
<#else>
|
|
||||||
"Commissions": [
|
|
||||||
{
|
|
||||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
|
||||||
"ProjectID": "${projectRP}",
|
|
||||||
<#include "RFXtoRP_HsrCarrierApt_Quantities.ftl">
|
|
||||||
}
|
|
||||||
],
|
|
||||||
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
|
||||||
"Reason": "UNLOADING AND LOADING / ${carrier_apt.appointment_designation?json_string}",
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.appointment_designation?? && carrier_apt.appointment_designation!="">
|
|
||||||
"Reason": "${carrier_apt.appointment_designation?json_string}",
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
|
||||||
"Reason": "${carrier_apt.appointment_reference?json_string}",
|
|
||||||
<#else>
|
|
||||||
"Reason": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
"Slots": [{
|
|
||||||
<#-- calcul de de la durée en fonction des start et end time-->
|
|
||||||
"DurationInSeconds": "${duration}",
|
|
||||||
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false" >
|
|
||||||
<#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-")>
|
|
||||||
<#stop "planned_unloading_start_datetime field of appointmend is not initialized" >
|
|
||||||
</#if>
|
|
||||||
|
|
||||||
"StartDateTime": "${carrier_apt.planned_unloading_start_datetime}"
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true">
|
|
||||||
<#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-")>
|
|
||||||
<#stop "planned_load_start_datetime field of appointmend is not initialized" >
|
|
||||||
</#if>
|
|
||||||
"StartDateTime": "${carrier_apt.planned_load_start_datetime}"
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
|
||||||
<#stop "Not managed">
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
}]
|
|
||||||
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,82 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
<#assign creation_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) />
|
|
||||||
"Header":{
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
|
||||||
"AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo -->
|
|
||||||
<#else>
|
|
||||||
"AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo -->
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
|
||||||
"AppointmentID": "${carrier_apt.appointment_reference?json_string}",
|
|
||||||
<#else>
|
|
||||||
"AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
|
||||||
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false">
|
|
||||||
<#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") || carrier_apt.planned_unloading_end_datetime?starts_with("00") || carrier_apt.planned_unloading_end_datetime?contains("-00-")>
|
|
||||||
<#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend is not initialized" >
|
|
||||||
</#if>
|
|
||||||
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
|
||||||
<#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_unloading_end_datetime?datetime.iso) />
|
|
||||||
<#if (duration <= 0)>
|
|
||||||
<#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" >
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" >
|
|
||||||
<#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-") || carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-")>
|
|
||||||
<#stop "planned_load_start_datetime or planned_load_end_datetime field of appointmend is not initialized" >
|
|
||||||
</#if>
|
|
||||||
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_LOADING>
|
|
||||||
<#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_load_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) />
|
|
||||||
<#if (duration <= 0)>
|
|
||||||
<#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" >
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
|
||||||
<#if carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-") || carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") >
|
|
||||||
<#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend is not initialized" >
|
|
||||||
</#if>
|
|
||||||
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
|
||||||
<#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) />
|
|
||||||
<#if (duration <= 0)>
|
|
||||||
<#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend are not valid" >
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN>
|
|
||||||
<#assign duration = 0 /> <#-- à confirmer -->
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
"Slots": [{
|
|
||||||
<#-- calcul de de la durée en fonction des start et end time-->
|
|
||||||
"DurationInSeconds": "${duration}",
|
|
||||||
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false" >
|
|
||||||
<#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-")>
|
|
||||||
<#stop "planned_unloading_start_datetime field of appointmend is not initialized" >
|
|
||||||
</#if>
|
|
||||||
"StartDateTime": "${carrier_apt.planned_unloading_start_datetime}"
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true">
|
|
||||||
<#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-")>
|
|
||||||
<#stop "planned_load_start_datetime field of appointmend is not initialized" >
|
|
||||||
</#if>
|
|
||||||
"StartDateTime": "${carrier_apt.planned_load_start_datetime}"
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
|
||||||
<#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-")>
|
|
||||||
<#stop "planned_unloading_start_datetime field of appointmend is not initialized" >
|
|
||||||
</#if>
|
|
||||||
"StartDateTime": "${carrier_apt.planned_unloading_start_datetime}"
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
}]
|
|
||||||
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message HARDIS WMS -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreatedv2>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrDepot_ActorCreated.ftl">
|
<#include "RFXtoRP_HsrDepot_ActorCreated.ftl">
|
||||||
|
|||||||
@@ -11,20 +11,12 @@
|
|||||||
},
|
},
|
||||||
"Payload": {
|
"Payload": {
|
||||||
"Name": "${depot.physical_depot_designation?json_string}",
|
"Name": "${depot.physical_depot_designation?json_string}",
|
||||||
"ManagedStock": true,
|
|
||||||
"IsCarrier": false,
|
"IsCarrier": false,
|
||||||
<#-- ***Partner ID could be added here *** -->
|
|
||||||
<#-- "PartnerID": "${}", -->
|
|
||||||
|
|
||||||
|
|
||||||
<#include "RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl">,
|
<#include "RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl">,
|
||||||
|
|
||||||
|
|
||||||
"Address":
|
"Address":
|
||||||
{
|
{
|
||||||
<#-- if HARDIS WMS address is structured -->
|
<#-- if Reflex WMS address is structured -->
|
||||||
<#if depot.physical_depot_structured_address?? >
|
<#if depot.physical_depot_structured_address?? >
|
||||||
|
|
||||||
"Name": "${depot.physical_depot_structured_address.name_or_company?json_string}",
|
"Name": "${depot.physical_depot_structured_address.name_or_company?json_string}",
|
||||||
"StreetAddressOne" : "${depot.physical_depot_structured_address.street_and_PO?json_string}",
|
"StreetAddressOne" : "${depot.physical_depot_structured_address.street_and_PO?json_string}",
|
||||||
"StreetAddressTwo" : "${depot.physical_depot_structured_address.additionnal_data?json_string}",
|
"StreetAddressTwo" : "${depot.physical_depot_structured_address.additionnal_data?json_string}",
|
||||||
@@ -38,8 +30,7 @@
|
|||||||
</#if>
|
</#if>
|
||||||
"ProvinceCode": "${depot.physical_depot_structured_address.territorial_div_code?json_string}",
|
"ProvinceCode": "${depot.physical_depot_structured_address.territorial_div_code?json_string}",
|
||||||
"State": "${depot.physical_depot_structured_address.country_designation?json_string}"
|
"State": "${depot.physical_depot_structured_address.country_designation?json_string}"
|
||||||
|
<#-- if Reflex WMS address is not structured -->
|
||||||
<#-- if HARDIS WMS address is not structured -->
|
|
||||||
<#else>
|
<#else>
|
||||||
<#if depot.physical_depot_address??>
|
<#if depot.physical_depot_address??>
|
||||||
"Name": "${depot.physical_depot_address.company_name?json_string}",
|
"Name": "${depot.physical_depot_address.company_name?json_string}",
|
||||||
|
|||||||
@@ -1,10 +1,4 @@
|
|||||||
<#-- use protobuf of class HsrDepot to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsrDepot to find Reflex WMS fields names -->
|
||||||
|
|
||||||
<#-- Best practices:
|
|
||||||
If the SK is of type:
|
|
||||||
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
|
||||||
- boolean: possible values: true and false
|
|
||||||
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
|
||||||
- decimal number: the separator is a point (e.g. 10.5)-->
|
|
||||||
|
|
||||||
"MetaData": [ ]
|
"MetaData": [ ]
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message HARDIS WMS -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
<#-- **** input parameters ***** -->
|
|
||||||
<#-- input : message HARDIS WMS -->
|
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
|
||||||
<#assign projectRP = project>
|
|
||||||
<#assign organisationRP = organisation>
|
|
||||||
|
|
||||||
<#assign aDateTime = .now>
|
|
||||||
|
|
||||||
<#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>
|
|
||||||
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
<#-- **** input parameters ***** -->
|
|
||||||
<#-- input : message HARDIS WMS -->
|
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
|
||||||
<#assign projectRP = project>
|
|
||||||
<#assign organisationRP = organisation>
|
|
||||||
|
|
||||||
<#assign aDateTime = .now>
|
|
||||||
|
|
||||||
<#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>
|
|
||||||
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message HARDIS WMS -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
@@ -18,7 +18,6 @@
|
|||||||
<#assign preparationOrder = JsonUtil.jsonToMap(dataRfx)>
|
<#assign preparationOrder = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
|
||||||
<#if preparationOrder.total_lv_validated !=0>
|
<#if preparationOrder.total_lv_validated !=0>
|
||||||
<#if preparationOrder.preparation_line_lst??>
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsPrepared>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsPrepared>
|
||||||
@@ -26,7 +25,6 @@
|
|||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl">
|
<#include "RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl">
|
||||||
},
|
},
|
||||||
<#include "RFXtoRP_HsrPrepa_ExecutionflowMetadataUpdated.ftl">
|
|
||||||
{
|
{
|
||||||
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
|
||||||
@@ -42,12 +40,6 @@
|
|||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrPrepa_CarrierUpdated.ftl">
|
<#include "RFXtoRP_HsrPrepa_CarrierUpdated.ftl">
|
||||||
},
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.OrderCarrierUpdated>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl">
|
|
||||||
}
|
}
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
@@ -57,7 +49,8 @@
|
|||||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") as preparation_line>
|
<#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>
|
<#list preparation_line.despatched_ipg_list as despatched_ipg>
|
||||||
<#assign HUadded_packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) />
|
<#assign HUadded_packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) />
|
||||||
<#if (!hd_numberHmap[despatched_ipg.hd_number]?? || !hd_numberHmap[despatched_ipg.carton_number]??) && (trackingNumberSource==2 || trackingNumberSource==3 || (despatched_ipg.consignment_unit_id!="" && trackingNumberSource==1))>
|
<#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>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled>
|
||||||
@@ -97,12 +90,7 @@
|
|||||||
<#assign refIDHmap ={}>
|
<#assign refIDHmap ={}>
|
||||||
]
|
]
|
||||||
<#else>
|
<#else>
|
||||||
<#-- No line-->
|
<#stop "no confirmed quantity for the preparation - preparation closed">
|
||||||
<#stop >
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#-- no confirmed quantity for the preparation - preparation closed-->
|
|
||||||
<#stop >
|
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID":{
|
"ID":{
|
||||||
"RefID": "${OrderOriginReference}"
|
"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}"
|
||||||
},
|
},
|
||||||
"Payload":{
|
"Payload":{
|
||||||
"Carrier": {
|
"Carrier": {
|
||||||
|
|||||||
@@ -1,27 +0,0 @@
|
|||||||
<#--
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID":{
|
|
||||||
"RefID": "${Your_Object_ID}"
|
|
||||||
},
|
|
||||||
"Payload":{
|
|
||||||
"MetaData": [
|
|
||||||
{
|
|
||||||
"Key": "string",
|
|
||||||
"Value": {
|
|
||||||
"Bool": "true / false",
|
|
||||||
"Float": 3.1415,
|
|
||||||
"Int": 42,
|
|
||||||
"String": "Hello World !",
|
|
||||||
"Timestamp": {
|
|
||||||
"AuthorTimeZone": "Europe/Paris",
|
|
||||||
"DateTime": "2023-01-01T00:00:00Z"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-->
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
<#-- A décommenter si besoin de les utiliser-->
|
|
||||||
<#-- Uncomment if you need to use them-->
|
|
||||||
<#--
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowMetaDataUpdated>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrPrepa_ExecutionflowMetaDataUpdatedToConfigure.ftl">
|
|
||||||
},
|
|
||||||
-->
|
|
||||||
@@ -1,10 +1,7 @@
|
|||||||
<#-- use protobuf of class HsrPrepa to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsrPrepa to find Reflex WMS fields names -->
|
||||||
|
|
||||||
<#-- Best practices:
|
|
||||||
If the SK is of type:
|
|
||||||
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
|
||||||
- boolean: possible values: true and false
|
|
||||||
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
|
||||||
- decimal number: the separator is a point (e.g. 10.5)-->
|
|
||||||
|
|
||||||
|
<#--
|
||||||
|
"MetaData" :[
|
||||||
|
]
|
||||||
|
-->
|
||||||
"MetaData": [ ]
|
"MetaData": [ ]
|
||||||
@@ -1,11 +1,5 @@
|
|||||||
<#-- use protobuf of class Hsrprepa to find HARDIS WMS fields names -->
|
<#-- use protobuf of class Hsrprepa to find Reflex WMS fields names -->
|
||||||
<#--
|
<#--
|
||||||
<#-- Best practices:
|
|
||||||
If the SK is of type:
|
|
||||||
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
|
||||||
- boolean: possible values: true and false
|
|
||||||
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
|
||||||
- decimal number: the separator is a point (e.g. 10.5)
|
|
||||||
"SegmentationKeys": [
|
"SegmentationKeys": [
|
||||||
{
|
{
|
||||||
"Key": "Grade",
|
"Key": "Grade",
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
<#-- use protobuf of class HsrPrepa to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsrPrepa to find Reflex WMS fields names -->
|
||||||
|
|
||||||
<#-- Best practices:
|
<#--
|
||||||
If the SK is of type:
|
"MetaData" :[
|
||||||
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
|
||||||
- boolean: possible values: true and false
|
|
||||||
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
|
||||||
- decimal number: the separator is a point (e.g. 10.5)-->
|
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
-->
|
||||||
"MetaData": [ ]
|
"MetaData": [ ]
|
||||||
@@ -113,7 +113,7 @@
|
|||||||
<#include "RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl">
|
<#include "RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl">
|
||||||
},
|
},
|
||||||
"OrderID": "${preparation_line.preparation_order_originator_reference?trim?json_string}",
|
"OrderID": "${preparation_line.preparation_order_originator_reference?trim?json_string}",
|
||||||
"ExecutionflowID": "${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.pro_originator_reference_line_number!0) != 0>
|
<#if (preparation_line.pro_originator_reference_line_number!0) != 0>
|
||||||
"LineID": "${preparation_line.pro_originator_reference_line_number}",
|
"LineID": "${preparation_line.pro_originator_reference_line_number}",
|
||||||
<#else>
|
<#else>
|
||||||
|
|||||||
@@ -1,29 +0,0 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#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>
|
|
||||||
<#if !refIDHmap_local[OrderOriginReference]?? >
|
|
||||||
<#if refIDHmap_local?size != 0 >
|
|
||||||
,
|
|
||||||
</#if>
|
|
||||||
<#assign refIDHmap_local +={OrderOriginReference,OrderOriginReference}>
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID":{
|
|
||||||
"RefID": "${OrderOriginReference}"
|
|
||||||
},
|
|
||||||
"Payload":{
|
|
||||||
"Carrier": {
|
|
||||||
"ActorID": "${RFXtoRPprefixCarrier(preparationOrder.load_data.carrier_code?trim?json_string)}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</#if>
|
|
||||||
</#list>
|
|
||||||
<#assign refIDHmap_local ={}>
|
|
||||||
]
|
|
||||||
@@ -53,10 +53,8 @@
|
|||||||
"Payload": {
|
"Payload": {
|
||||||
<#if despatched_ipg.carton_number != "000000000000000000">
|
<#if despatched_ipg.carton_number != "000000000000000000">
|
||||||
"HandlingunitID": "${despatched_ipg.carton_number}"
|
"HandlingunitID": "${despatched_ipg.carton_number}"
|
||||||
<#assign hd_numberHmap += {despatched_ipg.carton_number,despatched_ipg.carton_number}>
|
|
||||||
<#else>
|
<#else>
|
||||||
"HandlingunitID": "${despatched_ipg.hd_number}"
|
"HandlingunitID": "${despatched_ipg.hd_number}"
|
||||||
<#assign hd_numberHmap += {despatched_ipg.hd_number,despatched_ipg.hd_number}>
|
|
||||||
</#if>
|
</#if>
|
||||||
<#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" >
|
<#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" >
|
||||||
,
|
,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message HARDIS WMS -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
@@ -16,33 +16,29 @@
|
|||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
|
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
|
|
||||||
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
|
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
|
||||||
<#-- 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?? && (preparation_order.preparation_type_code == "010" || preparation_order.preparation_type_code == "030")>
|
<#if preparation_order.preparation_type_code == "010" || preparation_order.preparation_type_code == "030">
|
||||||
<#if preparation_order.line_list??>
|
<#-- Only if preparation order not confirmed -->
|
||||||
|
<#if preparation_order.preparation_order_confirmed == "false" >
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl">
|
<#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl">
|
||||||
},
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCustomFieldsUpdated>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrPro_ExecutionflowCustomFieldsUpdated.ftl">
|
|
||||||
}
|
}
|
||||||
<#else>
|
<#else>
|
||||||
<#-- No line -->
|
<#-- preparation order already confirmed -->
|
||||||
<#stop>
|
<#stop>
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
<#else>
|
<#else>
|
||||||
<#-- preparation order type not supported -->
|
<#-- preparation order type not supported -->
|
||||||
<#stop>
|
<#stop>
|
||||||
</#if>
|
</#if>
|
||||||
<#else>
|
<#else>
|
||||||
<#-- PRO reference is empty -->
|
<#stop "PRO reference is empty">
|
||||||
<#stop>
|
|
||||||
</#if>
|
</#if>
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
@@ -53,7 +49,6 @@
|
|||||||
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
|
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
|
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
|
||||||
<#if preparation_order.line_list??>
|
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
@@ -61,12 +56,7 @@
|
|||||||
<#include "RFXtoRP_HsrPro_ExecutionflowCancelled.ftl">
|
<#include "RFXtoRP_HsrPro_ExecutionflowCancelled.ftl">
|
||||||
}
|
}
|
||||||
<#else>
|
<#else>
|
||||||
<#-- No line -->
|
<#stop "PRO reference is empty">
|
||||||
<#stop>
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#-- PRO reference is empty -->
|
|
||||||
<#stop>
|
|
||||||
</#if>
|
</#if>
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${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}",
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${preparation_status_datetime}",
|
"DateTime": "${preparation_status_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
|||||||
@@ -1,40 +0,0 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"Payload" :{},
|
|
||||||
"ID":{
|
|
||||||
"CustomFields": [
|
|
||||||
{
|
|
||||||
"Key": "depot_code",
|
|
||||||
"Value": "${preparation_order.physical_depot_code?trim?json_string}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Key": "activity_code",
|
|
||||||
"Value": "${preparation_order.activity_code?trim?json_string}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Key": "originator_code",
|
|
||||||
"Value": "${preparation_order.originator_code?trim?json_string}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Key": "reference",
|
|
||||||
"Value": "${preparation_order.originator_reference?trim?json_string}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Key": "order_year",
|
|
||||||
"Value": "${preparation_order.preparation_order_year}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Key": "order_number",
|
|
||||||
"Value": "${preparation_order.preparation_order_number}"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"RefID": "${preparation_order.originator_reference?trim?json_string}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${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}",
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${pro_creation_datetime}",
|
"DateTime": "${pro_creation_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
@@ -31,17 +31,10 @@
|
|||||||
},
|
},
|
||||||
"ShipFromAcked": true,
|
"ShipFromAcked": true,
|
||||||
"ShipTo": {
|
"ShipTo": {
|
||||||
<#if
|
<#if preparation_order.intermediate_consignee_code?? && preparation_order.intermediate_consignee_code!="">
|
||||||
<#-- preparation_order.address.type_code == "" &&
|
"ActorID": "${RFXtoRPprefixDepot(preparation_order.intermediate_consignee_code?json_string)}"
|
||||||
preparation_order.address.title_code == "" &&
|
<#else>
|
||||||
preparation_order.address.first_name == "" &&
|
<#if preparation_order.address.address_type_code == "" &&
|
||||||
preparation_order.address.last_name == "" &&
|
|
||||||
preparation_order.address.mail_address == "" &&
|
|
||||||
preparation_order.address.contact_type_code == "" &&
|
|
||||||
preparation_order.address.mobile_phone_number == "" &&
|
|
||||||
preparation_order.address.land_line_phone_number == "" &&
|
|
||||||
preparation_order.address.fax_number == "" && -->
|
|
||||||
preparation_order.address.address_type_code == "" &&
|
|
||||||
preparation_order.address.name_or_company_name == "" &&
|
preparation_order.address.name_or_company_name == "" &&
|
||||||
preparation_order.address.additional_address_data_1 == "" &&
|
preparation_order.address.additional_address_data_1 == "" &&
|
||||||
preparation_order.address.additional_address_data_2 == "" &&
|
preparation_order.address.additional_address_data_2 == "" &&
|
||||||
@@ -57,13 +50,8 @@
|
|||||||
"Address" :
|
"Address" :
|
||||||
{
|
{
|
||||||
"City" : "${(preparation_order.address.post_code_area_name!"")?json_string}",
|
"City" : "${(preparation_order.address.post_code_area_name!"")?json_string}",
|
||||||
<#assign isCountryCode = JsonUtil.isCountryCode(preparation_order.address.iso_country_code?upper_case) />
|
"CountryCode" : "${preparation_order.address.iso_country_code!""}",
|
||||||
<#if isCountryCode>
|
"PostalCode" : "${preparation_order.address.postal_code!""}",
|
||||||
"CountryCode" : "${(preparation_order.address.iso_country_code!"")?json_string}",
|
|
||||||
<#else>
|
|
||||||
"CountryCode" : "",
|
|
||||||
</#if>
|
|
||||||
"PostalCode" : "${(preparation_order.address.postal_code!"")?json_string}",
|
|
||||||
"StreetAddressOne" : "${(preparation_order.address.street_and_number_and_po_box!"")?json_string}",
|
"StreetAddressOne" : "${(preparation_order.address.street_and_number_and_po_box!"")?json_string}",
|
||||||
"StreetAddressTwo" : "${(preparation_order.address.additional_address_data_1!"")?json_string}",
|
"StreetAddressTwo" : "${(preparation_order.address.additional_address_data_1!"")?json_string}",
|
||||||
"StreetAddressThree" : "${(preparation_order.address.additional_address_data_2!"")?json_string}"
|
"StreetAddressThree" : "${(preparation_order.address.additional_address_data_2!"")?json_string}"
|
||||||
@@ -77,6 +65,7 @@
|
|||||||
"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}" ]
|
"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}",
|
"OrderID":"${preparation_order.originator_reference?trim?json_string}",
|
||||||
<#if preparation_order.line_list??>
|
<#if preparation_order.line_list??>
|
||||||
@@ -117,8 +106,14 @@
|
|||||||
{
|
{
|
||||||
"RequestedDeliveryDateTime" :
|
"RequestedDeliveryDateTime" :
|
||||||
{
|
{
|
||||||
|
<#if preparation_order.intermediate_consignee_code?? && preparation_order.intermediate_consignee_code!="" && preparation_order.intermediate_delivery_start_datetime?? && preparation_order.intermediate_delivery_start_datetime!="0000-00-00T00:00:00">
|
||||||
|
<#assign intermediate_delivery_start_datetime = RfxDateTimetoUTCWithTimezone(preparation_order.intermediate_delivery_start_datetime,time_zone_rfx) />
|
||||||
|
"DateTime": "${intermediate_delivery_start_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
<#else>
|
||||||
"DateTime": "${planned_final_delivery_start_datetime}",
|
"DateTime": "${planned_final_delivery_start_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
</#if>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,6 @@
|
|||||||
<#-- use protobuf of class HsrPro to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsrPro to find Reflex Wms fields names -->
|
||||||
|
|
||||||
<#--
|
<#--
|
||||||
<#-- Best practices:
|
|
||||||
If the SK is of type:
|
|
||||||
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
|
||||||
- boolean: possible values: true and false
|
|
||||||
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
|
||||||
- decimal number: the separator is a point (e.g. 10.5)
|
|
||||||
|
|
||||||
"MetaData": [
|
"MetaData": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,10 +1,4 @@
|
|||||||
<#-- use protobuf of class HsrPro to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsrPro to find Reflex Wms fields names -->
|
||||||
|
|
||||||
<#-- Best practices:
|
|
||||||
If the SK is of type:
|
|
||||||
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
|
||||||
- boolean: possible values: true and false
|
|
||||||
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
|
||||||
- decimal number: the separator is a point (e.g. 10.5)-->
|
|
||||||
|
|
||||||
"MetaData": [ ]
|
"MetaData": [ ]
|
||||||
@@ -1,11 +1,5 @@
|
|||||||
<#-- use protobuf of class HsrPro to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsrPro to find Reflex WMS fields names -->
|
||||||
<#--
|
<#--
|
||||||
<#-- Best practices:
|
|
||||||
If the SK is of type:
|
|
||||||
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
|
||||||
- boolean: possible values: true and false
|
|
||||||
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
|
||||||
- decimal number: the separator is a point (e.g. 10.5)
|
|
||||||
|
|
||||||
"SegmentationKeys": [
|
"SegmentationKeys": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message HARDIS WMS -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
@@ -15,10 +15,25 @@
|
|||||||
|
|
||||||
<#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_reference ?? && receipt.receipt_reference!="">
|
||||||
<#stop "ignored message because receipt type = transfert">
|
<#if receipt.receipt_type = "030">
|
||||||
|
[
|
||||||
|
{
|
||||||
|
<#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>
|
<#else>
|
||||||
<#if receipt.line_list ??>
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||||
@@ -32,18 +47,12 @@
|
|||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
|
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
|
||||||
},
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCustomFieldsUpdated>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrReceiptList_CustomFieldsUpdated.ftl">
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#else>
|
|
||||||
<#-- No line-->
|
|
||||||
<#stop>
|
|
||||||
</#if>
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#stop "Receipt reference is empty">
|
||||||
</#if>
|
</#if>
|
||||||
<#break>
|
<#break>
|
||||||
<#case "U">
|
<#case "U">
|
||||||
@@ -51,12 +60,13 @@
|
|||||||
<#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_confirmed == "true" && receipt.confirmation_total_level_1==0 && receipt.confirmation_total_level_2==0 && receipt.confirmation_total_level_3==0>
|
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
||||||
|
<#if receipt.receipt_type = "030" && receipt.receipt_confirmed == "true" >
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl">
|
<#include "RFXtoRP_HsrReceiptList_TransfertExecutionflowReceiptCompleted.ftl">
|
||||||
}
|
}
|
||||||
<#else>
|
<#else>
|
||||||
<#if receipt.receipt_confirmed == "true">
|
<#if receipt.receipt_confirmed == "true">
|
||||||
@@ -67,10 +77,6 @@
|
|||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl">
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl">
|
||||||
}
|
}
|
||||||
<#else>
|
<#else>
|
||||||
<#if receipt.receipt_type == "030">
|
|
||||||
<#stop "ignored message because receipt type = transfert">
|
|
||||||
<#else>
|
|
||||||
<#if receipt.line_list ??>
|
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
@@ -83,12 +89,10 @@
|
|||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
|
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
|
||||||
}
|
}
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
<#else>
|
<#else>
|
||||||
<#-- No line-->
|
<#stop "Receipt reference is empty">
|
||||||
<#stop>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
</#if>
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
@@ -98,7 +102,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.line_list ??>
|
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
||||||
{
|
{
|
||||||
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||||
@@ -107,8 +111,7 @@
|
|||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl">
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl">
|
||||||
}
|
}
|
||||||
<#else>
|
<#else>
|
||||||
<#-- No line-->
|
<#stop "Receipt reference is empty">
|
||||||
<#stop>
|
|
||||||
</#if>
|
</#if>
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|||||||
@@ -1,44 +0,0 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"Payload" :{},
|
|
||||||
"ID":{
|
|
||||||
"CustomFields": [
|
|
||||||
{
|
|
||||||
"Key": "depot_code",
|
|
||||||
"Value": "${receipt.physical_depot_code?trim?json_string}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Key": "activity_code",
|
|
||||||
"Value": "${receipt.activity_code?trim?json_string}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Key": "originator_code",
|
|
||||||
"Value": "${receipt.originator_code?trim?json_string}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Key": "reference",
|
|
||||||
"Value": "${receipt.receipt_reference?trim?json_string}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Key": "order_year",
|
|
||||||
"Value": "${receipt.receipt_year}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Key": "order_number",
|
|
||||||
"Value": "${receipt.receipt_number}"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
|
||||||
"RefID": "${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_year}${receipt.receipt_number}"
|
|
||||||
</#if>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,20 +1,14 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.modification_datetime,time_zone_rfx) />
|
<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.modification_datetime,time_zone_rfx) />
|
||||||
<#assign refIDHmap_local ={}>
|
|
||||||
[
|
[
|
||||||
<#if receipt.line_list??>
|
|
||||||
<#list receipt.line_list as receipt_line >
|
|
||||||
<#if receipt_line.origin_order_line_reference?? && 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}"},
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${receipt_line.origin_order_line_reference?trim?json_string}",
|
"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": {
|
"RefDate": {
|
||||||
"DateTime": "${receipt_status_datetime}",
|
"DateTime": "${receipt_status_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
@@ -23,26 +17,4 @@
|
|||||||
"Payload": {
|
"Payload": {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
{
|
|
||||||
"Header": {"ProjectID": "${projectRP}"},
|
|
||||||
"ID": {
|
|
||||||
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
|
||||||
"RefID": "${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_year}${receipt.receipt_number}",
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${receipt_status_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
<#break>
|
|
||||||
</#if>
|
|
||||||
</#list>
|
|
||||||
</#if>
|
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -9,11 +9,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
"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.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_year}${receipt.receipt_number}",
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${receipt_creation_datetime}",
|
"DateTime": "${receipt_creation_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
@@ -30,17 +26,14 @@
|
|||||||
|
|
||||||
"ShipFrom":
|
"ShipFrom":
|
||||||
{
|
{
|
||||||
<#if receipt.receipt_type == '020'>
|
|
||||||
"ActorID": "${RFXtoRPprefixConsignee(receipt.original_code?trim?json_string)}"
|
|
||||||
<#else>
|
|
||||||
"ActorID": "${RFXtoRPprefixSupplier(receipt.original_code?trim?json_string)}"
|
"ActorID": "${RFXtoRPprefixSupplier(receipt.original_code?trim?json_string)}"
|
||||||
</#if>
|
|
||||||
},
|
},
|
||||||
"ShipTo" :
|
"ShipTo" :
|
||||||
{
|
{
|
||||||
"ActorID": "${RFXtoRPprefixDepot(receipt.physical_depot_code?trim?json_string)}"
|
"ActorID": "${RFXtoRPprefixDepot(receipt.physical_depot_code?trim?json_string)}"
|
||||||
},
|
},
|
||||||
"ShipToAcked": true,
|
"ShipToAcked": true,
|
||||||
|
"OrderID":"${receipt.receipt_reference?trim?json_string}",
|
||||||
|
|
||||||
<#if receipt.carrier_informations.carrier_code != "">
|
<#if receipt.carrier_informations.carrier_code != "">
|
||||||
"Carrier":
|
"Carrier":
|
||||||
@@ -48,11 +41,7 @@
|
|||||||
"ActorID":"${RFXtoRPprefixCarrier(receipt.carrier_informations.carrier_code?trim?json_string)}"
|
"ActorID":"${RFXtoRPprefixCarrier(receipt.carrier_informations.carrier_code?trim?json_string)}"
|
||||||
},
|
},
|
||||||
</#if>
|
</#if>
|
||||||
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
|
||||||
"OrderID": "${receipt.receipt_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
"OrderID": "${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.line_list??>
|
<#if receipt.line_list??>
|
||||||
"Lines" : [
|
"Lines" : [
|
||||||
<#list receipt.line_list as line>
|
<#list receipt.line_list as line>
|
||||||
|
|||||||
@@ -1,12 +1,6 @@
|
|||||||
<#-- use protobuf of class HsrReceiptList to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsrReceiptList to find Reflex Wms fields names -->
|
||||||
|
|
||||||
<#--
|
<#--
|
||||||
<#-- Best practices:
|
|
||||||
If the SK is of type:
|
|
||||||
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
|
||||||
- boolean: possible values: true and false
|
|
||||||
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
|
||||||
- decimal number: the separator is a point (e.g. 10.5)
|
|
||||||
|
|
||||||
"MetaData": [
|
"MetaData": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,10 +1,4 @@
|
|||||||
<#-- use protobuf of class HsrReceiptList to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsrReceiptList to find Reflex Wms fields names -->
|
||||||
|
|
||||||
<#-- Best practices:
|
|
||||||
If the SK is of type:
|
|
||||||
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
|
||||||
- boolean: possible values: true and false
|
|
||||||
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
|
||||||
- decimal number: the separator is a point (e.g. 10.5)-->
|
|
||||||
|
|
||||||
"MetaData": [ ]
|
"MetaData": [ ]
|
||||||
@@ -1,13 +1,6 @@
|
|||||||
<#-- use protobuf of class HsrReceiptList to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsrReceiptList to find Reflex WMS fields names -->
|
||||||
|
|
||||||
<#--
|
<#--
|
||||||
<#-- Best practices:
|
|
||||||
If the SK is of type:
|
|
||||||
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
|
||||||
- boolean: possible values: true and false
|
|
||||||
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
|
||||||
- decimal number: the separator is a point (e.g. 10.5)
|
|
||||||
|
|
||||||
"SegmentationKeys": [
|
"SegmentationKeys": [
|
||||||
{
|
{
|
||||||
"Key": "Grade",
|
"Key": "Grade",
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user