Compare commits
227 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c542805488 | |||
| 29713e51d4 | |||
| 5fcc1a071d | |||
| c694bd1b63 | |||
| 8dc7e1895f | |||
| 74522e1b11 | |||
| 71a7001af1 | |||
| f8e00cf7ba | |||
| cf964959af | |||
| 7d55f08194 | |||
| f96d8b9f09 | |||
| 642ce4e4e2 | |||
| 50dca97d7a | |||
| ff5d6bc4d3 | |||
| f49eb55d6a | |||
| 2ed20478c4 | |||
| d3cb8ecc15 | |||
| e53d81e534 | |||
| 2ece576560 | |||
| 629d465343 | |||
| 0a34359e12 | |||
| d908f7db77 | |||
| 7329a2aa1c | |||
| e83b921cf3 | |||
| f496ad60bd | |||
| ca9706e5aa | |||
| 5977dc3af0 | |||
| 4496a4a2ce | |||
| 7e57d91cb6 | |||
| c89575e040 | |||
| 6657cec64c | |||
| c0f25565a0 | |||
| 6e89261c27 | |||
| 466e852f24 | |||
| 8d5dafdeb5 | |||
| bbfe3aa53a | |||
| 9ef729bba9 | |||
| d486819b60 | |||
| d552dced98 | |||
| ad8aae90fd | |||
| ecc40ff1f5 | |||
| 7c04741bc6 | |||
| 3541a6cf8d | |||
| 0274bd65da | |||
| 6f73a656ed | |||
| df7e596a93 | |||
| 5abbd7b0a2 | |||
| a2d3922fb3 | |||
| 50366dab9e | |||
| d03dfcf6f4 | |||
| daf6b99496 | |||
| ef2ae50b62 | |||
| a314097423 | |||
| 6853819d49 | |||
| 7579ff4e68 | |||
| 5dd35ca77e | |||
| 2c5df0ae88 | |||
| 9bf87976ea | |||
| e1c65e7efc | |||
| 055ff16537 | |||
| fed3cf4311 | |||
| 8645b5de3d | |||
| 028d845e87 | |||
| d573b10846 | |||
| 9b9dc2cf97 | |||
| f7de24d247 | |||
| bfb1be01e9 | |||
| 9a252d63c7 | |||
| 94af964830 | |||
| 57c5ed1c9b | |||
| 665fabd498 | |||
| 0028dd0742 | |||
| 468f63b334 | |||
| 7e0cc94404 | |||
| 0ee0108a9d | |||
| 4fe7471545 | |||
| 59034eeeef | |||
| 3d4c41b6d3 | |||
| 2b779cf8aa | |||
| b812177bf5 | |||
| d0e4342b34 | |||
| 88f619d5ee | |||
| 175f0169ea | |||
| 22d9f48b09 | |||
| f0933a5c6a | |||
| 4b090088db | |||
| 160d1ca3bd | |||
| d3fa6876e7 | |||
| 39b1359e8d | |||
| 31a257e529 | |||
| 49bd1a7b71 | |||
| 05c3d17a03 | |||
| 6530f7b0db | |||
| bdd17502d7 | |||
| 1ed84f6c19 | |||
| 5bc723540c | |||
| 374aef32fd | |||
| ca04c4cf37 | |||
| 73f1b6ecc4 | |||
| d734243979 | |||
| 8a48556407 | |||
| be0bc9308c | |||
| f23a11933d | |||
| d77f51fa52 | |||
| c8806baf5c | |||
| 8ca2f62591 | |||
| 97dbd248f8 | |||
| 6bf2ea2329 | |||
| 6bb1d45783 | |||
| 374ab54994 | |||
| 8cafa21aa7 | |||
| d787148aae | |||
| 7786a93b25 | |||
| f05096636e | |||
| 4f433f0da8 | |||
| f1d4ed44ff | |||
| af60541221 | |||
| a880fff33b | |||
| f2acf036b2 | |||
| 4f8b24b78c | |||
| 9b09a076ad | |||
| b8c463ffc1 | |||
| f373cbe734 | |||
| 1256e3d68c | |||
| 983a59b592 | |||
| cb2f8fe59e | |||
| eb6fc3f4a3 | |||
| 8cf596e251 | |||
| 55070c8ce3 | |||
| 928c05bff4 | |||
| 2d8bdeb8a5 | |||
| bb2aaae375 | |||
| 7d874d7a68 | |||
| f4286949f7 | |||
| 68668789b6 | |||
| 6d6a56710b | |||
| 9b93729ab4 | |||
| 18c4959a62 | |||
| efe3ac2134 | |||
| 0d162d5de2 | |||
| 17830c1c6e | |||
| 0ad605af1d | |||
| af712829f2 | |||
| 77421779f3 | |||
| ff59e45573 | |||
| ce32967617 | |||
| df15106ef5 | |||
| 127e69db7b | |||
| ff01a944e4 | |||
| 18ac89f664 | |||
| 499a16796a | |||
| 8863cd66a7 | |||
| 27a762caa8 | |||
| 649452207d | |||
| 2d1fefd96f | |||
| 06376dd2d7 | |||
| 9642b8b8ad | |||
| 7d998634d3 | |||
| 7bf9d3c674 | |||
| 632cc2b647 | |||
| 27f2d525dc | |||
| 3d95e5f3a2 | |||
| c370b967e6 | |||
| 835b8062ee | |||
| 017cd65077 | |||
| 64e863bdfc | |||
| e50893e8c9 | |||
| 592ccb8905 | |||
| ddab0673d4 | |||
| 42237b2029 | |||
| 8c228dd0eb | |||
| cded3aa0e3 | |||
| 5c4dc74bb8 | |||
| 9f34588a6a | |||
| 16f4e35c02 | |||
| 9b8a5ad5c6 | |||
| 676fab0fea | |||
| 297e3ea4c8 | |||
| 58118c394b | |||
| 83a1f59edf | |||
| 890768f89a | |||
| 0a5ec7329c | |||
| 9999313dfc | |||
| dd4d31b443 | |||
| c1704af84d | |||
| a248dc16ed | |||
| aec4e6068e | |||
| dfdfbdeb15 | |||
| d875085657 | |||
| 9d7293d92e | |||
| 899cdd2508 | |||
| d1f251ba32 | |||
| 30337cc003 | |||
| 24f7b8b36a | |||
| a1b063a9d4 | |||
| 88fa6bd2af | |||
| 01b2706cb5 | |||
| 8cd98b8638 | |||
| 4c8ab232d0 | |||
| 3d816434af | |||
| 9f0bedc583 | |||
| 86d0974c2f | |||
| 8abf2771ba | |||
| 8229616050 | |||
| d6a7398af1 | |||
| 7a77f373cc | |||
| 6af5f05491 | |||
| 5581b8cd29 | |||
| 10def5ca60 | |||
| 6db75e83e0 | |||
| af9ff73850 | |||
| cf5ef67c23 | |||
| 09df74f0e0 | |||
| 0ea5a04d6b | |||
| 777197b26b | |||
| a23e6654f1 | |||
| b7eab6ccfd | |||
| c58772f755 | |||
| fbaddfe891 | |||
| df4377f77d | |||
| 65795a6077 | |||
| b3cbfeb1a8 | |||
| 29e4acfca4 | |||
| aa68eb52e9 | |||
| 320bd8988b | |||
| 9a55811bfc | |||
| 1905105118 |
21
README.md
21
README.md
@ -1,11 +1,20 @@
|
||||
# Reflex Platform Core FTLs
|
||||
# HARDIS SC NETWORK Core FTLs
|
||||
|
||||
|
||||
## Overview
|
||||
|
||||
These FTL core files aim to translate data flow from Reflex WMS into Reflex platform API.
|
||||
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.
|
||||
|
||||
You can find more info about those files in the Reflex platform documentation center : https://docs.viz.reflex-platform.com/connectivity/howto/reflex-wms-connector/
|
||||
## Role of the FTL Files
|
||||
|
||||
|
||||
- Each `.ftl` file corresponds to a **flow type** (order, stock, receipt, shipment, etc.).
|
||||
- These templates use the **FreeMarker** syntax to:
|
||||
- Extract the required fields from the WMS source flow.
|
||||
- Apply transformation rules (mapping, conversions, enrichments).
|
||||
- Generate a **final structured JSON** for HARDIS SC NETWORK.
|
||||
|
||||
## Useful Resources
|
||||
|
||||
- [FreeMarker Documentation](https://freemarker.apache.org/docs/index.html)
|
||||
- [HARDIS SC NETWORK](https://auth.reflex-platform.com/)
|
||||
|
||||
@ -1 +1,2 @@
|
||||
<#-- To configure the tracking setting carrier -->
|
||||
<#assign trackingNumberSource = 3>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<#-- **** input parameters ***** -->
|
||||
<#-- input : message RFX -->
|
||||
<#-- project : projectId in ReflexPlatform -->
|
||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||
<#-- input : message HARDIS WMS -->
|
||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
||||
<#-- sum_elt : nb element in snapshot (optional parameter) -->
|
||||
|
||||
<#include "HfRpConfig.ftl">
|
||||
|
||||
@ -1,6 +1,12 @@
|
||||
<#-- use protobuf of class HfDtlStockLs to find Reflex WMS fields names -->
|
||||
<#-- use protobuf of class HfDtlStockLs 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)
|
||||
|
||||
"SegmentationKeys": [
|
||||
{
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<#-- ****
|
||||
Reflex WMS provides some of their environment parameters through the class HfRpConfig
|
||||
HARDIS 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
|
||||
*** -->
|
||||
|
||||
|
||||
100
RFXtoRP_HliPrepaL.ftl
Normal file
100
RFXtoRP_HliPrepaL.ftl
Normal file
@ -0,0 +1,100 @@
|
||||
<#-- **** 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>
|
||||
125
RFXtoRP_HliReceiptLr.ftl
Normal file
125
RFXtoRP_HliReceiptLr.ftl
Normal file
@ -0,0 +1,125 @@
|
||||
<#-- **** 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>
|
||||
|
||||
64
RFXtoRP_HliReceiptLr_ExecutionflowLinesAdded.ftl
Normal file
64
RFXtoRP_HliReceiptLr_ExecutionflowLinesAdded.ftl
Normal file
@ -0,0 +1,64 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#include "ActorPrefix.ftl">
|
||||
[
|
||||
{
|
||||
<#assign receipt_datetime = RfxDateTimetoUTCWithTimezone(receipt.receipt_datetime,time_zone_rfx) />
|
||||
<#assign receipt_creation_datetime = RfxDateTimetoUTCWithTimezone(receipt.creation_datetime,time_zone_rfx) />
|
||||
"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_creation_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
"Payload": {
|
||||
<#if receipt.line_list??>
|
||||
"Lines" : [
|
||||
<#list receipt.line_list as line>
|
||||
{
|
||||
"LineID": "${line.receipt_line_number}",
|
||||
<#-- Line Metadata inclusion -->
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl">,
|
||||
"RequestedContent":
|
||||
{
|
||||
"Goods":
|
||||
{
|
||||
"ItemID": "${line.item_code?trim?json_string!"0"}",
|
||||
"LVBranchID": "${line.item_lv_code?json_string!"0"}",
|
||||
<#if (line.line_without_detail?? && line.line_without_detail.priority_date?length != 0) && (line.line_without_detail.priority_date?starts_with("00") == false)>
|
||||
<#assign line_without_detail_priority_date = line.line_without_detail.priority_date?datetime(rfx_date_format_default)?iso_utc />
|
||||
"PriorityDate": "${line_without_detail_priority_date}",
|
||||
<#else>
|
||||
<#if (line.line_detail?? && line.line_detail?size == 1 && line.line_detail[0].priority_date?length != 0) && (line.line_detail[0].priority_date?starts_with("00") == false)>
|
||||
<#assign line_detail_priority_date = line.line_detail[0].priority_date?datetime(rfx_date_format_default)?iso_utc />
|
||||
"PriorityDate": "${line_detail_priority_date}",
|
||||
<#else>
|
||||
"PriorityDate": "1970-01-01T00:00:00Z",
|
||||
</#if>
|
||||
</#if>
|
||||
<#-- Segmentation Keys inclusion -->
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl">
|
||||
},
|
||||
"Quantity" :
|
||||
{
|
||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||
"Value": "${line.order_quantity_in_lv!0}"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
<#sep>,</#sep>
|
||||
</#list>
|
||||
]
|
||||
</#if>
|
||||
}
|
||||
}
|
||||
]
|
||||
72
RFXtoRP_HlrProL.ftl
Normal file
72
RFXtoRP_HlrProL.ftl
Normal file
@ -0,0 +1,72 @@
|
||||
<#-- **** 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>
|
||||
|
||||
55
RFXtoRP_HlrProL_ExecutionflowLinesAdded.ftl
Normal file
55
RFXtoRP_HlrProL_ExecutionflowLinesAdded.ftl
Normal file
@ -0,0 +1,55 @@
|
||||
<#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,7 @@
|
||||
<#-- **** input parameters ***** -->
|
||||
<#-- input : message RFX -->
|
||||
<#-- project : projectId in ReflexPlatform -->
|
||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||
<#-- input : message HARDIS WMS -->
|
||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
||||
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
|
||||
"Address":
|
||||
{
|
||||
<#-- if Reflex WMS address is structured -->
|
||||
<#-- if HARDIS WMS address is structured -->
|
||||
<#if carrier.carrier_structured_address?? >
|
||||
|
||||
"Name": "${carrier.carrier_structured_address.name_or_company?json_string}",
|
||||
@ -38,7 +38,7 @@
|
||||
"ProvinceCode": "${carrier.carrier_structured_address.territorial_div_code?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>
|
||||
<#if carrier.address??>
|
||||
"Name": "${carrier.address.company_name?json_string}",
|
||||
|
||||
@ -1,4 +1,10 @@
|
||||
<#-- use protobuf of class HsaCarrier to find Reflex WMS fields names -->
|
||||
<#-- use protobuf of class HsaCarrier 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": [ ]
|
||||
@ -1,7 +1,7 @@
|
||||
<#-- **** input parameters ***** -->
|
||||
<#-- input : message RFX -->
|
||||
<#-- project : projectId in ReflexPlatform -->
|
||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||
<#-- input : message HARDIS- WMS -->
|
||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
||||
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
"Address":
|
||||
{
|
||||
|
||||
<#-- if Reflex WMS is structured -->
|
||||
<#-- if HARDIS WMS is structured -->
|
||||
<#if actor.consignee_structured_address??>
|
||||
|
||||
"Name": "${actor.consignee_structured_address.name_or_company?json_string}",
|
||||
@ -40,7 +40,7 @@
|
||||
"ProvinceCode": "${actor.consignee_structured_address.territorial_div_code?json_string}",
|
||||
"State": "${actor.consignee_structured_address.country_designation?json_string}"
|
||||
|
||||
<#-- if Reflex WMS is not structured -->
|
||||
<#-- if HARDIS WMS is not structured -->
|
||||
<#else>
|
||||
<#if actor.address?? >
|
||||
|
||||
|
||||
@ -1,4 +1,10 @@
|
||||
<#-- use protobuf of class HsaCons to find Reflex WMS fields names -->
|
||||
<#-- use protobuf of class HsaCons 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": [ ]
|
||||
32
RFXtoRP_HsaDesPatch.ftl
Normal file
32
RFXtoRP_HsaDesPatch.ftl
Normal file
@ -0,0 +1,32 @@
|
||||
<#-- **** input parameters ***** -->
|
||||
<#-- input : message RFX -->
|
||||
<#-- project : projectId in ReflexPlatform -->
|
||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
<#assign organisationRP = organisation>
|
||||
|
||||
<#assign aDateTime = .now>
|
||||
|
||||
<#switch cloudEventMsg.action>
|
||||
<#case "C">
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign 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>
|
||||
|
||||
32
RFXtoRP_HsaDespNt.ftl
Normal file
32
RFXtoRP_HsaDespNt.ftl
Normal file
@ -0,0 +1,32 @@
|
||||
<#-- **** input parameters ***** -->
|
||||
<#-- input : message RFX -->
|
||||
<#-- project : projectId in ReflexPlatform -->
|
||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
<#assign organisationRP = organisation>
|
||||
|
||||
<#assign aDateTime = .now>
|
||||
|
||||
<#switch cloudEventMsg.action>
|
||||
<#case "C">
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign 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,14 +1,12 @@
|
||||
<#-- **** input parameters ***** -->
|
||||
<#-- input : message RFX -->
|
||||
<#-- project : projectId in ReflexPlatform -->
|
||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||
|
||||
<#-- input : message HARDIS WMS -->
|
||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
||||
<#-- For dispute creation WMS to Platform -->
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
<#assign organisationRP = organisation>
|
||||
|
||||
<#assign aDateTime = .now>
|
||||
|
||||
<#switch cloudEventMsg.action>
|
||||
<#case "C">
|
||||
<#case "U">
|
||||
@ -16,21 +14,32 @@
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#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!="")>
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimCreated>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaDispute_Created.ftl">
|
||||
},
|
||||
}
|
||||
<#-- Create the table for reason code in RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl -->
|
||||
<#if TableReasonCode[dispute.dispute_reason_code]??>
|
||||
,
|
||||
{
|
||||
<#-- Add message in dispute tchat room -->
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimMessageSent>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaDispute_MessageSent.ftl">
|
||||
}
|
||||
<#else>
|
||||
<#stop>
|
||||
</#if>
|
||||
<#else>
|
||||
<#-- "Reference is empty"-->
|
||||
<#stop>
|
||||
</#if>
|
||||
</#if>
|
||||
]
|
||||
<#break>
|
||||
|
||||
10
RFXtoRP_HsaDispute_ClaimMetadata.ftl
Normal file
10
RFXtoRP_HsaDispute_ClaimMetadata.ftl
Normal file
@ -0,0 +1,10 @@
|
||||
<#-- 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": [ ]
|
||||
@ -39,29 +39,30 @@
|
||||
</#if>
|
||||
"Value": "${dispute.dispute_amount}"
|
||||
},
|
||||
<#-- Claim metadata inclusion -->
|
||||
<#include "RFXtoRP_HsaDispute_ClaimMetadata.ftl">,
|
||||
<#-- To configure -->
|
||||
<#include "RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl">
|
||||
<#if dispute.dispute_type_code=="050" >
|
||||
<#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0>
|
||||
"EntityID":"${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string}",
|
||||
<#else>
|
||||
<#stop "preparation order list is empty" >
|
||||
</#if>
|
||||
"EntityID":"${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>
|
||||
<#if dispute.dispute_type_code=="070" || dispute.dispute_type_code=="030" >
|
||||
"EntityID":"${dispute.dispute_reception.reception_reference?trim?json_string}",
|
||||
"EntityID":"${dispute.dispute_reception.reception_reference?trim?json_string}",
|
||||
"DisplayID":"${dispute.dispute_reception.reception_reference?trim?json_string}",
|
||||
<#else>
|
||||
<#stop "Type not supported" >
|
||||
<#stop "WMS type code not supported">
|
||||
</#if>
|
||||
</#if>
|
||||
<#-- To configure -->
|
||||
<#include "RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl">
|
||||
|
||||
<#if TableReasonCode[dispute.dispute_reason_code]??>
|
||||
"ClaimTypeID":"${TableReasonCode[dispute.dispute_reason_code]}"
|
||||
"ClaimTypeID":"CLAIMTYPE_${projectRP}_ORDER_${TableReasonCode[dispute.dispute_reason_code]}"
|
||||
<#else>
|
||||
<#stop "Claim reason code not supported" >
|
||||
<#stop "Reason code not supported">
|
||||
</#if>
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
<#include "ReflexUtils.ftl">
|
||||
[
|
||||
{
|
||||
<#-- Add refer -->
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
|
||||
@ -47,7 +47,6 @@
|
||||
<#if (reflexMvtStockInterface.ipg_move_type == "100" ||
|
||||
reflexMvtStockInterface.ipg_move_type == "110" ||
|
||||
reflexMvtStockInterface.ipg_move_type == "120") >
|
||||
<#if reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!="">
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsReceived>
|
||||
@ -56,10 +55,6 @@
|
||||
<#include "RFXtoRP_HsaIpgMove_GoodsReceived.ftl">
|
||||
}
|
||||
]
|
||||
<#else>
|
||||
<#-- Case of IPG move type volontarilly ignored-->
|
||||
<#stop " Reference receipt is empty">
|
||||
</#if>
|
||||
<#else>
|
||||
<#stop>
|
||||
</#if>
|
||||
|
||||
@ -26,17 +26,36 @@
|
||||
<#else>
|
||||
"PriorityDate": "1970-01-01T00:00:00Z",
|
||||
</#if>
|
||||
|
||||
<#-- Goods received Segmentation Keys inclusion -->
|
||||
<#include "RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl">
|
||||
},
|
||||
|
||||
<#if reflexMvtStockInterface.receipt_reference!="">
|
||||
"ExecutionflowID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}",
|
||||
<#if reflexMvtStockInterface.ipg_move_type?? & reflexMvtStockInterface.ipg_move_type=="120"> <#-- if it is a transfer-type movement -->
|
||||
<#if reflexMvtStockInterface.origin_order_line_reference?? && reflexMvtStockInterface.origin_order_line_reference!="">
|
||||
"ExecutionflowID": "${reflexMvtStockInterface.origin_order_line_reference?trim?json_string}",
|
||||
"OrderID": "${reflexMvtStockInterface.origin_order_line_reference?trim?json_string}",
|
||||
<#else>
|
||||
<#if reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!="">
|
||||
"ExecutionflowID": "${reflexMvtStockInterface.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>
|
||||
<#else>
|
||||
"ExecutionflowID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}",
|
||||
<#if reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!="">
|
||||
"ExecutionflowID": "${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}",
|
||||
</#if>
|
||||
"LineID": "${reflexMvtStockInterface.receipt_line_number}",
|
||||
"ActorID": "${RFXtoRPprefixDepot(reflexMvtStockInterface.physical_depot_code?trim?json_string)}",
|
||||
"Quantity": {
|
||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||
@ -47,4 +66,4 @@
|
||||
}
|
||||
}
|
||||
|
||||
]
|
||||
]
|
||||
@ -1,7 +1,12 @@
|
||||
<#-- use protobuf of class HsaIpgMove to find Reflex WMS fields names -->
|
||||
<#-- use protobuf of class HsaIpgMove 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)
|
||||
|
||||
"SegmentationKeys": [
|
||||
{
|
||||
|
||||
@ -54,7 +54,7 @@
|
||||
"ExternalMoveRef" : "${reflexMvtStockInterface.ipg_move_year_number} - ${reflexMvtStockInterface.ipg_move_number}",
|
||||
"Type": "${MoveType_KV[reflexMvtStockInterface.ipg_move_type]!reflexMvtStockInterface.ipg_move_type}",
|
||||
<#if reflexMvtStockInterface.ipg_move_type == "520" >
|
||||
"Reason": " Transfert ${RFXtoRPprefixDepot(reflexMvtStockInterface.physical_depot_code?trim?json_string)} to ${RFXtoRPprefixDepot(reflexMvtStockInterface.transfer_consignee_physical_depot_code?trim?json_string)}",
|
||||
"Reason": " Direct Transfert ${RFXtoRPprefixDepot(reflexMvtStockInterface.physical_depot_code?trim?json_string)} to ${RFXtoRPprefixDepot(reflexMvtStockInterface.transfer_consignee_physical_depot_code?trim?json_string)}",
|
||||
<#else>
|
||||
"Reason": "${reflexMvtStockInterface.miscellaneous_receipts_despatches_code?json_string}",
|
||||
</#if>
|
||||
|
||||
@ -1,5 +1,12 @@
|
||||
<#-- use protobuf of class HsaIpgMove to find Reflex WMS fields names -->
|
||||
<#-- use protobuf of class HsaIpgMove 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)
|
||||
|
||||
"SegmentationKeys": [
|
||||
{
|
||||
"Key": "Grade",
|
||||
@ -15,22 +22,22 @@
|
||||
"Value": { "String" : "no batch"}
|
||||
<#else>
|
||||
"Value": { "String" : "${reflexMvtStockInterface.batch_1}"}
|
||||
</#if>
|
||||
</#if>
|
||||
},
|
||||
{
|
||||
"Key": "HeldForSpecificCode",
|
||||
"Value": { "Bool" : "${reflexMvtStockInterface.ipg_specific_code_held}"}
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
<#assign manufacturing_date = reflexMvtStockInterface.manufacture_date?datetime(rfx_date_format_default)?iso_utc />
|
||||
<#assign manufacturing_date = reflexMvtStockInterface.manufacture_date?datetime(rfx_date_format_default)?iso_utc />
|
||||
"Key": "ManufacturingDate",
|
||||
"Value": "Timestamp": {
|
||||
"AuthorTimeZone": "${time_zone_rfx}",
|
||||
"DateTime": "${manufacturing_date}"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
-->
|
||||
"SegmentationKeys": [ ]
|
||||
@ -1,7 +1,7 @@
|
||||
<#-- **** input parameters ***** -->
|
||||
<#-- input : message RFX -->
|
||||
<#-- project : projectId in ReflexPlatform -->
|
||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||
<#-- input : message HARDIS WMS -->
|
||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
||||
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
@ -18,14 +18,10 @@
|
||||
<#assign item = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#if item.logistical_variant_list?? >
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ItemCreated>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaItm_ItemCreated.ftl">
|
||||
<#else>
|
||||
<#stop "no LV for the item">
|
||||
</#if>
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<#-- **** input parameters ***** -->
|
||||
<#-- input : message RFX -->
|
||||
<#-- project : projectId in ReflexPlatform -->
|
||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||
<#-- input : message HARDIS WMS -->
|
||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
||||
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
{
|
||||
"LVID": "${lv.logistical_variant_code?json_string}",
|
||||
"Name" : "${lv.lv_type_code?json_string}",
|
||||
<#if lv.id_list??>
|
||||
<#if lv.id_list?? && (lv.id_list?size == lv.id_list?filter(l ->l??)?size)>
|
||||
"Codes": [
|
||||
<#list lv.id_list as id>
|
||||
{
|
||||
|
||||
@ -1,4 +1,10 @@
|
||||
<#-- use protobuf of class HsaItmLv to find Reflex Wms fields names -->
|
||||
<#-- use protobuf of class HsaItmLv 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,15 +21,17 @@
|
||||
},
|
||||
|
||||
<#-- Item metadata inclusion -->
|
||||
<#include "RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl">,
|
||||
<#include "RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl">
|
||||
|
||||
<#-- Item Photo URI could be added here -->
|
||||
<#if item.url?? && item.url!="">
|
||||
"PhotoURI": "${item.url?json_string}",
|
||||
,
|
||||
"PhotoURI": "${item.url?json_string}"
|
||||
</#if>
|
||||
|
||||
<#-- Loop for the Logistical Variants - LV -->
|
||||
<#if item.logistical_variant_list??>
|
||||
<#if item.logistical_variant_list?? && (item.logistical_variant_list?size == item.logistical_variant_list?filter(l ->l??)?size)>
|
||||
,
|
||||
"LogisticVariants": [
|
||||
|
||||
<#list item.logistical_variant_list as logistical_variant>
|
||||
@ -37,7 +39,7 @@
|
||||
"LVID": "${logistical_variant.logistical_variant_code?json_string}",
|
||||
"Name" : "${logistical_variant.lv_type_code?json_string}",
|
||||
|
||||
<#if logistical_variant.id_list??>
|
||||
<#if logistical_variant.id_list?? && (logistical_variant.id_list?size == logistical_variant.id_list?filter(l ->l??)?size)>
|
||||
"Codes": [
|
||||
<#list logistical_variant.id_list as id>
|
||||
{
|
||||
|
||||
@ -1,4 +1,10 @@
|
||||
<#-- use protobuf of class HsaItm to find Reflex Wms fields names -->
|
||||
<#-- use protobuf of class HsaItm 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": [ ]
|
||||
@ -1,4 +1,10 @@
|
||||
<#-- use protobuf of class HsaItm to find Reflex Wms fields names -->
|
||||
<#-- use protobuf of class HsaItm 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": [ ]
|
||||
@ -1,40 +1,89 @@
|
||||
<#-- **** input parameters ***** -->
|
||||
<#-- input : message RFX -->
|
||||
<#-- input : message HARDIS WMS -->
|
||||
<#-- project : projectId in ReflexPlatform -->
|
||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||
<#include "ActorPrefix.ftl">
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ReflexUtils.ftl">
|
||||
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
|
||||
<#assign organisationRP = organisation>
|
||||
|
||||
<#assign aDateTime = .now>
|
||||
|
||||
<#stop>
|
||||
|
||||
<#switch cloudEventMsg.action>
|
||||
<#case "C">
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
|
||||
<#case "D">
|
||||
<#-- *********************************************** Action = DELETE *************************** -->
|
||||
<#-- *********************************************** Action = Update ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#assign carrier_apt_status = 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>
|
||||
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
<#default>
|
||||
<#stop 'this updated appointment Status not implemented'>
|
||||
</#switch>
|
||||
|
||||
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
|
||||
<#case "D">
|
||||
<#-- *********************************************** Action = Delete ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign carrier_apt_status = JsonUtil.jsonToMap(dataRfx)>
|
||||
<#stop 'Delete Appointment Status not implemented' >
|
||||
<#break>
|
||||
<#default>
|
||||
<#stop >
|
||||
</#switch>
|
||||
</#switch>
|
||||
|
||||
|
||||
30
RFXtoRP_HsaLstCarSta_CarrierArrived.ftl
Normal file
30
RFXtoRP_HsaLstCarSta_CarrierArrived.ftl
Normal file
@ -0,0 +1,30 @@
|
||||
[
|
||||
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) />
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
<#if carrier_apt_status.constant_appointment?? && carrier_apt_status.constant_appointment== "true">
|
||||
<#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference!="">
|
||||
"RefID": "${carrier_apt_status.appointment_reference?json_string}-${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}",
|
||||
<#else>
|
||||
"RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}",
|
||||
</#if>
|
||||
<#else>
|
||||
<#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>
|
||||
</#if>
|
||||
"RefDate": {
|
||||
"DateTime": "${ref_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
"Payload":{
|
||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}"
|
||||
}
|
||||
}
|
||||
]
|
||||
30
RFXtoRP_HsaLstCarSta_CarrierDeparted.ftl
Normal file
30
RFXtoRP_HsaLstCarSta_CarrierDeparted.ftl
Normal file
@ -0,0 +1,30 @@
|
||||
[
|
||||
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) />
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
<#if carrier_apt_status.constant_appointment?? && carrier_apt_status.constant_appointment== "true">
|
||||
<#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference!="">
|
||||
"RefID": "${carrier_apt_status.appointment_reference?json_string}-${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}",
|
||||
<#else>
|
||||
"RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}",
|
||||
</#if>
|
||||
<#else>
|
||||
<#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>
|
||||
</#if>
|
||||
"RefDate": {
|
||||
"DateTime": "${ref_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
"Payload":{
|
||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}"
|
||||
}
|
||||
}
|
||||
]
|
||||
30
RFXtoRP_HsaLstCarSta_CarrierExpected.ftl
Normal file
30
RFXtoRP_HsaLstCarSta_CarrierExpected.ftl
Normal file
@ -0,0 +1,30 @@
|
||||
[
|
||||
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) />
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
<#if carrier_apt_status.constant_appointment?? && carrier_apt_status.constant_appointment== "true">
|
||||
<#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference!="">
|
||||
"RefID": "${carrier_apt_status.appointment_reference?json_string}-${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}",
|
||||
<#else>
|
||||
"RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}",
|
||||
</#if>
|
||||
<#else>
|
||||
<#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>
|
||||
</#if>
|
||||
"RefDate": {
|
||||
"DateTime": "${ref_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
"Payload":{
|
||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}"
|
||||
}
|
||||
}
|
||||
]
|
||||
30
RFXtoRP_HsaLstCarSta_LoadingCompleted.ftl
Normal file
30
RFXtoRP_HsaLstCarSta_LoadingCompleted.ftl
Normal file
@ -0,0 +1,30 @@
|
||||
[
|
||||
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) />
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
<#if carrier_apt_status.constant_appointment?? && carrier_apt_status.constant_appointment== "true">
|
||||
<#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference!="">
|
||||
"RefID": "${carrier_apt_status.appointment_reference?json_string}-${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}",
|
||||
<#else>
|
||||
"RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}",
|
||||
</#if>
|
||||
<#else>
|
||||
<#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>
|
||||
</#if>
|
||||
"RefDate": {
|
||||
"DateTime": "${ref_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
"Payload":{
|
||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}"
|
||||
}
|
||||
}
|
||||
]
|
||||
30
RFXtoRP_HsaLstCarSta_LoadingStarted.ftl
Normal file
30
RFXtoRP_HsaLstCarSta_LoadingStarted.ftl
Normal file
@ -0,0 +1,30 @@
|
||||
[
|
||||
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) />
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
<#if carrier_apt_status.constant_appointment?? && carrier_apt_status.constant_appointment== "true">
|
||||
<#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference!="">
|
||||
"RefID": "${carrier_apt_status.appointment_reference?json_string}-${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}",
|
||||
<#else>
|
||||
"RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}",
|
||||
</#if>
|
||||
<#else>
|
||||
<#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>
|
||||
</#if>
|
||||
"RefDate": {
|
||||
"DateTime": "${ref_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
"Payload":{
|
||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}"
|
||||
}
|
||||
}
|
||||
]
|
||||
30
RFXtoRP_HsaLstCarSta_UnloadingCompleted.ftl
Normal file
30
RFXtoRP_HsaLstCarSta_UnloadingCompleted.ftl
Normal file
@ -0,0 +1,30 @@
|
||||
[
|
||||
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) />
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
<#if carrier_apt_status.constant_appointment?? && carrier_apt_status.constant_appointment== "true">
|
||||
<#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference!="">
|
||||
"RefID": "${carrier_apt_status.appointment_reference?json_string}-${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}",
|
||||
<#else>
|
||||
"RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}",
|
||||
</#if>
|
||||
<#else>
|
||||
<#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>
|
||||
</#if>
|
||||
"RefDate": {
|
||||
"DateTime": "${ref_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
"Payload":{
|
||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}"
|
||||
}
|
||||
}
|
||||
]
|
||||
30
RFXtoRP_HsaLstCarSta_UnloadingStarted.ftl
Normal file
30
RFXtoRP_HsaLstCarSta_UnloadingStarted.ftl
Normal file
@ -0,0 +1,30 @@
|
||||
[
|
||||
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) />
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
<#if carrier_apt_status.constant_appointment?? && carrier_apt_status.constant_appointment== "true">
|
||||
<#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference!="">
|
||||
"RefID": "${carrier_apt_status.appointment_reference?json_string}-${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}",
|
||||
<#else>
|
||||
"RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}",
|
||||
</#if>
|
||||
<#else>
|
||||
<#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>
|
||||
</#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 : message RFX -->
|
||||
<#-- project : projectId in ReflexPlatform -->
|
||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||
<#-- input : message HARDIS WMS -->
|
||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
||||
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
@ -16,6 +16,7 @@
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign preparationStatusInterface = JsonUtil.jsonToMap(dataRfx) />
|
||||
[
|
||||
<#if preparationStatusInterface.preparation_type_code=="010" || preparationStatusInterface.preparation_type_code=="030">
|
||||
<#--**Pick batch runned (200) **-->
|
||||
<#if preparationStatusInterface.preparation_order_originator_reference?? && preparationStatusInterface.preparation_order_originator_reference!="">
|
||||
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "200" >
|
||||
@ -65,8 +66,12 @@
|
||||
</#if>
|
||||
</#if>
|
||||
<#else>
|
||||
<#stop "PRO reference is empty">
|
||||
<#--PRO reference is empty-->
|
||||
<#stop >
|
||||
</#if>
|
||||
<#else>
|
||||
<#stop >
|
||||
</#if>
|
||||
]
|
||||
<#break>
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
||||
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
||||
"RefDate": {
|
||||
"DateTime": "${preparation_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
||||
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
||||
"RefDate": {
|
||||
"DateTime": "${preparation_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
|
||||
@ -7,10 +7,10 @@
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
||||
"RefDate": {
|
||||
"DateTime": "${preparation_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
||||
"RefDate": {
|
||||
"DateTime": "${preparation_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -7,10 +7,10 @@
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
||||
"RefDate": {
|
||||
"DateTime": "${preparation_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
||||
"RefDate": {
|
||||
"DateTime": "${preparation_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -7,10 +7,10 @@
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
||||
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
||||
"RefDate": {
|
||||
"DateTime": "${preparation_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
"DateTime": "${preparation_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<#-- **** input parameters ***** -->
|
||||
<#-- input : message RFX -->
|
||||
<#-- project : projectId in ReflexPlatform -->
|
||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||
<#-- input : message HARDIS WMS -->
|
||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
||||
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
|
||||
"Address":
|
||||
{
|
||||
<#-- if Reflex WMS address is structured -->
|
||||
<#-- if HARDIS WMS address is structured -->
|
||||
<#if actor.supplier_structured_address?? >
|
||||
|
||||
"Name": "${actor.supplier_structured_address.name_or_company?json_string}",
|
||||
@ -37,7 +37,7 @@
|
||||
"ProvinceCode": "${actor.supplier_structured_address.territorial_div_code?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>
|
||||
<#if actor.optional_attributes?? >
|
||||
"Name": "${actor.optional_attributes.company_name?json_string}",
|
||||
|
||||
@ -1,4 +1,10 @@
|
||||
<#-- use protobuf of class HsaSup to find Reflex WMS fields names -->
|
||||
<#-- use protobuf of class HsaSup 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": [ ]
|
||||
@ -1,7 +1,10 @@
|
||||
<#-- **** input parameters ***** -->
|
||||
<#-- input : message RFX -->
|
||||
<#-- input : message HARDIS-WMS -->
|
||||
<#-- project : projectId in ReflexPlatform -->
|
||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||
<#include "ActorPrefix.ftl">
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ReflexUtils.ftl">
|
||||
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
@ -9,32 +12,132 @@
|
||||
|
||||
<#assign aDateTime = .now>
|
||||
|
||||
<#stop>
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign carrier_apt = JsonUtil.jsonToMap(dataRfx)>
|
||||
|
||||
<#switch cloudEventMsg.action>
|
||||
<#case "C">
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.SiteForceBookAppointment>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl">
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = Update ********************-->
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCustomFieldsUpdated>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl">
|
||||
},
|
||||
<#include "RFXtoRP_HsrCarrierApt_AppointmentMetadataUpdated.ftl">
|
||||
<#include "RFXtoRP_HsrCarrierApt_AppointmentCarrierInformationUpdated.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">
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
|
||||
<#case "D">
|
||||
<#-- *********************************************** Action = DELETE *************************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
||||
]
|
||||
<#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>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.SiteWMSUpdateAppointment>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl">
|
||||
}
|
||||
]
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
]
|
||||
<#break>
|
||||
<#case "D">
|
||||
<#-- *********************************************** Action = Delete ******************** -->
|
||||
[
|
||||
{
|
||||
|
||||
}
|
||||
<#-- Ajout des lignes-->
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.SiteCancelAppointment>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl">
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
|
||||
<#break>
|
||||
<#default>
|
||||
<#stop >
|
||||
</#switch>
|
||||
</#switch>
|
||||
|
||||
|
||||
@ -0,0 +1,9 @@
|
||||
<#-- A décommenter si besoin de les utiliser-->
|
||||
<#-- Uncomment if you need to use them-->
|
||||
<#--{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierInformationUpdated>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrCarrierApt_AppointmentCarrierInformationUpdatedToConfigure.ftl">
|
||||
},
|
||||
-->
|
||||
@ -0,0 +1,42 @@
|
||||
<#--
|
||||
[
|
||||
{
|
||||
"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}",
|
||||
<#else>
|
||||
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||
</#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>
|
||||
}
|
||||
"Payload": {
|
||||
"ActorID": "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
||||
<#--To configure-->
|
||||
<#-- "CarrierInformation": [
|
||||
{
|
||||
"Key": "string",
|
||||
"Value": {
|
||||
"Bool": "true / false",
|
||||
"Float": 3.1415,
|
||||
"Int": 42,
|
||||
"String": "Hello World !",
|
||||
"Timestamp": {
|
||||
"AuthorTimeZone": "Europe/Paris",
|
||||
"DateTime": "2023-01-01T00:00:00Z"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
-->
|
||||
60
RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl
Normal file
60
RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl
Normal file
@ -0,0 +1,60 @@
|
||||
[
|
||||
<#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}",
|
||||
<#else>
|
||||
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||
</#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}"
|
||||
},
|
||||
{
|
||||
"Key": "loading",
|
||||
"Value": "${carrier_apt.load_appointment?json_string}"
|
||||
},
|
||||
{
|
||||
"Key": "unloading",
|
||||
"Value": "${carrier_apt.unloading_appointment?json_string}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Payload":{
|
||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
||||
}
|
||||
}
|
||||
]
|
||||
9
RFXtoRP_HsrCarrierApt_AppointmentMetadataUpdated.ftl
Normal file
9
RFXtoRP_HsrCarrierApt_AppointmentMetadataUpdated.ftl
Normal file
@ -0,0 +1,9 @@
|
||||
<#-- 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">
|
||||
},
|
||||
-->
|
||||
@ -0,0 +1,42 @@
|
||||
<#--
|
||||
[
|
||||
{
|
||||
"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}"
|
||||
<#else>
|
||||
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}"
|
||||
</#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>
|
||||
},
|
||||
"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"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
-->
|
||||
30
RFXtoRP_HsrCarrierApt_CarrierArrived.ftl
Normal file
30
RFXtoRP_HsrCarrierApt_CarrierArrived.ftl
Normal file
@ -0,0 +1,30 @@
|
||||
[
|
||||
<#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!="">
|
||||
"RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||
<#else>
|
||||
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||
</#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}"
|
||||
}
|
||||
},
|
||||
"Payload":{
|
||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
||||
}
|
||||
}
|
||||
]
|
||||
30
RFXtoRP_HsrCarrierApt_CarrierDeparted.ftl
Normal file
30
RFXtoRP_HsrCarrierApt_CarrierDeparted.ftl
Normal file
@ -0,0 +1,30 @@
|
||||
[
|
||||
<#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!="">
|
||||
"RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||
<#else>
|
||||
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||
</#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}"
|
||||
}
|
||||
},
|
||||
"Payload":{
|
||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
||||
}
|
||||
}
|
||||
]
|
||||
3
RFXtoRP_HsrCarrierApt_CarrierInformation.ftl
Normal file
3
RFXtoRP_HsrCarrierApt_CarrierInformation.ftl
Normal file
@ -0,0 +1,3 @@
|
||||
"CarrierInformation": [
|
||||
|
||||
]
|
||||
30
RFXtoRP_HsrCarrierApt_LoadingCompleted.ftl
Normal file
30
RFXtoRP_HsrCarrierApt_LoadingCompleted.ftl
Normal file
@ -0,0 +1,30 @@
|
||||
[
|
||||
<#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!="">
|
||||
"RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||
<#else>
|
||||
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||
</#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}"
|
||||
}
|
||||
},
|
||||
"Payload":{
|
||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
||||
}
|
||||
}
|
||||
]
|
||||
30
RFXtoRP_HsrCarrierApt_LoadingStarted.ftl
Normal file
30
RFXtoRP_HsrCarrierApt_LoadingStarted.ftl
Normal file
@ -0,0 +1,30 @@
|
||||
[
|
||||
<#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!="">
|
||||
"RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||
<#else>
|
||||
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||
</#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}"
|
||||
}
|
||||
},
|
||||
"Payload":{
|
||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
||||
}
|
||||
}
|
||||
]
|
||||
5
RFXtoRP_HsrCarrierApt_MetadataAppointment.ftl
Normal file
5
RFXtoRP_HsrCarrierApt_MetadataAppointment.ftl
Normal file
@ -0,0 +1,5 @@
|
||||
|
||||
"MetaData": [
|
||||
]
|
||||
|
||||
|
||||
5
RFXtoRP_HsrCarrierApt_Quantities.ftl
Normal file
5
RFXtoRP_HsrCarrierApt_Quantities.ftl
Normal file
@ -0,0 +1,5 @@
|
||||
"Quantities": [
|
||||
|
||||
]
|
||||
|
||||
|
||||
6
RFXtoRP_HsrCarrierApt_SegmentationSelections.ftl
Normal file
6
RFXtoRP_HsrCarrierApt_SegmentationSelections.ftl
Normal file
@ -0,0 +1,6 @@
|
||||
|
||||
|
||||
"SegmentationSelections": [
|
||||
]
|
||||
|
||||
|
||||
22
RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl
Normal file
22
RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl
Normal file
@ -0,0 +1,22 @@
|
||||
<#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}",
|
||||
<#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>
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
||||
}
|
||||
]
|
||||
158
RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl
Normal file
158
RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl
Normal file
@ -0,0 +1,158 @@
|
||||
[
|
||||
{
|
||||
"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}",
|
||||
<#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>
|
||||
"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}"
|
||||
},
|
||||
{
|
||||
"Key": "loading",
|
||||
"Value": "${carrier_apt.load_appointment?json_string}"
|
||||
},
|
||||
{
|
||||
"Key": "unloading",
|
||||
"Value": "${carrier_apt.unloading_appointment?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}"
|
||||
<#else>
|
||||
<#stop "Appointment type not supported" >
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
}]
|
||||
}
|
||||
]
|
||||
30
RFXtoRP_HsrCarrierApt_UnloadingCompleted.ftl
Normal file
30
RFXtoRP_HsrCarrierApt_UnloadingCompleted.ftl
Normal file
@ -0,0 +1,30 @@
|
||||
[
|
||||
<#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!="">
|
||||
"RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||
<#else>
|
||||
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||
</#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}"
|
||||
}
|
||||
},
|
||||
"Payload":{
|
||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
||||
}
|
||||
}
|
||||
]
|
||||
30
RFXtoRP_HsrCarrierApt_UnloadingStarted.ftl
Normal file
30
RFXtoRP_HsrCarrierApt_UnloadingStarted.ftl
Normal file
@ -0,0 +1,30 @@
|
||||
[
|
||||
<#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!="">
|
||||
"RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||
<#else>
|
||||
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||
</#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}"
|
||||
}
|
||||
},
|
||||
"Payload":{
|
||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
||||
}
|
||||
}
|
||||
]
|
||||
150
RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl
Normal file
150
RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl
Normal file
@ -0,0 +1,150 @@
|
||||
[
|
||||
{
|
||||
<#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}",
|
||||
<#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>
|
||||
<#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}"
|
||||
},
|
||||
{
|
||||
"Key": "loading",
|
||||
"Value": "${carrier_apt.load_appointment?json_string}"
|
||||
},
|
||||
{
|
||||
"Key": "unloading",
|
||||
"Value": "${carrier_apt.unloading_appointment?json_string}"
|
||||
}
|
||||
],
|
||||
<#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"))>
|
||||
"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?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?json_string}${physical_receipt.receipt_number?json_string}",
|
||||
</#if>
|
||||
"ProjectID": "${projectRP}"
|
||||
}<#sep>,</#sep>
|
||||
</#list>
|
||||
],
|
||||
<#else>
|
||||
<#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}"
|
||||
<#else>
|
||||
<#stop "Appointment type not supported" >
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
}]
|
||||
|
||||
}
|
||||
]
|
||||
@ -1,7 +1,7 @@
|
||||
<#-- **** input parameters ***** -->
|
||||
<#-- input : message RFX -->
|
||||
<#-- project : projectId in ReflexPlatform -->
|
||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||
<#-- input : message HARDIS WMS -->
|
||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
||||
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
|
||||
"Address":
|
||||
{
|
||||
<#-- if Reflex WMS address is structured -->
|
||||
<#-- if HARDIS WMS address is structured -->
|
||||
<#if depot.physical_depot_structured_address?? >
|
||||
|
||||
"Name": "${depot.physical_depot_structured_address.name_or_company?json_string}",
|
||||
@ -39,7 +39,7 @@
|
||||
"ProvinceCode": "${depot.physical_depot_structured_address.territorial_div_code?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>
|
||||
<#if depot.physical_depot_address??>
|
||||
"Name": "${depot.physical_depot_address.company_name?json_string}",
|
||||
@ -55,7 +55,7 @@
|
||||
"${depot.physical_depot_address.other_number?json_string}"
|
||||
],
|
||||
</#if>
|
||||
"Typology": "TYPOLOGY_UNKNOWN"
|
||||
"Typology": "TYPOLOGY_WAREHOUSE"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@ -1,4 +1,10 @@
|
||||
<#-- use protobuf of class HsrDepot to find Reflex WMS fields names -->
|
||||
<#-- use protobuf of class HsrDepot 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": [ ]
|
||||
@ -1,7 +1,7 @@
|
||||
<#-- **** input parameters ***** -->
|
||||
<#-- input : message RFX -->
|
||||
<#-- project : projectId in ReflexPlatform -->
|
||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||
<#-- input : message HARDIS WMS -->
|
||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
||||
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
|
||||
32
RFXtoRP_HsrPackBranch.ftl
Normal file
32
RFXtoRP_HsrPackBranch.ftl
Normal file
@ -0,0 +1,32 @@
|
||||
<#-- **** 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>
|
||||
|
||||
32
RFXtoRP_HsrPackOrder.ftl
Normal file
32
RFXtoRP_HsrPackOrder.ftl
Normal file
@ -0,0 +1,32 @@
|
||||
<#-- **** 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,11 +1,12 @@
|
||||
<#-- **** input parameters ***** -->
|
||||
<#-- input : message RFX -->
|
||||
<#-- project : projectId in ReflexPlatform -->
|
||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||
<#-- input : message HARDIS WMS -->
|
||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
<#assign organisationRP = organisation>
|
||||
<#include "RFX_PartnerAPP_Settings.ftl">
|
||||
|
||||
<#assign aDateTime = .now>
|
||||
|
||||
@ -17,6 +18,7 @@
|
||||
<#assign preparationOrder = JsonUtil.jsonToMap(dataRfx)>
|
||||
|
||||
<#if preparationOrder.total_lv_validated !=0>
|
||||
<#if preparationOrder.preparation_line_lst??>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsPrepared>
|
||||
@ -24,6 +26,7 @@
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl">
|
||||
},
|
||||
<#include "RFXtoRP_HsrPrepa_ExecutionflowMetadataUpdated.ftl">
|
||||
{
|
||||
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
|
||||
@ -54,8 +57,7 @@
|
||||
<#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]?? >
|
||||
<#assign hd_numberHmap += {despatched_ipg.hd_number,despatched_ipg.hd_number}>
|
||||
<#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>
|
||||
@ -78,24 +80,29 @@
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl">
|
||||
}
|
||||
<#if !hd_numberHmapHUadded[despatched_ipg.hd_number]??>
|
||||
<#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 !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>
|
||||
<#stop "no confirmed quantity for the preparation - preparation closed">
|
||||
<#-- no confirmed quantity for the preparation - preparation closed-->
|
||||
<#stop >
|
||||
</#if>
|
||||
|
||||
|
||||
|
||||
@ -4,30 +4,30 @@
|
||||
[
|
||||
<#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 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)}"
|
||||
"Payload":{
|
||||
"Carrier": {
|
||||
"ActorID": "${RFXtoRPprefixCarrier(preparationOrder.load_data.carrier_code?trim?json_string)}"
|
||||
}
|
||||
<#-- Add transport grade code
|
||||
<#if preparationOrder.transport_grade_code!="">
|
||||
,
|
||||
"CarrierService":"${preparationOrder.transport_grade_code?trim?json_string}"
|
||||
</#if> -->
|
||||
}
|
||||
<#-- Add transport grade code
|
||||
<#if preparationOrder.transport_grade_code!="">
|
||||
,
|
||||
"CarrierService":"${preparationOrder.transport_grade_code?trim?json_string}"
|
||||
</#if> -->
|
||||
}
|
||||
}
|
||||
}
|
||||
</#if>
|
||||
</#list>
|
||||
<#assign refIDHmap_local ={}>
|
||||
|
||||
27
RFXtoRP_HsrPrepa_ExecutionflowMetaDataUpdatedToConfigure.ftl
Normal file
27
RFXtoRP_HsrPrepa_ExecutionflowMetaDataUpdatedToConfigure.ftl
Normal file
@ -0,0 +1,27 @@
|
||||
<#--
|
||||
{
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
-->
|
||||
10
RFXtoRP_HsrPrepa_ExecutionflowMetadataUpdated.ftl
Normal file
10
RFXtoRP_HsrPrepa_ExecutionflowMetadataUpdated.ftl
Normal file
@ -0,0 +1,10 @@
|
||||
<#-- 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,7 +1,10 @@
|
||||
<#-- use protobuf of class HsrPrepa to find Reflex WMS fields names -->
|
||||
<#-- use protobuf of class HsrPrepa 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" :[
|
||||
]
|
||||
-->
|
||||
"MetaData": [ ]
|
||||
@ -1,5 +1,11 @@
|
||||
<#-- use protobuf of class Hsrprepa to find Reflex WMS fields names -->
|
||||
<#-- use protobuf of class Hsrprepa 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)
|
||||
"SegmentationKeys": [
|
||||
{
|
||||
"Key": "Grade",
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
[
|
||||
<#assign dispatched3_datetime = RfxDateTimetoUTCWithTimezone(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_rfx) />
|
||||
|
||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list??) as preparation_line3>
|
||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.despatched_ipg_list?size != 0) as preparation_line3>
|
||||
<#list preparation_line3.despatched_ipg_list?filter(j ->j.carton_number!="000000000000000000") as despatched_ipg3>
|
||||
<#if !refIDHmap[despatched_ipg3.carton_number]?? >
|
||||
<#if refIDHmap?size != 0 >
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
<#-- use protobuf of class HsrPrepa to find Reflex WMS fields names -->
|
||||
<#-- use protobuf of class HsrPrepa to find HARDIS WMS fields names -->
|
||||
|
||||
<#--
|
||||
"MetaData" :[
|
||||
<#-- 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": [ ]
|
||||
@ -3,7 +3,7 @@
|
||||
[
|
||||
<#assign dispatched_datetime = RfxDateTimetoUTCWithTimezone(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_rfx) />
|
||||
<#assign refIDHmap_local ={}>
|
||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") as preparation_line>
|
||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.despatched_ipg_list?size != 0 && l.preparation_order_originator_reference!="") as preparation_line>
|
||||
<#list preparation_line.despatched_ipg_list as despatched_ipg>
|
||||
<#if !refIDHmap_local[despatched_ipg.hd_number]?? >
|
||||
<#if refIDHmap_local?size != 0 >
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ActorPrefix.ftl">
|
||||
[
|
||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") as preparation_line>
|
||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.despatched_ipg_list?size != 0 && l.preparation_order_originator_reference!="") as preparation_line>
|
||||
<#list preparation_line.despatched_ipg_list as despatched_ipg>
|
||||
<#assign packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) />
|
||||
{
|
||||
@ -111,8 +111,9 @@
|
||||
|
||||
<#-- Segmentation Keys inclusion -->
|
||||
<#include "RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl">
|
||||
},
|
||||
"ExecutionflowID": "${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}",
|
||||
<#if (preparation_line.pro_originator_reference_line_number!0) != 0>
|
||||
"LineID": "${preparation_line.pro_originator_reference_line_number}",
|
||||
<#else>
|
||||
|
||||
@ -5,25 +5,25 @@
|
||||
<#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[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>
|
||||
<#assign refIDHmap_local +={OrderOriginReference,OrderOriginReference}>
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID":{
|
||||
"RefID": "${OrderOriginReference}"
|
||||
},
|
||||
"Payload":{
|
||||
"Carrier": {
|
||||
"ActorID": "${RFXtoRPprefixCarrier(preparationOrder.load_data.carrier_code?trim?json_string)}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</#if>
|
||||
}
|
||||
</#if>
|
||||
</#list>
|
||||
<#assign refIDHmap_local ={}>
|
||||
]
|
||||
@ -1,6 +1,7 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#include "ActorPrefix.ftl">
|
||||
<#include "RFX_PartnerAPP_Settings.ftl">
|
||||
[
|
||||
<#assign dispatched_datetime4 = RfxDateTimetoUTCWithTimezone(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_rfx) />
|
||||
{
|
||||
@ -8,15 +9,41 @@
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
<#if despatched_ipg.consignment_unit_id!="">
|
||||
"RefID": "${despatched_ipg.consignment_unit_id?trim?json_string}",
|
||||
<#else>
|
||||
<#if despatched_ipg.carton_number != "000000000000000000">
|
||||
"RefID":"${despatched_ipg.carton_number}",
|
||||
<#else>
|
||||
"RefID":"${despatched_ipg.hd_number}",
|
||||
</#if>
|
||||
</#if>
|
||||
<#switch trackingNumberSource>
|
||||
<#case 1>
|
||||
<#if despatched_ipg.consignment_unit_id!="">
|
||||
"RefID": "${despatched_ipg.consignment_unit_id?trim?json_string}",
|
||||
</#if>
|
||||
<#break>
|
||||
<#case 2>
|
||||
<#if despatched_ipg.carton_number != "000000000000000000">
|
||||
"RefID":"${despatched_ipg.carton_number}",
|
||||
<#else>
|
||||
"RefID":"${despatched_ipg.hd_number}",
|
||||
</#if>
|
||||
<#break>
|
||||
<#case 3>
|
||||
<#if despatched_ipg.consignment_unit_id!="">
|
||||
"RefID": "${despatched_ipg.consignment_unit_id?trim?json_string}",
|
||||
<#else>
|
||||
<#if despatched_ipg.carton_number != "000000000000000000">
|
||||
"RefID":"${despatched_ipg.carton_number}",
|
||||
<#else>
|
||||
"RefID":"${despatched_ipg.hd_number}",
|
||||
</#if>
|
||||
</#if>
|
||||
<#break>
|
||||
<#default>
|
||||
<#if despatched_ipg.consignment_unit_id!="">
|
||||
"RefID": "${despatched_ipg.consignment_unit_id?trim?json_string}",
|
||||
<#else>
|
||||
<#if despatched_ipg.carton_number != "000000000000000000">
|
||||
"RefID":"${despatched_ipg.carton_number}",
|
||||
<#else>
|
||||
"RefID":"${despatched_ipg.hd_number}",
|
||||
</#if>
|
||||
</#if>
|
||||
</#switch>
|
||||
|
||||
"RefDate": {
|
||||
"DateTime": "${dispatched_datetime4}",
|
||||
@ -26,8 +53,10 @@
|
||||
"Payload": {
|
||||
<#if despatched_ipg.carton_number != "000000000000000000">
|
||||
"HandlingunitID": "${despatched_ipg.carton_number}"
|
||||
<#assign hd_numberHmap += {despatched_ipg.carton_number,despatched_ipg.carton_number}>
|
||||
<#else>
|
||||
"HandlingunitID": "${despatched_ipg.hd_number}"
|
||||
<#assign hd_numberHmap += {despatched_ipg.hd_number,despatched_ipg.hd_number}>
|
||||
</#if>
|
||||
<#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" >
|
||||
,
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<#-- **** input parameters ***** -->
|
||||
<#-- input : message RFX -->
|
||||
<#-- project : projectId in ReflexPlatform -->
|
||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||
<#-- input : message HARDIS WMS -->
|
||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
||||
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
@ -16,29 +16,33 @@
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
|
||||
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
|
||||
<#-- check preparation type code (internal order and reservation are ignored) -->
|
||||
<#if preparation_order.preparation_type_code == "010" || preparation_order.preparation_type_code == "030">
|
||||
<#-- Only if preparation order not confirmed -->
|
||||
<#if preparation_order.preparation_order_confirmed == "false" >
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl">
|
||||
}
|
||||
<#else>
|
||||
<#-- preparation order already confirmed -->
|
||||
<#stop>
|
||||
</#if>
|
||||
|
||||
<#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.ExecutionflowDetected>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl">
|
||||
},
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCustomFieldsUpdated>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPro_ExecutionflowCustomFieldsUpdated.ftl">
|
||||
}
|
||||
<#else>
|
||||
<#-- No line -->
|
||||
<#stop>
|
||||
</#if>
|
||||
<#else>
|
||||
<#-- preparation order type not supported -->
|
||||
<#stop>
|
||||
<#stop>
|
||||
</#if>
|
||||
<#else>
|
||||
<#stop "PRO reference is empty">
|
||||
<#-- PRO reference is empty -->
|
||||
<#stop>
|
||||
</#if>
|
||||
]
|
||||
<#break>
|
||||
@ -49,14 +53,20 @@
|
||||
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPro_ExecutionflowCancelled.ftl">
|
||||
}
|
||||
<#if preparation_order.line_list??>
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPro_ExecutionflowCancelled.ftl">
|
||||
}
|
||||
<#else>
|
||||
<#-- No line -->
|
||||
<#stop>
|
||||
</#if>
|
||||
<#else>
|
||||
<#stop "PRO reference is empty">
|
||||
<#-- PRO reference is empty -->
|
||||
<#stop>
|
||||
</#if>
|
||||
]
|
||||
<#break>
|
||||
|
||||
40
RFXtoRP_HsrPro_ExecutionflowCustomFieldsUpdated.ftl
Normal file
40
RFXtoRP_HsrPro_ExecutionflowCustomFieldsUpdated.ftl
Normal file
@ -0,0 +1,40 @@
|
||||
<#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,33 @@
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${preparation_order.originator_reference?trim?json_string}",
|
||||
"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}",
|
||||
"RefDate": {
|
||||
"DateTime": "${pro_creation_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
@ -78,7 +104,7 @@
|
||||
}
|
||||
</#if>
|
||||
},
|
||||
|
||||
"OrderID": "${preparation_order.originator_reference?trim?json_string}",
|
||||
<#if preparation_order.line_list??>
|
||||
"Lines" : [
|
||||
<#list preparation_order.line_list as preparation_order_line >
|
||||
|
||||
@ -1,6 +1,12 @@
|
||||
<#-- use protobuf of class HsrPro to find Reflex Wms fields names -->
|
||||
<#-- use protobuf of class HsrPro 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": [
|
||||
{
|
||||
|
||||
@ -1,4 +1,10 @@
|
||||
<#-- use protobuf of class HsrPro to find Reflex Wms fields names -->
|
||||
<#-- use protobuf of class HsrPro 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": [ ]
|
||||
@ -1,5 +1,11 @@
|
||||
<#-- use protobuf of class HsrPro to find Reflex WMS fields names -->
|
||||
<#-- use protobuf of class HsrPro 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)
|
||||
|
||||
"SegmentationKeys": [
|
||||
{
|
||||
@ -16,7 +22,7 @@
|
||||
"Value": { "String" : "no batch"}
|
||||
<#else>
|
||||
"Value": { "String" : "${preparation_order_line.batch_1}"}
|
||||
</#if>
|
||||
</#if>
|
||||
}
|
||||
]
|
||||
-->
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<#-- **** input parameters ***** -->
|
||||
<#-- input : message RFX -->
|
||||
<#-- project : projectId in ReflexPlatform -->
|
||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||
<#-- input : message HARDIS WMS -->
|
||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
||||
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
@ -15,10 +15,10 @@
|
||||
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
||||
<#if receipt.receipt_reference ?? && receipt.receipt_reference!="">
|
||||
<#if receipt.receipt_type = "030">
|
||||
<#stop "ignored message because receipt type = transfert">
|
||||
<#if receipt.receipt_type == "030">
|
||||
<#stop "ignored message because receipt type = transfert">
|
||||
<#else>
|
||||
<#if receipt.line_list ??>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||
@ -32,48 +32,64 @@
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#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>
|
||||
<#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" >
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl">
|
||||
}
|
||||
<#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_type = "030">
|
||||
<#stop "ignored message because receipt type = transfert">
|
||||
<#else>
|
||||
<#if receipt.receipt_confirmed == "true" >
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl">
|
||||
},
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
|
||||
}
|
||||
<#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.ExecutionflowDetected>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl">
|
||||
},
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
|
||||
}
|
||||
<#else>
|
||||
<#-- No line-->
|
||||
<#stop>
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
<#else>
|
||||
<#stop "Receipt reference is empty">
|
||||
</#if>
|
||||
]
|
||||
<#break>
|
||||
|
||||
@ -82,17 +98,18 @@
|
||||
<#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>
|
||||
<#stop "Receipt reference is empty">
|
||||
</#if>
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl">
|
||||
}
|
||||
<#else>
|
||||
<#-- No line-->
|
||||
<#stop>
|
||||
</#if>
|
||||
]
|
||||
<#break>
|
||||
|
||||
|
||||
44
RFXtoRP_HsrReceiptList_CustomFieldsUpdated.ftl
Normal file
44
RFXtoRP_HsrReceiptList_CustomFieldsUpdated.ftl
Normal file
@ -0,0 +1,44 @@
|
||||
<#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,48 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.modification_datetime,time_zone_rfx) />
|
||||
|
||||
<#assign refIDHmap_local ={}>
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${receipt.receipt_reference?trim?json_string}",
|
||||
"RefDate": {
|
||||
"DateTime": "${receipt_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
"Payload": {
|
||||
}
|
||||
}
|
||||
<#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}"},
|
||||
"ID": {
|
||||
"RefID": "${receipt_line.origin_order_line_reference?trim?json_string}",
|
||||
"RefDate": {
|
||||
"DateTime": "${receipt_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
"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,7 +9,37 @@
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${receipt.receipt_reference?trim?json_string}",
|
||||
"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>
|
||||
"RefDate": {
|
||||
"DateTime": "${receipt_creation_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
@ -26,7 +56,11 @@
|
||||
|
||||
"ShipFrom":
|
||||
{
|
||||
<#if receipt.receipt_type == '020'>
|
||||
"ActorID": "${RFXtoRPprefixConsignee(receipt.original_code?trim?json_string)}"
|
||||
<#else>
|
||||
"ActorID": "${RFXtoRPprefixSupplier(receipt.original_code?trim?json_string)}"
|
||||
</#if>
|
||||
},
|
||||
"ShipTo" :
|
||||
{
|
||||
@ -40,7 +74,11 @@
|
||||
"ActorID":"${RFXtoRPprefixCarrier(receipt.carrier_informations.carrier_code?trim?json_string)}"
|
||||
},
|
||||
</#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??>
|
||||
"Lines" : [
|
||||
<#list receipt.line_list as line>
|
||||
|
||||
@ -1,6 +1,12 @@
|
||||
<#-- use protobuf of class HsrReceiptList to find Reflex Wms fields names -->
|
||||
<#-- use protobuf of class HsrReceiptList 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": [
|
||||
{
|
||||
|
||||
@ -1,4 +1,10 @@
|
||||
<#-- use protobuf of class HsrReceiptList to find Reflex Wms fields names -->
|
||||
<#-- use protobuf of class HsrReceiptList 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": [ ]
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user