You've already forked reflex-wms-connector
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 19ed52e148 |
162
ActorPrefix.ftl
162
ActorPrefix.ftl
@@ -1,162 +0,0 @@
|
|||||||
|
|
||||||
<#-- --------------------------------------------------------------------------------------- -->
|
|
||||||
<#-- Actor Prefix 4 cars -->
|
|
||||||
<#-- --------------------------------------------------------------------------------------- -->
|
|
||||||
|
|
||||||
<#-- For Depot -->
|
|
||||||
<#function RFXtoRPprefixDepot depot>
|
|
||||||
<#if uniqueness >
|
|
||||||
<#local actor = depot>
|
|
||||||
<#else>
|
|
||||||
<#if text_language_rfx ="fr">
|
|
||||||
<#local actor = "DEP_"+depot>
|
|
||||||
<#else>
|
|
||||||
<#if text_language_rfx ="it">
|
|
||||||
<#local actor = "DEP_"+depot>
|
|
||||||
<#else>
|
|
||||||
<#if text_language_rfx ="es">
|
|
||||||
<#local actor = "DEP_"+depot>
|
|
||||||
<#else>
|
|
||||||
<#if text_language_rfx ="pl">
|
|
||||||
<#local actor = "MAG_"+depot>
|
|
||||||
<#else>
|
|
||||||
<#if text_language_rfx ="nl">
|
|
||||||
<#local actor = "DEP_"+depot>
|
|
||||||
<#else>
|
|
||||||
<#local actor = "DEP_"+depot>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
<#return (actor)>
|
|
||||||
</#function>
|
|
||||||
|
|
||||||
<#function RPtoRFXprefixDepot actor>
|
|
||||||
<#if uniqueness>
|
|
||||||
<#local depot = actor>
|
|
||||||
<#else>
|
|
||||||
<#local depot = actor[4..]>
|
|
||||||
</#if>
|
|
||||||
<#return (depot)>
|
|
||||||
</#function>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<#-- For Supplier -->
|
|
||||||
<#function RFXtoRPprefixSupplier supplier>
|
|
||||||
<#if uniqueness>
|
|
||||||
<#local actor = supplier>
|
|
||||||
<#else>
|
|
||||||
<#if text_language_rfx ="fr">
|
|
||||||
<#local actor = "FOU_"+supplier>
|
|
||||||
<#else>
|
|
||||||
<#if text_language_rfx ="it">
|
|
||||||
<#local actor = "FOR_"+supplier>
|
|
||||||
<#else>
|
|
||||||
<#if text_language_rfx ="es">
|
|
||||||
<#local actor = "PRO_"+supplier>
|
|
||||||
<#else>
|
|
||||||
<#if text_language_rfx ="pl">
|
|
||||||
<#local actor = "DOS_"+supplier>
|
|
||||||
<#else>
|
|
||||||
<#if text_language_rfx ="nl">
|
|
||||||
<#local actor = "LEV_"+supplier>
|
|
||||||
<#else>
|
|
||||||
<#local actor = "SUP_"+supplier>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
<#return (actor)>
|
|
||||||
</#function>
|
|
||||||
|
|
||||||
<#function RPtoRFXprefixSupplier actor>
|
|
||||||
<#if uniqueness>
|
|
||||||
<#local supplier = actor>
|
|
||||||
<#else>
|
|
||||||
<#local supplier = actor[4..]>
|
|
||||||
</#if>
|
|
||||||
<#return (supplier)>
|
|
||||||
</#function>
|
|
||||||
|
|
||||||
<#-- For Carrier -->
|
|
||||||
<#function RFXtoRPprefixCarrier carrier>
|
|
||||||
<#if uniqueness>
|
|
||||||
<#local actor = carrier>
|
|
||||||
<#else>
|
|
||||||
<#if text_language_rfx ="fr">
|
|
||||||
<#local actor = "TRA_"+carrier>
|
|
||||||
<#else>
|
|
||||||
<#if text_language_rfx ="it">
|
|
||||||
<#local actor = "VET_"+carrier>
|
|
||||||
<#else>
|
|
||||||
<#if text_language_rfx ="es">
|
|
||||||
<#local actor = "TRA_"+carrier>
|
|
||||||
<#else>
|
|
||||||
<#if text_language_rfx ="pl">
|
|
||||||
<#local actor = "PRZ_"+carrier>
|
|
||||||
<#else>
|
|
||||||
<#if text_language_rfx ="nl">
|
|
||||||
<#local actor = "VER_"+carrier>
|
|
||||||
<#else>
|
|
||||||
<#local actor = "CAR_"+carrier>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
<#return (actor)>
|
|
||||||
</#function>
|
|
||||||
|
|
||||||
<#function RPtoRFXprefixCarrier actor>
|
|
||||||
<#if uniqueness>
|
|
||||||
<#local carrier = actor>
|
|
||||||
<#else>
|
|
||||||
<#local carrier = actor[4..]>
|
|
||||||
</#if>
|
|
||||||
<#return (carrier)>
|
|
||||||
</#function>
|
|
||||||
|
|
||||||
<#-- For Consignee -->
|
|
||||||
<#function RFXtoRPprefixConsignee consignee>
|
|
||||||
<#if uniqueness>
|
|
||||||
<#local actor = consignee>
|
|
||||||
<#else>
|
|
||||||
<#if text_language_rfx ="fr">
|
|
||||||
<#local actor = "DES_"+consignee>
|
|
||||||
<#else>
|
|
||||||
<#if text_language_rfx ="it">
|
|
||||||
<#local actor = "DES_"+consignee>
|
|
||||||
<#else>
|
|
||||||
<#if text_language_rfx ="es">
|
|
||||||
<#local actor = "DES_"+consignee>
|
|
||||||
<#else>
|
|
||||||
<#if text_language_rfx ="pl">
|
|
||||||
<#local actor = "ODB_"+consignee>
|
|
||||||
<#else>
|
|
||||||
<#if text_language_rfx ="nl">
|
|
||||||
<#local actor = "ONT_"+consignee>
|
|
||||||
<#else>
|
|
||||||
<#local actor = "CON_"+consignee>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
<#return (actor)>
|
|
||||||
</#function>
|
|
||||||
|
|
||||||
<#function RPtoRFXprefixConsignee actor>
|
|
||||||
<#if uniqueness>
|
|
||||||
<#local consignee = actor>
|
|
||||||
<#else>
|
|
||||||
<#local consignee = actor[4..]>
|
|
||||||
</#if>
|
|
||||||
<#return (consignee)>
|
|
||||||
</#function>
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
|
|
||||||
<#-- --------------------------------------------------------------------------------------- -->
|
|
||||||
<#-- DeleteEF est un paramètre qui permet de déterminer si l’exécution logistique doit être supprimée lors de la création d’une commande.-->
|
|
||||||
<#-- Attention : si vous choisissez de la supprimer, toutes les métadonnées associées à cette exécution logistique seront également supprimées. -->
|
|
||||||
<#-- Si DeleteEF_False = true, nous ne supprimons pas l'exécution logistique, Si DeleteEF_False = false, nous supprimons l'exécution logistique.-->
|
|
||||||
<#-- --------------------------------------------------------------------------------------- -->
|
|
||||||
<#-- DeleteEF is a parameter used to determine whether the logistics execution should be deleted when creating an order.-->
|
|
||||||
<#-- Warning: if deletion is selected, all metadata related to the logistics execution will also be removed. -->
|
|
||||||
<#-- If DeleteEF_False = true, we do not delete the logistics execution. If DeleteEF_False = false, we delete the logistics execution. -->
|
|
||||||
<#-- --------------------------------------------------------------------------------------- -->
|
|
||||||
<#assign DeleteEF_False = true>
|
|
||||||
21
README.md
21
README.md
@@ -1,20 +1,11 @@
|
|||||||
# HARDIS SC NETWORK Core FTLs
|
# Reflex Platform Core FTLs
|
||||||
|
|
||||||
## Overview
|
|
||||||
|
|
||||||
The **HARDIS WMS Connector** is a set of **FreeMarker templates (FTL)** designed to transform **outgoing JSON flows from HARDIS WMS** into **flows compatible with HARDIS SC NETWORK**.
|
These FTL core files aim to translate data flow from Reflex WMS into Reflex platform API.
|
||||||
|
|
||||||
This connector does not contain any standalone executable code: it is intended to be used by **HARDIS WMS integration engines** or **data exchange pipelines**, where it applies the mapping rules defined in the `.ftl` files.
|
|
||||||
|
|
||||||
## Role of 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/
|
||||||
|
|
||||||
- Each `.ftl` file corresponds to a **flow type** (order, stock, receipt, shipment, appointment 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 +0,0 @@
|
|||||||
<#assign trackingNumberSource = 3>
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
"RefID": "${id.refid?json_string}"
|
|
||||||
},
|
|
||||||
"Payload": {}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,60 +1,60 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message HARDIS WMS -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
<#-- sum_elt : nb element in snapshot (optional parameter) -->
|
<#-- sum_elt : nb element in snapshot (optional parameter) -->
|
||||||
|
|
||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
<#assign organisationRP = organisation>
|
<#assign organisationRP = organisation>
|
||||||
|
|
||||||
<#switch cloudEventMsg.action>
|
<#switch cloudEventMsg.action>
|
||||||
<#case "C">
|
<#case "C">
|
||||||
<#case "U">
|
<#case "U">
|
||||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign reflexStockPicturesInterface = JsonUtil.jsonToMap(dataRfx)>
|
<#assign reflexStockPicturesInterface = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
|
||||||
<#-- idSnapshot MUST BE UNIQUE regardless of the number of messages in the stock image -->
|
<#-- idSnapshot MUST BE UNIQUE regardless of the number of messages in the stock image -->
|
||||||
<#if cloudEventMsg.messageSet??>
|
<#if cloudEventMsg.messageSet??>
|
||||||
<#assign idSnapshot = cloudEventMsg.messageSet />
|
<#assign idSnapshot = cloudEventMsg.messageSet />
|
||||||
<#else>
|
<#else>
|
||||||
<#assign idSnapshot = cloudEventMsg.id />
|
<#assign idSnapshot = cloudEventMsg.id />
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
<#list reflexStockPicturesInterface.detailled_stock_list as stock>
|
<#list reflexStockPicturesInterface.detailled_stock_list as stock>
|
||||||
<#if stock.stock_type_code != "200">
|
<#if stock.stock_type_code != "200">
|
||||||
<#stop>
|
<#stop "stock type different from 200">
|
||||||
<#break>
|
<#break>
|
||||||
</#if>
|
</#if>
|
||||||
</#list>
|
</#list>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#if sum_elt??>
|
<#if sum_elt??>
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorSnapshotCompleted>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorSnapshotCompleted>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HfDtlStockLs_ActorSnapshotCompleted.ftl">
|
<#include "RFXtoRP_HfDtlStockLs_ActorSnapshotCompleted.ftl">
|
||||||
<#else>
|
<#else>
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.StockSnapshotted>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.StockSnapshotted>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HfDtlStockLs_StockSnapshotted.ftl">
|
<#include "RFXtoRP_HfDtlStockLs_StockSnapshotted.ftl">
|
||||||
</#if>
|
</#if>
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#case "D">
|
<#case "D">
|
||||||
<#-- *********************************************** Action = DELETE ******************** -->
|
<#-- *********************************************** Action = DELETE ******************** -->
|
||||||
<#stop >
|
<#stop "event not supported">
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop "event not supported">
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -1,29 +1,27 @@
|
|||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
[
|
[
|
||||||
<#list reflexStockPicturesInterface.detailled_stock_list as stock>
|
<#list reflexStockPicturesInterface.detailled_stock_list as stock>
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${RFXtoRPprefixDepot(stock.physical_depot_code)}"
|
"RefID": "${stock.physical_depot_code}"
|
||||||
},
|
},
|
||||||
"Payload": {
|
"Payload": {
|
||||||
<#assign generation_date = RfxDateTimetoUTCWithTimezone(stock.generation_date,time_zone_rfx) />
|
<#assign generation_date = RfxDateTimetoUTC(stock.generation_date,time_zone_offset_rfx) />
|
||||||
"Snapshot": {
|
"Snapshot": {
|
||||||
"EndDateTime": {
|
"EndDateTime": {
|
||||||
"DateTime": "${generation_date}",
|
"DateTime": "${generation_date}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
},
|
},
|
||||||
"ID": "${stock.physical_depot_code}-${idSnapshot}",
|
"ID": "${stock.physical_depot_code}-${idSnapshot}",
|
||||||
"MessageNb": ${sum_elt}
|
"MessageNb": ${sum_elt}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
<#break>
|
<#break>
|
||||||
</#list>
|
</#list>
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -1,44 +1,38 @@
|
|||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
[
|
[
|
||||||
<#list reflexStockPicturesInterface.detailled_stock_list as stock>
|
<#list reflexStockPicturesInterface.detailled_stock_list as stock>
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"Payload": {
|
"Payload": {
|
||||||
"ActorID": "${RFXtoRPprefixDepot(stock.physical_depot_code)}",
|
"ActorID": "${stock.physical_depot_code}",
|
||||||
<#assign generation_date = RfxDateTimetoUTCWithTimezone(stock.generation_date,time_zone_rfx) />
|
<#assign generation_date = RfxDateTimetoUTC(stock.generation_date,time_zone_offset_rfx) />
|
||||||
"Snapshot": {
|
"Snapshot": {
|
||||||
"DateTime": {
|
"DateTime": {
|
||||||
"DateTime": "${generation_date}",
|
"DateTime": "${generation_date}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
},
|
},
|
||||||
"ID": "${stock.physical_depot_code}-${idSnapshot}",
|
"ID": "${stock.physical_depot_code}-${idSnapshot}",
|
||||||
"Quantity":
|
"Quantity":
|
||||||
{
|
{
|
||||||
"Value" : "${stock.quantity_in_base_lvs!"0"}",
|
"Value" : "${stock.quantity_in_base_lvs!"0"}",
|
||||||
"LVID": "${quantity_in_base_lv_RP_Cst}"
|
"LVID": "${quantity_in_base_lv_RP_Cst}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"Goods": {
|
"Goods": {
|
||||||
"ItemID": "${stock.item_code?trim?json_string}",
|
"ItemID": "${stock.item_code}",
|
||||||
"LVBranchID": "${stock.item_logistical_variant_code}",
|
"LVBranchID": "${stock.item_logistical_variant_code}",
|
||||||
<#assign priority_date = stock.priority_date?datetime(rfx_date_format_default)?iso_utc />
|
<#assign priority_date = stock.priority_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
<#if (stock.priority_date!="") && (stock.priority_date?starts_with("00")== false) >
|
"PriorityDate" : "${priority_date}",
|
||||||
"PriorityDate" : "${priority_date}",
|
|
||||||
<#else>
|
|
||||||
"PriorityDate": "1970-01-01T00:00:00Z",
|
|
||||||
</#if>
|
|
||||||
|
|
||||||
<#-- Segmentation keys inclusion -->
|
<#-- Segmentation keys inclusion -->
|
||||||
<#include "RFXtoRP_HfDtlStockLs_StockSnapshotted_SegmentationKeys.ftl">
|
<#include "RFXtoRP_HfDtlStockLs_StockSnapshotted_SegmentationKeys.ftl">
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}<#sep>,</#sep>
|
}<#sep>,</#sep>
|
||||||
</#list>
|
</#list>
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,6 @@
|
|||||||
<#-- use protobuf of class HfDtlStockLs to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HfDtlStockLs to find Reflex WMS fields names -->
|
||||||
|
|
||||||
<#--
|
<#--
|
||||||
Best practices:
|
|
||||||
If the SK is of type:
|
|
||||||
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
|
||||||
- boolean: possible values: true and false
|
|
||||||
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
|
||||||
- decimal number: the separator is a point (e.g. 10.5)
|
|
||||||
|
|
||||||
"SegmentationKeys": [
|
"SegmentationKeys": [
|
||||||
{
|
{
|
||||||
@@ -22,22 +16,22 @@ Best practices:
|
|||||||
<#if stock.batch_1 == "">
|
<#if stock.batch_1 == "">
|
||||||
"Value": { "String" : "no batch"}
|
"Value": { "String" : "no batch"}
|
||||||
<#else>
|
<#else>
|
||||||
"Value": { "String" : "${stock.batch_1?json_string}"}
|
"Value": { "String" : "${stock.batch_1}"}
|
||||||
</#if>
|
</#if>
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Key": "HeldForSpecificCode",
|
"Key": "HeldForSpecificCode",
|
||||||
"Value": { "Bool" : "${stock.held_for_specific_code}"}
|
"Value": { "Bool" : "${stock.held_for_specific_code}"}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
<#assign manufacturing_datetime = RfxDateTimetoUTCWithTimezone(stock.Date_of_manufacture,time_zone_rfx) />
|
<#assign manufacturing_datetime = RfxDateTimetoUTC(stock.Date_of_manufacture,time_zone_offset_rfx) />
|
||||||
"Key": "ManufacturingDate",
|
"Key": "ManufacturingDate",
|
||||||
"Value": "Timestamp": {
|
"Value": "Timestamp": {
|
||||||
"AuthorTimeZone": "${time_zone_rfx}",
|
"AuthorTimeZone": "${time_zone_rfx}",
|
||||||
"DateTime": "${manufacturing_datetime}"
|
"DateTime": "${manufacturing_datetime}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<#-- *********************************************** Parameter global ******************** -->
|
<#-- *********************************************** Parameter global ******************** -->
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
<#assign organisationRP = organisation>
|
<#assign organisationRP = organisation>
|
||||||
<#include "HfExpGrpList.ftl">
|
<#include "HfExpGrpList.ftl">
|
||||||
@@ -15,14 +15,14 @@
|
|||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign file = JsonUtil.jsonToMap(dataRfx)>
|
<#assign file = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
|
||||||
<#assign temp = ExpiryGroupList64>
|
<#assign temp = ExpiryGroupList64>
|
||||||
<#list file.expiry_group_list as expiry_group>
|
<#list file.expiry_group_list as expiry_group>
|
||||||
<#assign temp = JsonUtil.update(temp,cloudEventMsg.action,expiry_group.exipiry_group_code,Date_Tye_Code_KV[expiry_group.priority_date_type_code])>
|
<#assign temp = JsonUtil.update(temp,cloudEventMsg.action,expiry_group.exipiry_group_code,Date_Tye_Code_KV[expiry_group.priority_date_type_code])>
|
||||||
</#list>
|
</#list>
|
||||||
<#assign output = JsonUtil.print(temp)>
|
<#assign output = JsonUtil.print(temp)>
|
||||||
${output}
|
${output}
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop>
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<#-- *********************************************** Parameter global ******************** -->
|
<#-- *********************************************** Parameter global ******************** -->
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
<#assign organisationRP = organisation>
|
<#assign organisationRP = organisation>
|
||||||
|
|
||||||
@@ -9,11 +9,11 @@
|
|||||||
<#case "C">
|
<#case "C">
|
||||||
<#case "U">
|
<#case "U">
|
||||||
<#case "D">
|
<#case "D">
|
||||||
<#stop "no generic FTL file available yet for Grades">
|
<#stop "no generic FTL file available yet for Grades">
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop "event not supported">
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<#-- *********************************************** Parameter global ******************** -->
|
<#-- *********************************************** Parameter global ******************** -->
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
<#assign organisationRP = organisation>
|
<#assign organisationRP = organisation>
|
||||||
|
|
||||||
@@ -9,13 +9,11 @@
|
|||||||
<#case "C">
|
<#case "C">
|
||||||
<#case "U">
|
<#case "U">
|
||||||
<#case "D">
|
<#case "D">
|
||||||
|
<#stop "no generic FTL file available yet for LV types">
|
||||||
<#stop "no generic FTL file available yet for LV types">
|
|
||||||
|
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop "event not supported">
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<#-- *********************************************** Parameter global ******************** -->
|
<#-- *********************************************** Parameter global ******************** -->
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
<#assign organisationRP = organisation>
|
<#assign organisationRP = organisation>
|
||||||
|
|
||||||
@@ -9,11 +9,11 @@
|
|||||||
<#case "C">
|
<#case "C">
|
||||||
<#case "U">
|
<#case "U">
|
||||||
<#case "D">
|
<#case "D">
|
||||||
<#stop "no generic FTL file available yet for Owners">
|
<#stop "no generic FTL file available yet for Owners">
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop "event not supported">
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<#-- ****
|
<#-- ****
|
||||||
HARDIS WMS provides some of their environment parameters through the class HfRpConfig
|
Reflex WMS provides some of their environment parameters through the class HfRpConfig
|
||||||
those parameters are stored in FTL file HfRpConfig.ftl for later use in some of the data ftl files
|
those parameters are stored in FTL file HfRpConfig.ftl for later use in some of the data ftl files
|
||||||
*** -->
|
*** -->
|
||||||
|
|
||||||
<#-- *********************************************** Parameter global ******************** -->
|
<#-- *********************************************** Parameter global ******************** -->
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
<#assign organisationRP = organisation>
|
<#assign organisationRP = organisation>
|
||||||
|
|
||||||
@@ -16,18 +16,18 @@ those parameters are stored in FTL file HfRpConfig.ftl for later use in some of
|
|||||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign file = JsonUtil.jsonToMap(dataRfx)>
|
<#assign file = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
|
||||||
<#include "RFXtoRP_RfxConfigurationRp.ftl">
|
<#include "RFXtoRP_RfxConfigurationRp.ftl">
|
||||||
|
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#case "D">
|
<#case "D">
|
||||||
<#-- *********************************************** Action = DELETE ******************** -->
|
<#-- *********************************************** Action = DELETE ******************** -->
|
||||||
<#stop "deletion of config not supported">
|
<#stop "deletion of config not supported">
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop "event not supported">
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -1,103 +0,0 @@
|
|||||||
<#-- **** input parameters ***** -->
|
|
||||||
<#-- 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>
|
|
||||||
|
|
||||||
<#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?? && preparationOrder.total_lv_validated !=0>
|
|
||||||
<#if preparationOrder.preparation_type_code=="010" || preparationOrder.preparation_type_code=="030">
|
|
||||||
<#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?? ) 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>
|
|
||||||
<#-- Preparation Type not supported-->
|
|
||||||
<#stop>
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#-- no confirmed quantity for the preparation - preparation closed-->
|
|
||||||
<#stop>
|
|
||||||
</#if>
|
|
||||||
|
|
||||||
|
|
||||||
<#break>
|
|
||||||
<#case "D">
|
|
||||||
<#-- *********************************************** Action = DELETE ******************** -->
|
|
||||||
<#stop>
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
<#default>
|
|
||||||
<#stop>
|
|
||||||
</#switch>
|
|
||||||
@@ -1,163 +0,0 @@
|
|||||||
<#-- **** input parameters ***** -->
|
|
||||||
<#-- input : message HARDIS WMS -->
|
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
|
||||||
<#assign projectRP = project>
|
|
||||||
<#assign organisationRP = organisation>
|
|
||||||
|
|
||||||
<#assign aDateTime = .now>
|
|
||||||
|
|
||||||
<#switch cloudEventMsg.action>
|
|
||||||
<#case "C">
|
|
||||||
<#-- *********************************************** Action = CREATE ******************** -->
|
|
||||||
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
||||||
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
|
||||||
<#if receipt.receipt_type?? && receipt.receipt_type = "030" && receipt.line_list??> <#-- if reception is a transfer type -->
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowLinesAdded>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HliReceiptLr_TransfertExecutionflowLinesAdded.ftl">
|
|
||||||
},
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrReceiptList_TransfertReceiptExpected.ftl">
|
|
||||||
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#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>
|
|
||||||
<#stop>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
<#break>
|
|
||||||
<#case "U">
|
|
||||||
<#-- *********************************************** Action = UPDATE ******************** -->
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
||||||
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
|
||||||
[
|
|
||||||
<#if receipt.receipt_type?? && receipt.receipt_type == "030" && receipt.receipt_confirmed == "true" && receipt.confirmation_total_level_1==0 && receipt.confirmation_total_level_2==0 && receipt.confirmation_total_level_3==0>
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrReceiptList_TransfertExecutionflowCancelled.ftl">
|
|
||||||
}
|
|
||||||
<#else>
|
|
||||||
<#if receipt.receipt_type?? && receipt.receipt_type == "030" && receipt.receipt_confirmed == "true">
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrReceiptList_TransfertExecutionflowReceiptCompleted.ftl">
|
|
||||||
}
|
|
||||||
<#else>
|
|
||||||
<#if receipt.receipt_confirmed?? && 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 ?? && receipt.receipt_confirmed == "true" >
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl">
|
|
||||||
}
|
|
||||||
<#else>
|
|
||||||
<#if receipt.receipt_type?? && receipt.receipt_type == "030" && receipt.receipt_confirmed == "false" && receipt.line_list??>
|
|
||||||
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowLinesAdded>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HliReceiptLr_TransfertExecutionflowLinesAdded.ftl">
|
|
||||||
|
|
||||||
},
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrReceiptList_TransfertReceiptExpected.ftl">
|
|
||||||
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#else>
|
|
||||||
<#stop> <#-- Receipt reference for transfer is empty-->
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#if receipt.line_list ??>
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowLinesAdded>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HliReceiptLr_TransfertExecutionflowLinesAdded.ftl">
|
|
||||||
},
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
|
|
||||||
}
|
|
||||||
<#else>
|
|
||||||
<#stop>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
]
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
<#case "D">
|
|
||||||
<#-- *********************************************** Action = DELETE ******************** -->
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
||||||
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
|
||||||
<#if receipt.line_list ??>
|
|
||||||
[
|
|
||||||
{
|
|
||||||
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl">
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#else>
|
|
||||||
<#stop> <#-- No line-->
|
|
||||||
</#if>
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
|
|
||||||
<#default>
|
|
||||||
<#stop >
|
|
||||||
</#switch>
|
|
||||||
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
<#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": {
|
|
||||||
"RefID": "R${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}",
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${receipt_creation_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"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>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,193 +0,0 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
<#assign receipt_datetime = RfxDateTimetoUTCWithTimezone(receipt.receipt_datetime,time_zone_rfx) />
|
|
||||||
<#assign receipt_creation_datetime = RfxDateTimetoUTCWithTimezone(receipt.creation_datetime,time_zone_rfx) />
|
|
||||||
<#assign refIDHmap_local ={}>
|
|
||||||
[
|
|
||||||
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
|
||||||
{
|
|
||||||
"Header": {"ProjectID": "${projectRP}"},
|
|
||||||
"ID": {
|
|
||||||
<#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="">
|
|
||||||
"RefID": "${receipt.origin_order_line_depot?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
"RefID": "R${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}",
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${receipt_creation_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
<#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>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
<#else>
|
|
||||||
<#if receipt.line_list??>
|
|
||||||
<#list receipt.line_list as receipt_line >
|
|
||||||
<#if receipt_line.origin_order_line_reference!="">
|
|
||||||
<#if !refIDHmap_local[receipt_line.origin_order_line_reference]?? >
|
|
||||||
<#if refIDHmap_local?size != 0 >
|
|
||||||
,
|
|
||||||
</#if>
|
|
||||||
<#assign refIDHmap_local +={receipt_line.origin_order_line_reference,receipt_line.origin_order_line_reference}>
|
|
||||||
{
|
|
||||||
"Header": {"ProjectID": "${projectRP}"},
|
|
||||||
"ID": {
|
|
||||||
<#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="">
|
|
||||||
"RefID": "${receipt.origin_order_line_depot?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt_line.origin_order_line_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
"RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt_line.origin_order_line_reference?trim?json_string}",
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${receipt_creation_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
"CreationDateTime": {
|
|
||||||
"DateTime": "${receipt_creation_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
},
|
|
||||||
"OrderID":"${receipt_line.origin_order_line_reference?trim?json_string}",
|
|
||||||
<#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>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
{
|
|
||||||
"Header": {"ProjectID": "${projectRP}"},
|
|
||||||
"ID": {
|
|
||||||
"RefID": "R${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year?trim?json_string}${receipt.receipt_number?trim?json_string}",
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${receipt_creation_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
"CreationDateTime": {
|
|
||||||
"DateTime": "${receipt_creation_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
},
|
|
||||||
"OrderID":"${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year?trim?json_string}${receipt.receipt_number?trim?json_string}",
|
|
||||||
<#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>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
<#break>
|
|
||||||
</#if>
|
|
||||||
</#list>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
]
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
<#-- **** input parameters ***** -->
|
|
||||||
<#-- input : message HARDIS WMS -->
|
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
|
||||||
<#assign projectRP = project>
|
|
||||||
<#assign organisationRP = organisation>
|
|
||||||
|
|
||||||
<#assign aDateTime = .now>
|
|
||||||
|
|
||||||
<#switch cloudEventMsg.action>
|
|
||||||
<#case "C">
|
|
||||||
<#case "U">
|
|
||||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
||||||
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
|
|
||||||
[
|
|
||||||
<#-- check preparation type code (internal order and reservation are ignored) -->
|
|
||||||
<#if 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>
|
|
||||||
]
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
<#case "D">
|
|
||||||
<#-- *********************************************** Action = DELETE ******************** -->
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
||||||
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
|
|
||||||
[
|
|
||||||
<#if preparation_order.preparation_type_code == "010" || preparation_order.preparation_type_code == "030" >
|
|
||||||
<#if preparation_order.line_list??>
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrPro_ExecutionflowCancelled.ftl">
|
|
||||||
}
|
|
||||||
<#else>
|
|
||||||
<#-- No line -->
|
|
||||||
<#stop>
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#-- Preparation order type not supported -->
|
|
||||||
<#stop>
|
|
||||||
</#if>
|
|
||||||
]
|
|
||||||
<#break>
|
|
||||||
<#default>
|
|
||||||
<#stop >
|
|
||||||
</#switch>
|
|
||||||
|
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#assign planned_final_delivery_start_datetime = RfxDateTimetoUTCWithTimezone(preparation_order.planned_final_delivery_start_datetime,time_zone_rfx) />
|
|
||||||
<#assign pro_creation_datetime = RfxDateTimetoUTCWithTimezone(preparation_order.creation_datetime,time_zone_rfx) />
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
|
|
||||||
"RefID": "${preparation_order.physical_depot_code?trim?json_string}${preparation_order.activity_code?trim?json_string}${preparation_order.originator_code?trim?json_string}${preparation_order.originator_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
"RefID": "O${preparation_order.physical_depot_code?trim?json_string}${preparation_order.activity_code?trim?json_string}${preparation_order.originator_code?trim?json_string}${preparation_order.preparation_order_year}${preparation_order.preparation_order_number}",
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${pro_creation_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"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,12 +1,9 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message HARDIS WMS -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
<#assign organisationRP = organisation>
|
<#assign organisationRP = organisation>
|
||||||
|
|
||||||
@@ -17,33 +14,33 @@
|
|||||||
<#case "U">
|
<#case "U">
|
||||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign carrier = JsonUtil.jsonToMap(dataRfx)>
|
<#assign carrier = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreatedv2>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaCarrier_ActorCreated.ftl">
|
<#include "RFXtoRP_HsaCarrier_ActorCreated.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#case "D">
|
<#case "D">
|
||||||
<#-- *********************************************** Action = DELETE ******************************* -->
|
<#-- *********************************************** Action = DELETE ******************************* -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign carrier = JsonUtil.jsonToMap(dataRfx)>
|
<#assign carrier = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorDeleted>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorDeleted>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaCarrier_ActorDeleted.ftl">
|
<#include "RFXtoRP_HsaCarrier_ActorDeleted.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop "event not supported">
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -1,52 +1,51 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${RFXtoRPprefixCarrier(carrier.carrier_code?trim?json_string)}"
|
"RefID": "${carrier.carrier_code}"
|
||||||
},
|
},
|
||||||
|
|
||||||
"Payload": {
|
"Payload": {
|
||||||
"Name": "${carrier.carrier_designation?json_string}",
|
"Name": "${carrier.carrier_designation?json_string}",
|
||||||
|
"ManagedStock": false,
|
||||||
"IsCarrier": true,
|
"IsCarrier": true,
|
||||||
|
<#-- ***Partner ID could be added here *** -->
|
||||||
|
<#-- "PartnerID": "${}", -->
|
||||||
|
|
||||||
|
<#--
|
||||||
<#include "RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl">,
|
<#include "RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl">,
|
||||||
|
-->
|
||||||
|
|
||||||
|
|
||||||
"Address":
|
"Address":
|
||||||
{
|
{
|
||||||
<#-- if HARDIS WMS address is structured -->
|
<#-- if Reflex WMS address is structured -->
|
||||||
<#if carrier.carrier_structured_address?? >
|
<#if carrier.carrier_structured_address?? >
|
||||||
|
|
||||||
"Name": "${carrier.carrier_structured_address.name_or_company?json_string}",
|
"Name": "${carrier.carrier_structured_address.name_or_company?json_string}",
|
||||||
"StreetAddressOne" : "${carrier.carrier_structured_address.street_and_PO?json_string}",
|
"StreetAddressOne" : "${carrier.carrier_structured_address.street_and_PO?json_string}",
|
||||||
"StreetAddressTwo" : "${carrier.carrier_structured_address.additionnal_data?json_string}",
|
"StreetAddressTwo" : "${carrier.carrier_structured_address.additionnal_data?json_string}",
|
||||||
"PostalCode" : "${carrier.carrier_structured_address.postal_code?json_string}",
|
"PostalCode" : "${carrier.carrier_structured_address.postal_code?json_string}",
|
||||||
"City" : "${carrier.carrier_structured_address.post_code_area_name?json_string}",
|
"City" : "${carrier.carrier_structured_address.post_code_area_name?json_string}",
|
||||||
<#assign isCountryCode = JsonUtil.isCountryCode(carrier.carrier_structured_address.country_code?upper_case) />
|
"CountryCode" : "${carrier.carrier_structured_address.country_code?json_string}",
|
||||||
<#if isCountryCode>
|
|
||||||
"CountryCode" : "${carrier.carrier_structured_address.country_code?upper_case?json_string}",
|
|
||||||
<#else>
|
|
||||||
"CountryCode" : "",
|
|
||||||
</#if>
|
|
||||||
"ProvinceCode": "${carrier.carrier_structured_address.territorial_div_code?json_string}",
|
"ProvinceCode": "${carrier.carrier_structured_address.territorial_div_code?json_string}",
|
||||||
"State": "${carrier.carrier_structured_address.country_designation?json_string}"
|
"State": "${carrier.carrier_structured_address.country_designation?json_string}"
|
||||||
<#-- if HARDIS WMS address is not structured -->
|
|
||||||
|
<#-- if Reflex WMS address is not structured -->
|
||||||
<#else>
|
<#else>
|
||||||
<#if carrier.address??>
|
"Name": "${carrier.address.company_name?json_string}",
|
||||||
"Name": "${carrier.address.company_name?json_string}",
|
"StreetAddressOne" : "${carrier.address.address_1?json_string}",
|
||||||
"StreetAddressOne" : "${carrier.address.address_1?json_string}",
|
"StreetAddressTwo" : "${carrier.address.address_2?json_string}",
|
||||||
"StreetAddressTwo" : "${carrier.address.address_2?json_string}",
|
"StreetAddressThree" : "${carrier.address.address_3?json_string}"
|
||||||
"StreetAddressThree" : "${carrier.address.address_3?json_string}",
|
</#if>
|
||||||
"CountryCode" : ""
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
},
|
},
|
||||||
<#if carrier.address??>
|
|
||||||
"Phones": ["${carrier.address.telephone?json_string}",
|
"Phones": ["${carrier.address.telephone?json_string}",
|
||||||
"${carrier.address.other_number?json_string}"
|
"${carrier.address.other_number?json_string}"
|
||||||
],
|
],
|
||||||
</#if>
|
|
||||||
"Typology": "TYPOLOGY_CARRIER"
|
"Typology": "TYPOLOGY_CARRIER"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,10 +1,4 @@
|
|||||||
<#-- use protobuf of class HsaCarrier to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsaCarrier to find Reflex WMS fields names -->
|
||||||
|
|
||||||
<#-- Best practices:
|
|
||||||
If the SK is of type:
|
|
||||||
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
|
||||||
- boolean: possible values: true and false
|
|
||||||
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
|
||||||
- decimal number: the separator is a point (e.g. 10.5)-->
|
|
||||||
|
|
||||||
"MetaData": [ ]
|
"MetaData": [ ]
|
||||||
@@ -1,11 +1,12 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${RFXtoRPprefixCarrier(carrier.carrier_code?trim?json_string)}"
|
"RefID": "${carrier.carrier_code}"
|
||||||
},
|
},
|
||||||
|
|
||||||
"Payload": {}
|
"Payload": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message HARDIS WMS -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
<#assign organisationRP = organisation>
|
<#assign organisationRP = organisation>
|
||||||
|
|
||||||
@@ -17,34 +14,33 @@
|
|||||||
<#case "U">
|
<#case "U">
|
||||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
|
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreatedv2>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaCons_ActorCreated.ftl">
|
<#include "RFXtoRP_HsaCons_ActorCreated.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#case "D">
|
<#case "D">
|
||||||
<#-- *********************************************** Action = DELETE ******************** -->
|
<#-- *********************************************** Action = DELETE ******************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
|
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorDeleted>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorDeleted>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaCons_ActorDeleted.ftl">
|
<#include "RFXtoRP_HsaCons_ActorDeleted.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop "event not supported">
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -4,50 +4,49 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${RFXtoRPprefixConsignee(actor.code?trim?json_string)}"
|
"RefID": "${actor.code}"
|
||||||
},
|
},
|
||||||
|
|
||||||
"Payload": {
|
"Payload": {
|
||||||
"Name": "${actor.designation?json_string}",
|
"Name": "${actor.designation?json_string}",
|
||||||
|
"ManagedStock": false,
|
||||||
"IsCarrier": false,
|
"IsCarrier": false,
|
||||||
|
<#-- ***Partner ID could be added here *** -->
|
||||||
|
<#-- "PartnerID": "${}", -->
|
||||||
|
|
||||||
|
<#--
|
||||||
<#include "RFXtoRP_HsaCons_ActorCreated_Metadata.ftl">,
|
<#include "RFXtoRP_HsaCons_ActorCreated_Metadata.ftl">,
|
||||||
|
-->
|
||||||
|
|
||||||
"Address":
|
"Address":
|
||||||
{
|
{
|
||||||
<#-- if HARDIS WMS is structured -->
|
|
||||||
|
<#-- if Reflex WMS is structured -->
|
||||||
<#if actor.consignee_structured_address??>
|
<#if actor.consignee_structured_address??>
|
||||||
|
|
||||||
"Name": "${actor.consignee_structured_address.name_or_company?json_string}",
|
"Name": "${actor.consignee_structured_address.name_or_company?json_string}",
|
||||||
"StreetAddressOne" : "${actor.consignee_structured_address.street_and_PO?json_string}",
|
"StreetAddressOne" : "${actor.consignee_structured_address.street_and_PO?json_string}",
|
||||||
"StreetAddressTwo" : "${actor.consignee_structured_address.additionnal_data?json_string}",
|
"StreetAddressTwo" : "${actor.consignee_structured_address.additionnal_data?json_string}",
|
||||||
"PostalCode" : "${actor.consignee_structured_address.postal_code?json_string}",
|
"PostalCode" : "${actor.consignee_structured_address.postal_code?json_string}",
|
||||||
"City" : "${actor.consignee_structured_address.post_code_area_name?json_string}",
|
"City" : "${actor.consignee_structured_address.post_code_area_name?json_string}",
|
||||||
<#assign isCountryCode = JsonUtil.isCountryCode(actor.consignee_structured_address.country_code?upper_case) />
|
"CountryCode" : "${actor.consignee_structured_address.country_code?json_string}",
|
||||||
<#if isCountryCode>
|
|
||||||
"CountryCode" : "${actor.consignee_structured_address.country_code?upper_case?json_string}",
|
|
||||||
<#else>
|
|
||||||
"CountryCode" : "",
|
|
||||||
</#if>
|
|
||||||
"ProvinceCode": "${actor.consignee_structured_address.territorial_div_code?json_string}",
|
"ProvinceCode": "${actor.consignee_structured_address.territorial_div_code?json_string}",
|
||||||
"State": "${actor.consignee_structured_address.country_designation?json_string}"
|
"State": "${actor.consignee_structured_address.country_designation?json_string}"
|
||||||
|
|
||||||
<#-- if HARDIS WMS is not structured -->
|
<#-- if Reflex WMS is not structured -->
|
||||||
<#else>
|
<#else>
|
||||||
<#if actor.address?? >
|
|
||||||
|
|
||||||
"Name": "${actor.address.company_name?json_string}",
|
"Name": "${actor.address.company_name?json_string}",
|
||||||
"StreetAddressOne" : "${actor.address.address_1?json_string}",
|
"StreetAddressOne" : "${actor.address.address_1?json_string}",
|
||||||
"StreetAddressTwo" : "${actor.address.address_2?json_string}",
|
"StreetAddressTwo" : "${actor.address.address_2?json_string}",
|
||||||
"StreetAddressThree" : "${actor.address.address_3?json_string}",
|
"StreetAddressThree" : "${actor.address.address_3?json_string}"
|
||||||
"CountryCode" : ""
|
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
},
|
||||||
},
|
|
||||||
<#if actor.address?? >
|
"Phones": ["${actor.address.telephone?json_string}",
|
||||||
"Phones": ["${actor.address.telephone?json_string}",
|
|
||||||
"${actor.address.other_number?json_string}"
|
"${actor.address.other_number?json_string}"
|
||||||
],
|
],
|
||||||
</#if>
|
|
||||||
"Typology": "TYPOLOGY_UNKNOWN"
|
"Typology": "TYPOLOGY_UNKNOWN"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,4 @@
|
|||||||
<#-- use protobuf of class HsaCons to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsaCons to find Reflex WMS fields names -->
|
||||||
|
|
||||||
<#-- Best practices:
|
|
||||||
If the SK is of type:
|
|
||||||
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
|
||||||
- boolean: possible values: true and false
|
|
||||||
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
|
||||||
- decimal number: the separator is a point (e.g. 10.5)-->
|
|
||||||
|
|
||||||
"MetaData": [ ]
|
"MetaData": [ ]
|
||||||
@@ -1,11 +1,12 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${RFXtoRPprefixConsignee(actor.code?trim?json_string)}"
|
"RefID": "${actor.code}"
|
||||||
},
|
},
|
||||||
|
|
||||||
"Payload": {}
|
"Payload": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
<#-- **** input parameters ***** -->
|
|
||||||
<#-- input : message HARDIS WMS -->
|
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
|
||||||
<#assign projectRP = project>
|
|
||||||
<#assign organisationRP = organisation>
|
|
||||||
|
|
||||||
<#assign aDateTime = .now>
|
|
||||||
|
|
||||||
<#switch cloudEventMsg.action>
|
|
||||||
<#case "C">
|
|
||||||
<#case "U">
|
|
||||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
||||||
<#assign desPatch = JsonUtil.jsonToMap(dataRfx)>
|
|
||||||
|
|
||||||
<#stop "no generic FTL file available yet for desPatch">
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
<#case "D">
|
|
||||||
<#-- *********************************************** Action = DELETE ******************** -->
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
||||||
<#assign desPatch = JsonUtil.jsonToMap(dataRfx)>
|
|
||||||
|
|
||||||
<#stop "no generic FTL file available yet for desPatch">
|
|
||||||
<#break>
|
|
||||||
<#default>
|
|
||||||
<#stop >
|
|
||||||
</#switch>
|
|
||||||
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
<#-- **** input parameters ***** -->
|
|
||||||
<#-- input : message 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 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,50 +0,0 @@
|
|||||||
<#-- **** input parameters ***** -->
|
|
||||||
<#-- input : message HARDIS WMS -->
|
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
|
||||||
<#assign projectRP = project>
|
|
||||||
<#assign organisationRP = organisation>
|
|
||||||
|
|
||||||
<#assign aDateTime = .now>
|
|
||||||
|
|
||||||
<#switch cloudEventMsg.action>
|
|
||||||
<#case "C">
|
|
||||||
<#case "U">
|
|
||||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
||||||
<#assign dispute = JsonUtil.jsonToMap(dataRfx)>
|
|
||||||
[
|
|
||||||
<#if dispute.dispute_closed == true >
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimCreated>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsaDispute_Created.ftl">
|
|
||||||
}
|
|
||||||
<#if TableReasonCode[dispute.dispute_reason_code]??>
|
|
||||||
,
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimMessageSent>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsaDispute_MessageSent.ftl">
|
|
||||||
}
|
|
||||||
<#else>
|
|
||||||
<#stop>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
]
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
<#case "D">
|
|
||||||
<#-- *********************************************** Action = DELETE ******************** -->
|
|
||||||
<#stop>
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
|
|
||||||
<#default>
|
|
||||||
<#stop>
|
|
||||||
</#switch>
|
|
||||||
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
<#-- use protobuf of class HsaDispute to find HARDIS WMS fields names -->
|
|
||||||
|
|
||||||
<#-- Best practices:
|
|
||||||
If the SK is of type:
|
|
||||||
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
|
||||||
- boolean: possible values: true and false
|
|
||||||
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
|
||||||
- decimal number: the separator is a point (e.g. 10.5)-->
|
|
||||||
|
|
||||||
"MetaData": [ ]
|
|
||||||
@@ -1,91 +0,0 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "Table.ftl">
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
<#if dispute.dispute_preparation??>
|
|
||||||
<#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0>
|
|
||||||
"RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_activity_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
|
||||||
<#else>
|
|
||||||
<#stop "preparation order list is empty" >
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#if dispute.dispute_reception??>
|
|
||||||
"RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
<#if dispute.dispute_reference?? && dispute.dispute_reference!="">
|
|
||||||
"Title":"${dispute.dispute_reference?json_string}",
|
|
||||||
<#else>
|
|
||||||
"Title":"",
|
|
||||||
</#if>
|
|
||||||
"Criticality":"${TableCriticality[dispute.dispute_criticity]}",
|
|
||||||
"Amount": {
|
|
||||||
<#assign isCurrencyCode = JsonUtil.isCurrencyCode(dispute.dispute_amount_unit?upper_case) />
|
|
||||||
<#if isCurrencyCode>
|
|
||||||
"Currency" : "${dispute.dispute_amount_unit?upper_case?json_string}",
|
|
||||||
<#else>
|
|
||||||
<#if TableAmount[dispute.dispute_amount_unit?json_string]??>
|
|
||||||
"Currency" : "${TableAmount[dispute.dispute_amount_unit?json_string]}",
|
|
||||||
<#else>
|
|
||||||
"Currency" : "XXX",
|
|
||||||
</#if>
|
|
||||||
</#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" > <#-- Preparation -->
|
|
||||||
<#if dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?? && dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference!="">
|
|
||||||
"EntityID":"${dispute.dispute_preparation.preparation_order_list[0].preparation_order_physical_depot_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_activity_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string}",
|
|
||||||
"DisplayID":"${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
"EntityID":"O${dispute.dispute_preparation.preparation_order_list[0].preparation_order_physical_depot_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_activity_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_year_number?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_number?trim?json_string}",
|
|
||||||
"DisplayID":"O${dispute.dispute_preparation.preparation_order_list[0].preparation_order_physical_depot_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_activity_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_year_number?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_number?trim?json_string}",
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#if dispute.dispute_type_code=="030" || dispute.dispute_type_code=="070" >
|
|
||||||
<#if dispute.dispute_reception.reception_type_code=="030"> <#-- Receipt transfer type -->
|
|
||||||
<#if dispute.dispute_reception.reception_supplier.supplier_transfer_physical_depot?? && dispute.dispute_reception.reception_supplier.supplier_transfer_physical_depot!="" >
|
|
||||||
"EntityID":"${dispute.dispute_reception.reception_supplier.supplier_transfer_physical_depot?json_string}${dispute.dispute_reception.reception_supplier.supplier_activity_code?json_string}${dispute.dispute_reception.reception_contractor_code?json_string}${dispute.dispute_reception.reception_reference?json_string}",
|
|
||||||
"DisplayID":"${dispute.dispute_reception.reception_reference?json_string}",
|
|
||||||
<#else>
|
|
||||||
<#if dispute.dispute_reception.reception_reference?? && dispute.dispute_reception.reception_reference!="">
|
|
||||||
"EntityID":"R${dispute.dispute_reception.reception_physical_depot_code?json_string}${dispute.dispute_reception.reception_activity_code?json_string}${dispute.dispute_reception.reception_contractor_code?json_string}${dispute.dispute_reception.reception_year_number?json_string}${dispute.dispute_reception.reception_number?json_string}",
|
|
||||||
"DisplayID":"${dispute.dispute_reception.reception_reference?json_string}",
|
|
||||||
<#else>
|
|
||||||
"EntityID":"R${dispute.dispute_reception.reception_physical_depot_code?json_string}${dispute.dispute_reception.reception_activity_code?json_string}${dispute.dispute_reception.reception_contractor_code?json_string}${dispute.dispute_reception.reception_year_number?json_string}${dispute.dispute_reception.reception_number?json_string}",
|
|
||||||
"DisplayID":"R${dispute.dispute_reception.reception_physical_depot_code?json_string}${dispute.dispute_reception.reception_activity_code?json_string}${dispute.dispute_reception.reception_contractor_code?json_string}${dispute.dispute_reception.reception_year_number?json_string}${dispute.dispute_reception.reception_number?json_string}",
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#if dispute.dispute_reception.reception_type_code=="010" || dispute.dispute_reception.reception_type_code=="020" >
|
|
||||||
"EntityID":"R${dispute.dispute_reception.reception_physical_depot_code?json_string}${dispute.dispute_reception.reception_activity_code?json_string}${dispute.dispute_reception.reception_contractor_code?json_string}${dispute.dispute_reception.reception_year_number?json_string}${dispute.dispute_reception.reception_number?json_string}",
|
|
||||||
"DisplayID":"${dispute.dispute_reception.reception_reference?json_string}",
|
|
||||||
<#else>
|
|
||||||
<#stop "WMS type code not supported">
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
|
|
||||||
<#if TableReasonCode[dispute.dispute_reason_code]??>
|
|
||||||
"ClaimTypeID":"CLAIMTYPE_${projectRP}_EXECUTIONFLOW_${TableReasonCode[dispute.dispute_reason_code]}"
|
|
||||||
<#else>
|
|
||||||
<#stop "Claim reason code not supported" >
|
|
||||||
</#if>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,124 +0,0 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ReflexUtils.ftl">
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
<#if dispute.dispute_preparation??>
|
|
||||||
<#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0>
|
|
||||||
"RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_activity_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
|
||||||
<#else>
|
|
||||||
<#stop "preparation order list is empty" >
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#if dispute.dispute_reception??>
|
|
||||||
"RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
|
|
||||||
<#if dispute.dispute_preparation??>
|
|
||||||
"Message": "${dispute.dispute_reference?trim?json_string}"
|
|
||||||
<#else>
|
|
||||||
<#if dispute.dispute_reception??>
|
|
||||||
"Message": "${dispute.dispute_reception.reception_reference?trim?json_string}"
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
<#if dispute.dispute_quantity!=0 && dispute.dispute_item??>
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
<#if dispute.dispute_preparation??>
|
|
||||||
<#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0>
|
|
||||||
"RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_activity_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
|
||||||
<#else>
|
|
||||||
<#stop "preparation order list is empty" >
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#if dispute.dispute_reception??>
|
|
||||||
"RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
"Message": "${dispute.dispute_item.item_code?trim?json_string} - ${dispute.dispute_quantity}${dispute.dispute_quantity_unit}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
<#elseif dispute.dispute_item??>
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
<#if dispute.dispute_preparation??>
|
|
||||||
<#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0>
|
|
||||||
"RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_activity_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
|
||||||
<#else>
|
|
||||||
<#stop "preparation order list is empty" >
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#if dispute.dispute_reception??>
|
|
||||||
"RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
"Message": "${dispute.dispute_item.item_code?trim?json_string}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
<#elseif dispute.dispute_quantity!=0>
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
<#if dispute.dispute_preparation??>
|
|
||||||
<#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0>
|
|
||||||
"RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_activity_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
|
||||||
<#else>
|
|
||||||
<#stop "preparation order list is empty" >
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#if dispute.dispute_reception??>
|
|
||||||
"RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
"Message": "${dispute.dispute_quantity}${dispute.dispute_quantity_unit}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
</#if>
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
<#if dispute.dispute_preparation??>
|
|
||||||
<#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0>
|
|
||||||
"RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_activity_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
|
||||||
<#else>
|
|
||||||
<#stop "preparation order list is empty" >
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#if dispute.dispute_reception??>
|
|
||||||
"RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
|
|
||||||
"Message": " ${dispute.dispute_description?trim?json_string}"
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
]
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
|
|
||||||
<#-- Specify table for reason code -->
|
|
||||||
<#-- Table example for reason code to claim type ID -->
|
|
||||||
<#-- <#assign TableReasonCode = { -->
|
|
||||||
<#-- "001":"ID_CLAIMTYPE_1",-->
|
|
||||||
<#-- "M1":"ID_CLAIMTYPE_2",-->
|
|
||||||
|
|
||||||
<#-- }/>-->
|
|
||||||
|
|
||||||
<#assign TableReasonCode = {
|
|
||||||
|
|
||||||
"M1" :"CAS"
|
|
||||||
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
<#assign organisationRP = organisation>
|
<#assign organisationRP = organisation>
|
||||||
|
|
||||||
@@ -9,69 +9,67 @@
|
|||||||
<#case "U">
|
<#case "U">
|
||||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign reflexMvtStockInterface = JsonUtil.jsonToMap(dataRfx)>
|
<#assign reflexMvtStockInterface = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
|
||||||
<#-- exclusion of the cases of an IPG move with quantity = 0 (weight modification) -->
|
<#-- exclusion of the cases of an IPG move with quantity = 0 (weight modification) -->
|
||||||
|
|
||||||
<#if reflexMvtStockInterface.ipg_move_quantity_in_base_lvs != 0>
|
<#if reflexMvtStockInterface.ipg_move_quantity_in_base_lvs != 0>
|
||||||
<#-- IPG moves translated into Stock moves -->
|
|
||||||
<#if reflexMvtStockInterface.ipg_move_type == "130" ||
|
<#-- IPG moves translated into Stock moves -->
|
||||||
reflexMvtStockInterface.ipg_move_type == "200" ||
|
<#if reflexMvtStockInterface.ipg_move_type == "130" ||
|
||||||
reflexMvtStockInterface.ipg_move_type == "210" ||
|
reflexMvtStockInterface.ipg_move_type == "200" ||
|
||||||
reflexMvtStockInterface.ipg_move_type == "220" ||
|
reflexMvtStockInterface.ipg_move_type == "210" ||
|
||||||
reflexMvtStockInterface.ipg_move_type == "230" ||
|
reflexMvtStockInterface.ipg_move_type == "220" ||
|
||||||
reflexMvtStockInterface.ipg_move_type == "240" ||
|
reflexMvtStockInterface.ipg_move_type == "230" ||
|
||||||
reflexMvtStockInterface.ipg_move_type == "260" ||
|
reflexMvtStockInterface.ipg_move_type == "240" ||
|
||||||
reflexMvtStockInterface.ipg_move_type == "290" ||
|
reflexMvtStockInterface.ipg_move_type == "260" ||
|
||||||
reflexMvtStockInterface.ipg_move_type == "300" ||
|
reflexMvtStockInterface.ipg_move_type == "290" ||
|
||||||
reflexMvtStockInterface.ipg_move_type == "350" ||
|
reflexMvtStockInterface.ipg_move_type == "300" ||
|
||||||
reflexMvtStockInterface.ipg_move_type == "370" ||
|
reflexMvtStockInterface.ipg_move_type == "400" ||
|
||||||
reflexMvtStockInterface.ipg_move_type == "400" ||
|
reflexMvtStockInterface.ipg_move_type == "410" ||
|
||||||
reflexMvtStockInterface.ipg_move_type == "410" ||
|
reflexMvtStockInterface.ipg_move_type == "420"
|
||||||
reflexMvtStockInterface.ipg_move_type == "420" ||
|
>
|
||||||
reflexMvtStockInterface.ipg_move_type == "455" ||
|
[
|
||||||
reflexMvtStockInterface.ipg_move_type == "460" ||
|
{
|
||||||
reflexMvtStockInterface.ipg_move_type == "465" ||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.StockMoved>
|
||||||
(reflexMvtStockInterface.ipg_move_type == "520" && reflexMvtStockInterface.ipg_move_creation_program == "HFST69")
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
>
|
"datas" :
|
||||||
[
|
<#include "RFXtoRP_HsaIpgMove_StockMoved.ftl">
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.MovementCreated>
|
}
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
]
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsaIpgMove_StockMoved.ftl">
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#else>
|
<#else>
|
||||||
<#-- IPG moves translated into goods received (all type of receipt) -->
|
<#-- IPG moves translated into goods received (all type of receipt) -->
|
||||||
<#if (reflexMvtStockInterface.ipg_move_type == "100" ||
|
<#if reflexMvtStockInterface.ipg_move_type == "100" ||
|
||||||
reflexMvtStockInterface.ipg_move_type == "110" ||
|
reflexMvtStockInterface.ipg_move_type == "110" ||
|
||||||
reflexMvtStockInterface.ipg_move_type == "120") >
|
reflexMvtStockInterface.ipg_move_type == "120"
|
||||||
[
|
>
|
||||||
{
|
[
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsReceived>
|
{
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.GoodsReceived>
|
||||||
"datas" :
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
<#include "RFXtoRP_HsaIpgMove_GoodsReceived.ftl">
|
"datas" :
|
||||||
}
|
<#include "RFXtoRP_HsaIpgMove_GoodsReceived.ftl">
|
||||||
]
|
|
||||||
<#else>
|
}
|
||||||
<#stop>
|
]
|
||||||
</#if>
|
<#else>
|
||||||
</#if>
|
<#-- Case of IPG move type volontarilly ignored-->
|
||||||
<#else>
|
<#stop "Move type not supported">
|
||||||
<#-- cases of an IPG move with quantity = 0 (weight modification)-->
|
|
||||||
<#stop>
|
|
||||||
</#if>
|
</#if>
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#-- cases of an IPG move with quantity = 0 (weight modification))-->
|
||||||
|
<#stop "move ignored quantity = 0">
|
||||||
|
</#if>
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#case "D">
|
<#case "D">
|
||||||
<#-- *********************************************** Action = DELETE ******************** -->
|
<#-- *********************************************** Action = DELETE ******************** -->
|
||||||
<#stop >
|
<#stop "event not supported - Case D ">
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop>
|
<#stop "event not supported">
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -1,69 +1,40 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
[
|
[
|
||||||
<#assign receipt_confirmation_datetime = RfxDateTimetoUTCWithTimezone(reflexMvtStockInterface.ipg_move_creation_datetime,time_zone_rfx) />
|
<#assign receipt_confirmation_datetime = RfxDateTimetoUTC(reflexMvtStockInterface.ipg_move_creation_datetime,time_zone_offset_rfx) />
|
||||||
<#assign priority_date = reflexMvtStockInterface.ipg_priority_date?datetime(rfx_date_format_default)?iso_utc />
|
<#assign priority_date = reflexMvtStockInterface.ipg_priority_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${reflexMvtStockInterface.hd_number?trim?json_string}"
|
"RefID": "${reflexMvtStockInterface.hd_number}"
|
||||||
},
|
},
|
||||||
"Payload": {
|
"Payload": {
|
||||||
"ReceivedContents" :[
|
"ReceivedContents" :[
|
||||||
{
|
{
|
||||||
"DateTime": {
|
"DateTime": {
|
||||||
"DateTime": "${receipt_confirmation_datetime}",
|
"DateTime": "${receipt_confirmation_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
},
|
},
|
||||||
"Goods": {
|
"Goods": {
|
||||||
"ItemID": "${reflexMvtStockInterface.item_code?trim?json_string}",
|
"ItemID": "${reflexMvtStockInterface.item_code}",
|
||||||
"LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}",
|
"LVBranchID": "${reflexMvtStockInterface.lv_code}",
|
||||||
<#if (priority_date!="") && (priority_date?starts_with("00")== false) >
|
"PriorityDate": "${priority_date}",
|
||||||
"PriorityDate": "${priority_date}",
|
|
||||||
<#else>
|
|
||||||
"PriorityDate": "1970-01-01T00:00:00Z",
|
|
||||||
</#if>
|
|
||||||
<#-- Goods received Segmentation Keys inclusion -->
|
<#-- Goods received Segmentation Keys inclusion -->
|
||||||
<#include "RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl">
|
<#include "RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl">
|
||||||
},
|
},
|
||||||
<#if reflexMvtStockInterface.ipg_move_type?? & reflexMvtStockInterface.ipg_move_type=="120"> <#-- if it is a transfer-type movement -->
|
"ExecutionflowID": "${reflexMvtStockInterface.receipt_reference}",
|
||||||
<#if reflexMvtStockInterface.origin_order_line_reference?? && reflexMvtStockInterface.origin_order_line_reference!="">
|
"LineID": "${reflexMvtStockInterface.receipt_line_number}",
|
||||||
"ExecutionflowID": "${reflexMvtStockInterface.original_receipt_physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.origin_order_line_reference?trim?json_string}",
|
"ActorID": "${reflexMvtStockInterface.physical_depot_code}",
|
||||||
"OrderID": "${reflexMvtStockInterface.origin_order_line_reference?trim?json_string}",
|
"Quantity": {
|
||||||
<#else>
|
|
||||||
<#if reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!="" && !reflexMvtStockInterface.receipt_reference?starts_with(reflexMvtStockInterface.original_receipt_physical_depot_code + reflexMvtStockInterface.activity_code + reflexMvtStockInterface.receipt_year_number)>
|
|
||||||
"ExecutionflowID": "${reflexMvtStockInterface.original_receipt_physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_reference?trim?json_string}",
|
|
||||||
"OrderID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
"ExecutionflowID": "R${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_year_number}${reflexMvtStockInterface.receipt_number}",
|
|
||||||
"OrderID": "R${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_year_number}${reflexMvtStockInterface.receipt_number}",
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#if reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!="">
|
|
||||||
"ExecutionflowID": "R${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_year_number}${reflexMvtStockInterface.receipt_number}",
|
|
||||||
"OrderID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
"ExecutionflowID": "R${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_year_number}${reflexMvtStockInterface.receipt_number}",
|
|
||||||
"OrderID": "R${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_year_number}${reflexMvtStockInterface.receipt_number}",
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
<#if reflexMvtStockInterface.origin_order_line_number_reference?? && reflexMvtStockInterface.origin_order_line_number_reference!=0>
|
|
||||||
"LineID": "${reflexMvtStockInterface.origin_order_line_number_reference}",
|
|
||||||
<#else>
|
|
||||||
"LineID": "${reflexMvtStockInterface.receipt_line_number}",
|
|
||||||
</#if>
|
|
||||||
"ActorID": "${RFXtoRPprefixDepot(reflexMvtStockInterface.physical_depot_code?trim?json_string)}",
|
|
||||||
"Quantity": {
|
|
||||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||||
"Value": ${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs}
|
"Value": ${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,12 +1,7 @@
|
|||||||
<#-- use protobuf of class HsaIpgMove to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsaIpgMove to find Reflex WMS fields names -->
|
||||||
|
|
||||||
<#--
|
<#--
|
||||||
<#-- Best practices:
|
|
||||||
If the SK is of type:
|
|
||||||
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
|
||||||
- boolean: possible values: true and false
|
|
||||||
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
|
||||||
- decimal number: the separator is a point (e.g. 10.5)
|
|
||||||
|
|
||||||
"SegmentationKeys": [
|
"SegmentationKeys": [
|
||||||
{
|
{
|
||||||
@@ -23,21 +18,21 @@
|
|||||||
"Value": { "String" : "no batch"}
|
"Value": { "String" : "no batch"}
|
||||||
<#else>
|
<#else>
|
||||||
"Value": { "String" : "${reflexMvtStockInterface.batch_1}"}
|
"Value": { "String" : "${reflexMvtStockInterface.batch_1}"}
|
||||||
</#if>
|
</#if>
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Key": "HeldForSpecificCode",
|
"Key": "HeldForSpecificCode",
|
||||||
"Value": { "Bool" : "${reflexMvtStockInterface.ipg_specific_code_held}"}
|
"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",
|
"Key": "ManufacturingDate",
|
||||||
"Value": "Timestamp": {
|
"Value": "Timestamp": {
|
||||||
"AuthorTimeZone": "${time_zone_rfx}",
|
"AuthorTimeZone": "${time_zone_rfx}",
|
||||||
"DateTime": "${manufacturing_date}"
|
"DateTime": "${manufacturing_date}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
-->
|
-->
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
|
|
||||||
<#assign MoveType_KV = {"130":"STOCK_MOVEMENT_TYPE_PRODUCTION",
|
<#assign MoveType_KV = {"130":"STOCK_MOVEMENT_TYPE_PRODUCTION",
|
||||||
"200":"STOCK_MOVEMENT_TYPE_FIX",
|
"200":"STOCK_MOVEMENT_TYPE_FIX",
|
||||||
@@ -11,62 +10,48 @@
|
|||||||
"260":"STOCK_MOVEMENT_TYPE_REQUALIFICATION",
|
"260":"STOCK_MOVEMENT_TYPE_REQUALIFICATION",
|
||||||
"290":"STOCK_MOVEMENT_TYPE_REQUALIFICATION",
|
"290":"STOCK_MOVEMENT_TYPE_REQUALIFICATION",
|
||||||
"300":"STOCK_MOVEMENT_TYPE_REQUALIFICATION",
|
"300":"STOCK_MOVEMENT_TYPE_REQUALIFICATION",
|
||||||
"350":"STOCK_MOVEMENT_TYPE_USE_OF_GOODS",
|
|
||||||
"370":"STOCK_MOVEMENT_TYPE_USE_OF_GOODS",
|
|
||||||
"400":"STOCK_MOVEMENT_TYPE_FIX",
|
"400":"STOCK_MOVEMENT_TYPE_FIX",
|
||||||
"410":"STOCK_MOVEMENT_TYPE_FIX",
|
"410":"STOCK_MOVEMENT_TYPE_FIX",
|
||||||
"420":"STOCK_MOVEMENT_TYPE_REQUALIFICATION",
|
"420":"STOCK_MOVEMENT_TYPE_REQUALIFICATION"}>
|
||||||
"455":"STOCK_MOVEMENT_TYPE_FIX",
|
<#assign generation_date = RfxDateTimetoUTC(reflexMvtStockInterface.ipg_move_creation_datetime,time_zone_offset_rfx) />
|
||||||
"460":"STOCK_MOVEMENT_TYPE_FIX",
|
|
||||||
"465":"STOCK_MOVEMENT_TYPE_FIX",
|
|
||||||
"520":"STOCK_MOVEMENT_TYPE_OUTBOUND"
|
|
||||||
}>
|
|
||||||
<#assign generation_date = RfxDateTimetoUTCWithTimezone(reflexMvtStockInterface.ipg_move_creation_datetime,time_zone_rfx) />
|
|
||||||
<#assign ipg_priority_datetime = reflexMvtStockInterface.ipg_priority_date?datetime(rfx_date_format_default)?iso_utc />
|
<#assign ipg_priority_datetime = reflexMvtStockInterface.ipg_priority_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"Payload": {
|
"Payload": {
|
||||||
"Goods": {
|
"Goods": {
|
||||||
"ItemID": "${reflexMvtStockInterface.item_code?trim?json_string}",
|
"ItemID": "${reflexMvtStockInterface.item_code}",
|
||||||
<#if (reflexMvtStockInterface.ipg_priority_date!="") && (reflexMvtStockInterface.ipg_priority_date?starts_with("00")== false) >
|
"PriorityDate": "${ipg_priority_datetime}",
|
||||||
"PriorityDate": "${ipg_priority_datetime}",
|
|
||||||
<#else>
|
|
||||||
"PriorityDate": "1970-01-01T00:00:00Z",
|
|
||||||
</#if>
|
|
||||||
|
|
||||||
<#-- Segmentation keys inclusions -->
|
<#-- Segmentation keys inclusions -->
|
||||||
<#include "RFXtoRP_HsaIpgMove_StockMoved_SegmentationKeys.ftl">,
|
<#include "RFXtoRP_HsaIpgMove_StockMoved_SegmentationKeys.ftl">,
|
||||||
|
|
||||||
|
|
||||||
"LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}"
|
"LVBranchID": "${reflexMvtStockInterface.lv_code}"
|
||||||
},
|
},
|
||||||
"ActorID": "${RFXtoRPprefixDepot(reflexMvtStockInterface.physical_depot_code?trim?json_string)}",
|
"ActorID": "${reflexMvtStockInterface.physical_depot_code}",
|
||||||
"Movement": {
|
"Movement": {
|
||||||
|
|
||||||
"DateTime": {
|
"DateTime": {
|
||||||
"DateTime": "${generation_date}",
|
"DateTime": "${generation_date}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
},
|
},
|
||||||
"Author": "ReflexWMS-${reflexMvtStockInterface.ipg_move_creation_user_code?json_string}",
|
"Author": "ReflexWMS-${reflexMvtStockInterface.ipg_move_creation_user_code}",
|
||||||
"ExternalMoveRef" : "${reflexMvtStockInterface.ipg_move_year_number} - ${reflexMvtStockInterface.ipg_move_number}",
|
"ExternalMoveRef" : "${reflexMvtStockInterface.ipg_move_year_number} - ${reflexMvtStockInterface.ipg_move_number}",
|
||||||
"Type": "${MoveType_KV[reflexMvtStockInterface.ipg_move_type]!reflexMvtStockInterface.ipg_move_type}",
|
"Type": "${MoveType_KV[reflexMvtStockInterface.ipg_move_type]!reflexMvtStockInterface.ipg_move_type}",
|
||||||
<#if reflexMvtStockInterface.ipg_move_type == "520" >
|
"Reason": "${reflexMvtStockInterface.miscellaneous_receipts_despatches_code}",
|
||||||
"Reason": " Direct Transfert ${RFXtoRPprefixDepot(reflexMvtStockInterface.physical_depot_code?trim?json_string)} to ${RFXtoRPprefixDepot(reflexMvtStockInterface.transfer_consignee_physical_depot_code?trim?json_string)}",
|
"ExternalInfo" : "${reflexMvtStockInterface.stock_move_reference}",
|
||||||
<#else>
|
|
||||||
"Reason": "${reflexMvtStockInterface.miscellaneous_receipts_despatches_code?json_string}",
|
|
||||||
</#if>
|
|
||||||
"ExternalInfo" : "${reflexMvtStockInterface.stock_move_reference?json_string}",
|
|
||||||
<#if reflexMvtStockInterface.ipg_move_operation_year_number!= 0>
|
<#if reflexMvtStockInterface.ipg_move_operation_year_number!= 0>
|
||||||
"OperationReference": "${reflexMvtStockInterface.ipg_move_operation_year_number} - ${reflexMvtStockInterface.ipg_move_operation_number}",
|
"OperationReference": "${reflexMvtStockInterface.ipg_move_operation_year_number} - ${reflexMvtStockInterface.ipg_move_operation_number}",
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
"Quantity":
|
"Quantity":
|
||||||
{
|
{
|
||||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||||
<#if reflexMvtStockInterface.move_sign == "+" || reflexMvtStockInterface.ipg_move_quantity_in_base_lvs <= 0 >
|
<#if reflexMvtStockInterface.move_sign == "+">
|
||||||
"Value": ${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs}
|
"Value": ${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs}
|
||||||
<#else>
|
<#else>
|
||||||
"Value": -${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs}
|
"Value": -${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs}
|
||||||
|
|||||||
@@ -1,11 +1,5 @@
|
|||||||
<#-- use protobuf of class HsaIpgMove to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsaIpgMove to find Reflex WMS fields names -->
|
||||||
<#--
|
<#--
|
||||||
<#-- Best practices:
|
|
||||||
If the SK is of type:
|
|
||||||
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
|
||||||
- boolean: possible values: true and false
|
|
||||||
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
|
||||||
- decimal number: the separator is a point (e.g. 10.5)
|
|
||||||
"SegmentationKeys": [
|
"SegmentationKeys": [
|
||||||
{
|
{
|
||||||
"Key": "Grade",
|
"Key": "Grade",
|
||||||
@@ -21,22 +15,22 @@
|
|||||||
"Value": { "String" : "no batch"}
|
"Value": { "String" : "no batch"}
|
||||||
<#else>
|
<#else>
|
||||||
"Value": { "String" : "${reflexMvtStockInterface.batch_1}"}
|
"Value": { "String" : "${reflexMvtStockInterface.batch_1}"}
|
||||||
</#if>
|
</#if>
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Key": "HeldForSpecificCode",
|
"Key": "HeldForSpecificCode",
|
||||||
"Value": { "Bool" : "${reflexMvtStockInterface.ipg_specific_code_held}"}
|
"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",
|
"Key": "ManufacturingDate",
|
||||||
"Value": "Timestamp": {
|
"Value": "Timestamp": {
|
||||||
"AuthorTimeZone": "${time_zone_rfx}",
|
"AuthorTimeZone": "${time_zone_rfx}",
|
||||||
"DateTime": "${manufacturing_date}"
|
"DateTime": "${manufacturing_date}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
-->
|
-->
|
||||||
"SegmentationKeys": [ ]
|
"SegmentationKeys": [ ]
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message HARDIS WMS -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
<#assign organisationRP = organisation>
|
<#assign organisationRP = organisation>
|
||||||
|
|
||||||
@@ -15,33 +15,37 @@
|
|||||||
<#case "U">
|
<#case "U">
|
||||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign item = JsonUtil.jsonToMap(dataRfx)>
|
<#assign item = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ItemCreated>
|
<#if item.logistical_variant_list?? >
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ItemCreated>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaItm_ItemCreated.ftl">
|
<#include "RFXtoRP_HsaItm_ItemCreated.ftl">
|
||||||
|
<#else>
|
||||||
|
<#stop "no LV for the item">
|
||||||
|
</#if>
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#case "D">
|
<#case "D">
|
||||||
<#-- *********************************************** Action = DELETE ******************************** -->
|
<#-- *********************************************** Action = DELETE ******************************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign item = JsonUtil.jsonToMap(dataRfx)>
|
<#assign item = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ItemDeleted>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ItemDeleted>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaItm_ItemDeleted.ftl">
|
<#include "RFXtoRP_HsaItm_ItemDeleted.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop "event not supported">
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<#-- project : projectId in ReflexPlatform -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
<#assign organisationRP = organisation>
|
<#assign organisationRP = organisation>
|
||||||
|
|
||||||
@@ -15,31 +15,31 @@
|
|||||||
<#case "U">
|
<#case "U">
|
||||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign lv = JsonUtil.jsonToMap(dataRfx)>
|
<#assign lv = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ItemLogisticVariantUpdated>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ItemLogisticVariantUpdated>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaItmLv_LogisticVariantUpdated.ftl">
|
<#include "RFXtoRP_HsaItmLv_LogisticVariantUpdated.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#case "D">
|
<#case "D">
|
||||||
<#-- *********************************************** Action = DELETE ******************** -->
|
<#-- *********************************************** Action = DELETE ******************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign lv = JsonUtil.jsonToMap(dataRfx)>
|
<#assign lv = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ItemLogisticVariantRemoved>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ItemLogisticVariantRemoved>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaItmLv_LogisticVariantRemoved.ftl">
|
<#include "RFXtoRP_HsaItmLv_LogisticVariantRemoved.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop "event not supported">
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${lv.item_code?trim?json_string}"
|
"RefID": "${lv.item_code}"
|
||||||
},
|
},
|
||||||
"Payload": {
|
"Payload": {
|
||||||
"RemovedLogisticVariantIDs":["${lv.logistical_variant_code}"]
|
"RemovedLogisticVariantIDs":["${lv.logistical_variant_code}"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,37 +1,37 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${lv.item_code?trim?json_string}"
|
"RefID": "${lv.item_code}"
|
||||||
},
|
},
|
||||||
"Payload": {
|
"Payload": {
|
||||||
"LogisticVariants": [
|
"LogisticVariants": [
|
||||||
{
|
{
|
||||||
"LVID": "${lv.logistical_variant_code?json_string}",
|
"LVID": "${lv.logistical_variant_code}",
|
||||||
"Name" : "${lv.lv_type_code?json_string}",
|
"Name" : "${lv.lv_type_code}",
|
||||||
<#if lv.id_list?? && (lv.id_list?size == lv.id_list?filter(l ->l??)?size)>
|
<#if lv.id_list??>
|
||||||
"Codes": [
|
"Codes": [
|
||||||
<#list lv.id_list as id>
|
<#list lv.id_list as id>
|
||||||
{
|
{
|
||||||
"Key": "${(id.logistical_variant_ID_type_code!"")?json_string}",
|
"Key": "${id.logistical_variant_ID_type_code}",
|
||||||
"Value": "${(id.logistical_variant_ID_code!"")?json_string}"
|
"Value": "${id.logistical_variant_ID_code}"
|
||||||
}<#sep>,</#sep>
|
}<#sep>,</#sep>
|
||||||
</#list>
|
</#list>
|
||||||
],
|
],
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
<#-- LV Metadata inclusion -->
|
<#-- LV Metadata inclusion -->
|
||||||
<#include "RFXtoRP_HsaItmLv_LogisticVariantUpdated_Metadata.ftl">,
|
<#include "RFXtoRP_HsaItmLv_LogisticVariantUpdated_Metadata.ftl">,
|
||||||
|
|
||||||
"IsBaseLogisticVariant": ${lv.base_lv},
|
"IsBaseLogisticVariant": ${lv.base_lv},
|
||||||
|
|
||||||
<#if lv.base_lv != "true">
|
<#if lv.base_lv != "true">
|
||||||
"RefLV": "${lv.subpackaging_lv_code?json_string}",
|
"RefLV": "${lv.subpackaging_lv_code}",
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
"QuantityInRefLV": ${lv.quantity_in_subpackaging_lv},
|
"QuantityInRefLV": ${lv.quantity_in_subpackaging_lv},
|
||||||
|
|
||||||
"NetWeight": {
|
"NetWeight": {
|
||||||
@@ -39,35 +39,35 @@
|
|||||||
"Unit": "${weight_unit_rfx}"
|
"Unit": "${weight_unit_rfx}"
|
||||||
},
|
},
|
||||||
"GrossWeight": {
|
"GrossWeight": {
|
||||||
"Value": ${lv.gross_weight},
|
"Value": ${lv.gross_weight},
|
||||||
"Unit": "${weight_unit_rfx}"
|
"Unit": "${weight_unit_rfx}"
|
||||||
},
|
},
|
||||||
"Volume": {
|
"Volume": {
|
||||||
"Value": ${lv.volume},
|
"Value": ${lv.volume},
|
||||||
"Unit": "${volume_unit_rfx}"
|
"Unit": "${volume_unit_rfx}"
|
||||||
},
|
},
|
||||||
"Height": {
|
"Height": {
|
||||||
"Value": ${lv.height},
|
"Value": ${lv.height},
|
||||||
"Unit": "${length_unit_rfx}"
|
"Unit": "${length_unit_rfx}"
|
||||||
},
|
},
|
||||||
"Width": {
|
"Width": {
|
||||||
"Value": ${lv.width},
|
"Value": ${lv.width},
|
||||||
"Unit": "${length_unit_rfx}"
|
"Unit": "${length_unit_rfx}"
|
||||||
},
|
},
|
||||||
"Length": {
|
"Length": {
|
||||||
"Value": ${lv.depth},
|
"Value": ${lv.depth},
|
||||||
"Unit": "${length_unit_rfx}"
|
"Unit": "${length_unit_rfx}"
|
||||||
},
|
},
|
||||||
|
|
||||||
<#if lv.packaging_lv == "true">
|
<#if lv.packaging_lv == "true">
|
||||||
"BranchIDs": ["${lv.logistical_variant_code}"]
|
"BranchIDs": ["${lv.logistical_variant_code}"]
|
||||||
<#else>
|
<#else>
|
||||||
"BranchIDs": []
|
"BranchIDs": []
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,10 +1,4 @@
|
|||||||
<#-- use protobuf of class HsaItmLv to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsaItmLv to find Reflex Wms fields names -->
|
||||||
|
|
||||||
<#-- Best practices:
|
|
||||||
If the SK is of type:
|
|
||||||
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
|
||||||
- boolean: possible values: true and false
|
|
||||||
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
|
||||||
- decimal number: the separator is a point (e.g. 10.5)-->
|
|
||||||
|
|
||||||
"MetaData": [ ]
|
"MetaData": [ ]
|
||||||
@@ -1,113 +1,102 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "HfExpGrpList.ftl">
|
<#include "HfExpGrpList.ftl">
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${item.item_code?trim?json_string}"
|
"RefID": "${item.item_code}"
|
||||||
},
|
},
|
||||||
"Payload": {
|
"Payload": {
|
||||||
"DescriptionsByLanguage": [{
|
"DescriptionsByLanguage": [{
|
||||||
"ShortDescription": "${item.short_designation?json_string}",
|
"ShortDescription": "${item.short_designation?json_string}",
|
||||||
"LongDescription": "${item.designation?json_string}",
|
"LongDescription": "${item.designation?json_string}",
|
||||||
"TechnicalDetails": "${item.item_description?json_string}",
|
"TechnicalDetails": "${item.item_description?json_string}",
|
||||||
"LanguageCodeISO6391": "${text_language_rfx}"
|
"LanguageCodeISO6391": "${text_language_rfx}"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"ExpiryConstraint": {
|
"ExpiryConstraint": {
|
||||||
"Type": "${ExpiryGroupList[item.expiry_group_code]!"UNKNOWN_DATE"}"
|
"Type": "${ExpiryGroupList[item.expiry_group_code]!"UNKNOWN_DATE"}"
|
||||||
},
|
},
|
||||||
|
|
||||||
<#-- Item metadata inclusion -->
|
<#-- Item metadata inclusion -->
|
||||||
<#include "RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl">
|
<#include "RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl">,
|
||||||
|
|
||||||
<#-- Item Photo URI could be added here -->
|
<#-- Item Photo URI could be added here -->
|
||||||
<#if item.saved_picture_path?? && item.saved_picture_path!="" && item.saved_picture_path?starts_with("http") == true>
|
<#--"PhotoURI": " ", -->
|
||||||
,
|
|
||||||
"PhotoURI": "${item.saved_picture_path?json_string}"
|
|
||||||
<#else>
|
|
||||||
<#if item.url?? && item.url!="" && item.url?starts_with("http") == true>
|
|
||||||
,
|
|
||||||
"PhotoURI": "${item.url?json_string}"
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
|
|
||||||
<#-- Loop for the Logistical Variants - LV -->
|
<#-- Loop for the Logistical Variants - LV -->
|
||||||
<#if item.logistical_variant_list?? && (item.logistical_variant_list?size == item.logistical_variant_list?filter(l ->l??)?size)>
|
<#if item.logistical_variant_list??>
|
||||||
,
|
|
||||||
"LogisticVariants": [
|
"LogisticVariants": [
|
||||||
|
|
||||||
<#list item.logistical_variant_list as logistical_variant>
|
<#list item.logistical_variant_list as logistical_variant>
|
||||||
{
|
{
|
||||||
"LVID": "${logistical_variant.logistical_variant_code?json_string}",
|
"LVID": "${logistical_variant.logistical_variant_code}",
|
||||||
"Name" : "${logistical_variant.lv_type_code?json_string}",
|
"Name" : "${logistical_variant.lv_type_code}",
|
||||||
|
|
||||||
<#if logistical_variant.id_list?? && (logistical_variant.id_list?size == logistical_variant.id_list?filter(l ->l??)?size)>
|
<#if logistical_variant.id_list??>
|
||||||
"Codes": [
|
"Codes": [
|
||||||
<#list logistical_variant.id_list as id>
|
<#list logistical_variant.id_list as id>
|
||||||
{
|
{
|
||||||
"Key": "${(id.logistical_variant_ID_type_code!"")?json_string}",
|
"Key": "${id.logistical_variant_ID_type_code}",
|
||||||
"Value": "${(id.logistical_variant_ID_code!"")?json_string}"
|
"Value": "${id.logistical_variant_ID_code}"
|
||||||
}<#sep>,</#sep>
|
}<#sep>,</#sep>
|
||||||
</#list>
|
</#list>
|
||||||
],
|
],
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
<#-- LV Metadata inclusion -->
|
<#-- LV Metadata inclusion -->
|
||||||
<#include "RFXtoRP_HsaItm_ItemCreated_LogisticVariantMetadata.ftl">,
|
<#include "RFXtoRP_HsaItm_ItemCreated_LogisticVariantMetadata.ftl">,
|
||||||
|
|
||||||
<#if logistical_variant.base_lv?? && logistical_variant.base_lv!="">
|
"IsBaseLogisticVariant": ${logistical_variant.base_lv},
|
||||||
"IsBaseLogisticVariant": ${logistical_variant.base_lv},
|
|
||||||
</#if>
|
|
||||||
|
|
||||||
<#if logistical_variant.base_lv != "true">
|
<#if logistical_variant.base_lv != "true">
|
||||||
"RefLV": "${logistical_variant.subpackaging_lv_code?json_string}",
|
"RefLV": "${logistical_variant.subpackaging_lv_code}",
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
"QuantityInRefLV": ${logistical_variant.quantity_in_subpackaging_lv},
|
"QuantityInRefLV": ${logistical_variant.quantity_in_subpackaging_lv},
|
||||||
|
|
||||||
"NetWeight": {
|
"NetWeight": {
|
||||||
"Value": ${logistical_variant.net_weight},
|
"Value": ${logistical_variant.net_weight},
|
||||||
"Unit": "${weight_unit_rfx}"
|
"Unit": "${weight_unit_rfx}"
|
||||||
},
|
},
|
||||||
"GrossWeight": {
|
"GrossWeight": {
|
||||||
"Value": ${logistical_variant.gross_weight},
|
"Value": ${logistical_variant.gross_weight},
|
||||||
"Unit": "${weight_unit_rfx}"
|
"Unit": "${weight_unit_rfx}"
|
||||||
},
|
},
|
||||||
"Volume": {
|
"Volume": {
|
||||||
"Value": ${logistical_variant.volume},
|
"Value": ${logistical_variant.volume},
|
||||||
"Unit": "${volume_unit_rfx}"
|
"Unit": "${volume_unit_rfx}"
|
||||||
},
|
},
|
||||||
"Height": {
|
"Height": {
|
||||||
"Value": ${logistical_variant.height},
|
"Value": ${logistical_variant.height},
|
||||||
"Unit": "${length_unit_rfx}"
|
"Unit": "${length_unit_rfx}"
|
||||||
},
|
},
|
||||||
"Width": {
|
"Width": {
|
||||||
"Value": ${logistical_variant.width},
|
"Value": ${logistical_variant.width},
|
||||||
"Unit": "${length_unit_rfx}"
|
"Unit": "${length_unit_rfx}"
|
||||||
},
|
},
|
||||||
"Length": {
|
"Length": {
|
||||||
"Value": ${logistical_variant.depth},
|
"Value": ${logistical_variant.depth},
|
||||||
"Unit": "${length_unit_rfx}"
|
"Unit": "${length_unit_rfx}"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
<#if logistical_variant.packaging_lv == "true">
|
<#if logistical_variant.packaging_lv == "true">
|
||||||
"BranchIDs": ["${logistical_variant.logistical_variant_code}"]
|
"BranchIDs": ["${logistical_variant.logistical_variant_code}"]
|
||||||
<#else>
|
<#else>
|
||||||
"BranchIDs": []
|
"BranchIDs": []
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
}
|
}
|
||||||
<#sep>,</#sep>
|
<#sep>,</#sep>
|
||||||
|
|
||||||
</#list>
|
</#list>
|
||||||
]
|
]
|
||||||
</#if>
|
</#if>
|
||||||
<#-- End of LV loop -->
|
<#-- End of LV loop -->
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,10 +1,4 @@
|
|||||||
<#-- use protobuf of class HsaItm to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsaItm to find Reflex Wms fields names -->
|
||||||
|
|
||||||
<#-- Best practices:
|
|
||||||
If the SK is of type:
|
|
||||||
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
|
||||||
- boolean: possible values: true and false
|
|
||||||
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
|
||||||
- decimal number: the separator is a point (e.g. 10.5)-->
|
|
||||||
|
|
||||||
"MetaData": [ ]
|
"MetaData": [ ]
|
||||||
@@ -1,10 +1,4 @@
|
|||||||
<#-- use protobuf of class HsaItm to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsaItm to find Reflex Wms fields names -->
|
||||||
|
|
||||||
<#-- Best practices:
|
|
||||||
If the SK is of type:
|
|
||||||
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
|
||||||
- boolean: possible values: true and false
|
|
||||||
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
|
||||||
- decimal number: the separator is a point (e.g. 10.5)-->
|
|
||||||
|
|
||||||
"MetaData": [ ]
|
"MetaData": [ ]
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${item.item_code?trim?json_string}"
|
"RefID": "${item.item_code}"
|
||||||
},
|
},
|
||||||
"Payload": {}
|
"Payload": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,89 +0,0 @@
|
|||||||
<#-- **** input parameters ***** -->
|
|
||||||
<#-- input : message RFX -->
|
|
||||||
<#-- 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>
|
|
||||||
|
|
||||||
<#switch cloudEventMsg.action>
|
|
||||||
<#case "C">
|
|
||||||
<#case "U">
|
|
||||||
<#-- *********************************************** Action = Update ******************** -->
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
||||||
<#assign carrier_apt_status = JsonUtil.jsonToMap(dataRfx)>
|
|
||||||
<#if !carrier_apt_status.status?? || carrier_apt_status.appointment_year_number==0>
|
|
||||||
<#stop >
|
|
||||||
</#if>
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#switch carrier_apt_status.status.carrier_status_code>
|
|
||||||
<#case "010"> <#--Carrier Expected -->
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierExpected>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsaLstCarSta_CarrierExpected.ftl">
|
|
||||||
<#break>
|
|
||||||
<#case "020"> <#--Carrier Arrived-->
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierArrived>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsaLstCarSta_CarrierArrived.ftl">
|
|
||||||
<#break>
|
|
||||||
<#case "040"> <#--Unloading Started -->
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentUnloadingStarted>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsaLstCarSta_UnloadingStarted.ftl">
|
|
||||||
<#break>
|
|
||||||
<#case "050"> <#--Unloading Completed-->
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentUnloadingCompleted>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsaLstCarSta_UnloadingCompleted.ftl">
|
|
||||||
<#break>
|
|
||||||
<#case "060"> <#--Loading Started-->
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentLoadingStarted>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsaLstCarSta_LoadingStarted.ftl">
|
|
||||||
<#break>
|
|
||||||
<#case "070"> <#--Loading Completed-->
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentLoadingCompleted>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsaLstCarSta_LoadingCompleted.ftl">
|
|
||||||
<#break>
|
|
||||||
<#case "090"> <#--Carrier Departed-->
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierDeparted>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsaLstCarSta_CarrierDeparted.ftl">
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
<#default>
|
|
||||||
<#stop 'this updated appointment Status not implemented'>
|
|
||||||
</#switch>
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
<#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>
|
|
||||||
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
[
|
|
||||||
<#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,30 +0,0 @@
|
|||||||
[
|
|
||||||
<#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,30 +0,0 @@
|
|||||||
[
|
|
||||||
<#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,30 +0,0 @@
|
|||||||
[
|
|
||||||
<#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,30 +0,0 @@
|
|||||||
[
|
|
||||||
<#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,30 +0,0 @@
|
|||||||
[
|
|
||||||
<#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,30 +0,0 @@
|
|||||||
[
|
|
||||||
<#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,9 +1,9 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message HARDIS WMS -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
<#assign organisationRP = organisation>
|
<#assign organisationRP = organisation>
|
||||||
|
|
||||||
@@ -14,68 +14,68 @@
|
|||||||
<#case "U">
|
<#case "U">
|
||||||
<#-- Action = CREATE or UPDATE -->
|
<#-- Action = CREATE or UPDATE -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign preparationStatusInterface = JsonUtil.jsonToMap(dataRfx) />
|
<#assign preparationStatusInterface = JsonUtil.jsonToMap(dataRfx) />
|
||||||
[
|
[
|
||||||
<#if preparationStatusInterface.preparation_type_code=="010" || preparationStatusInterface.preparation_type_code=="030">
|
<#--**Pick batch runned (100) **-->
|
||||||
<#--**Pick batch runned (200) **-->
|
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "200" >
|
||||||
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "200" >
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationExpected>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsaProStatus_PreparationExpected.ftl">
|
||||||
|
}
|
||||||
|
<#else>
|
||||||
|
<#-- ** Collection started (300) and Preparation in progress (400)** -->
|
||||||
|
<#if preparationStatusInterface.preparation_status_type == "100" && (preparationStatusInterface.preparation_status_code == "300" || preparationStatusInterface.preparation_status_code == "400") >
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationExpected>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationStarted>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaProStatus_PreparationExpected.ftl">
|
<#include "RFXtoRP_HsaProStatus_PreparationStarted.ftl">
|
||||||
}
|
}
|
||||||
<#else>
|
<#else>
|
||||||
<#-- ** Collection started (300) and Preparation in progress (400)** -->
|
<#-- **Preparation to package (500) and preparation completed (550)** -->
|
||||||
<#if preparationStatusInterface.preparation_status_type == "100" && (preparationStatusInterface.preparation_status_code == "300" || preparationStatusInterface.preparation_status_code == "400") >
|
<#if preparationStatusInterface.preparation_status_type == "100" && (preparationStatusInterface.preparation_status_code == "500" || preparationStatusInterface.preparation_status_code == "550")>
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationStarted>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationCompleted>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaProStatus_PreparationStarted.ftl">
|
<#include "RFXtoRP_HsaProStatus_PreparationCompleted.ftl">
|
||||||
}
|
}
|
||||||
<#else>
|
<#else>
|
||||||
<#-- ****Preparation dispatched (600)** -->
|
<#-- ****Preparation dispatched (600)** -->
|
||||||
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "600" >
|
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "600" >
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationCompleted>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowTransportStarted>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaProStatus_PreparationCompleted.ftl">
|
<#include "RFXtoRP_HsaProStatus_TransportStarted.ftl">
|
||||||
},
|
}
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowTransportStarted>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsaProStatus_TransportStarted.ftl">
|
|
||||||
}
|
|
||||||
<#else>
|
<#else>
|
||||||
<#-- ****Preparation cancelled (650)**** -->
|
<#-- ****Preparation cancelled (650)**** -->
|
||||||
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "650" >
|
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "650" >
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaProStatus_ExecutionflowCancelled.ftl">
|
<#include "RFXtoRP_HsaProStatus_ExecutionflowCancelled.ftl">
|
||||||
}
|
}
|
||||||
<#else>
|
<#else>
|
||||||
<#stop>
|
<#stop "Reflex WMS status not supported on Reflex Platform">
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
<#else>
|
|
||||||
<#stop >
|
|
||||||
</#if>
|
</#if>
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#case "D">
|
<#case "D">
|
||||||
<#-- *********************************************** Action = DELETE ******************** -->
|
<#-- *********************************************** Action = DELETE ******************** -->
|
||||||
<#stop >
|
<#stop "event not supported (case D)">
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop "event not supported">
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -1,18 +1,14 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
<#assign preparation_status_datetime = RfxDateTimetoUTCWithTimezone(preparationStatusInterface.preparation_status_datetime,time_zone_rfx) />
|
<#assign preparation_status_datetime = RfxDateTimetoUTC(preparationStatusInterface.preparation_status_datetime,time_zone_offset_rfx) />
|
||||||
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
<#if preparationStatusInterface.preparation_order_originator_reference?? && preparationStatusInterface.preparation_order_originator_reference!="">
|
"RefID": "${preparationStatusInterface.preparation_order_originator_reference}",
|
||||||
"RefID": "${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
"RefID": "O${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_year}${preparationStatusInterface.preparation_order_number}",
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${preparation_status_datetime}",
|
"DateTime": "${preparation_status_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
|||||||
@@ -1,24 +1,20 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
<#assign preparation_status_datetime = RfxDateTimetoUTCWithTimezone(preparationStatusInterface.preparation_status_datetime,time_zone_rfx) />
|
<#assign preparation_status_datetime = RfxDateTimetoUTC(preparationStatusInterface.preparation_status_datetime,time_zone_offset_rfx) />
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
<#if preparationStatusInterface.preparation_order_originator_reference?? && preparationStatusInterface.preparation_order_originator_reference!="">
|
"RefID": "${preparationStatusInterface.preparation_order_originator_reference}",
|
||||||
"RefID": "${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
"RefID": "O${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_year}${preparationStatusInterface.preparation_order_number}",
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${preparation_status_datetime}",
|
"DateTime": "${preparation_status_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"Payload": {}
|
"Payload": {}
|
||||||
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,24 +1,20 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
<#assign preparation_status_datetime = RfxDateTimetoUTCWithTimezone(preparationStatusInterface.preparation_status_datetime,time_zone_rfx) />
|
<#assign preparation_status_datetime = RfxDateTimetoUTC(preparationStatusInterface.preparation_status_datetime,time_zone_offset_rfx) />
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
<#if preparationStatusInterface.preparation_order_originator_reference?? && preparationStatusInterface.preparation_order_originator_reference!="">
|
"RefID": "${preparationStatusInterface.preparation_order_originator_reference}",
|
||||||
"RefID": "${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
"RefID": "O${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_year}${preparationStatusInterface.preparation_order_number}",
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${preparation_status_datetime}",
|
"DateTime": "${preparation_status_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"Payload": {}
|
"Payload": {}
|
||||||
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,24 +1,20 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
<#assign preparation_status_datetime = RfxDateTimetoUTCWithTimezone(preparationStatusInterface.preparation_status_datetime,time_zone_rfx) />
|
<#assign preparation_status_datetime = RfxDateTimetoUTC(preparationStatusInterface.preparation_status_datetime,time_zone_offset_rfx) />
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
<#if preparationStatusInterface.preparation_order_originator_reference?? && preparationStatusInterface.preparation_order_originator_reference!="">
|
"RefID": "${preparationStatusInterface.preparation_order_originator_reference}",
|
||||||
"RefID": "${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
"RefID": "O${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_year}${preparationStatusInterface.preparation_order_number}",
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${preparation_status_datetime}",
|
"DateTime": "${preparation_status_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"Payload": {}
|
"Payload": {}
|
||||||
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,24 +1,20 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
<#assign preparation_status_datetime = RfxDateTimetoUTCWithTimezone(preparationStatusInterface.preparation_status_datetime,time_zone_rfx) />
|
<#assign preparation_status_datetime = RfxDateTimetoUTC(preparationStatusInterface.preparation_status_datetime,time_zone_offset_rfx) />
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
<#if preparationStatusInterface.preparation_order_originator_reference?? && preparationStatusInterface.preparation_order_originator_reference!="">
|
"RefID": "${preparationStatusInterface.preparation_order_originator_reference}",
|
||||||
"RefID": "${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
"RefID": "O${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_year}${preparationStatusInterface.preparation_order_number}",
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${preparation_status_datetime}",
|
"DateTime": "${preparation_status_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"Payload": {}
|
"Payload": {}
|
||||||
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -2,11 +2,8 @@
|
|||||||
<#-- input : message RFX -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in ReflexPlatform -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
<#assign organisationRP = organisation>
|
<#assign organisationRP = organisation>
|
||||||
|
|
||||||
@@ -17,33 +14,33 @@
|
|||||||
<#case "U">
|
<#case "U">
|
||||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
|
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreatedv2>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaSup_ActorCreated.ftl">
|
<#include "RFXtoRP_HsaSup_ActorCreated.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#case "D">
|
<#case "D">
|
||||||
<#-- *********************************************** Action = DELETE ******************** -->
|
<#-- *********************************************** Action = DELETE ******************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
|
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorDeleted>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorDeleted>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaSup_ActorDeleted.ftl">
|
<#include "RFXtoRP_HsaSup_ActorDeleted.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop "event not supported">
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -1,51 +1,50 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${RFXtoRPprefixSupplier(actor.code?trim?json_string)}"
|
"RefID": "${actor.code}"
|
||||||
},
|
},
|
||||||
|
|
||||||
"Payload": {
|
"Payload": {
|
||||||
"Name": "${actor.designation?json_string}",
|
"Name": "${actor.designation?json_string}",
|
||||||
"IsCarrier": false,
|
"ManagedStock": false,
|
||||||
|
"IsCarrier": false,
|
||||||
|
<#-- ***Partner ID could be added here *** -->
|
||||||
|
<#-- "PartnerID": "${}", -->
|
||||||
|
|
||||||
|
<#--
|
||||||
<#include "RFXtoRP_HsaSup_ActorCreated_Metadata.ftl">,
|
<#include "RFXtoRP_HsaSup_ActorCreated_Metadata.ftl">,
|
||||||
|
-->
|
||||||
|
|
||||||
"Address":
|
"Address":
|
||||||
{
|
{
|
||||||
<#-- if HARDIS WMS address is structured -->
|
<#-- if Reflex WMS address is structured -->
|
||||||
<#if actor.supplier_structured_address?? >
|
<#if actor.supplier_structured_address?? >
|
||||||
|
|
||||||
"Name": "${actor.supplier_structured_address.name_or_company?json_string}",
|
"Name": "${actor.supplier_structured_address.name_or_company?json_string}",
|
||||||
"StreetAddressOne" : "${actor.supplier_structured_address.street_and_PO?json_string}",
|
"StreetAddressOne" : "${actor.supplier_structured_address.street_and_PO?json_string}",
|
||||||
"StreetAddressTwo" : "${actor.supplier_structured_address.additionnal_data?json_string}",
|
"StreetAddressTwo" : "${actor.supplier_structured_address.additionnal_data?json_string}",
|
||||||
"PostalCode" : "${actor.supplier_structured_address.postal_code?json_string}",
|
"PostalCode" : "${actor.supplier_structured_address.postal_code?json_string}",
|
||||||
"City" : "${actor.supplier_structured_address.post_code_area_name?json_string}",
|
"City" : "${actor.supplier_structured_address.post_code_area_name?json_string}",
|
||||||
<#assign isCountryCode = JsonUtil.isCountryCode(actor.supplier_structured_address.country_code?upper_case) />
|
"CountryCode" : "${actor.supplier_structured_address.country_code?json_string}",
|
||||||
<#if isCountryCode>
|
|
||||||
"CountryCode" : "${actor.supplier_structured_address.country_code?upper_case?json_string}",
|
|
||||||
<#else>
|
|
||||||
"CountryCode" : "",
|
|
||||||
</#if>
|
|
||||||
"ProvinceCode": "${actor.supplier_structured_address.territorial_div_code?json_string}",
|
"ProvinceCode": "${actor.supplier_structured_address.territorial_div_code?json_string}",
|
||||||
"State": "${actor.supplier_structured_address.country_designation?json_string}"
|
"State": "${actor.supplier_structured_address.country_designation?json_string}"
|
||||||
<#-- if HARDIS WMS address is not structured -->
|
|
||||||
|
<#-- if Reflex WMS address is not structured -->
|
||||||
<#else>
|
<#else>
|
||||||
<#if actor.optional_attributes?? >
|
"Name": "${actor.optional_attributes.company_name?json_string}",
|
||||||
"Name": "${actor.optional_attributes.company_name?json_string}",
|
"StreetAddressOne" : "${actor.optional_attributes.address_1?json_string}",
|
||||||
"StreetAddressOne" : "${actor.optional_attributes.address_1?json_string}",
|
"StreetAddressTwo" : "${actor.optional_attributes.address_2?json_string}",
|
||||||
"StreetAddressTwo" : "${actor.optional_attributes.address_2?json_string}",
|
"StreetAddressThree" : "${actor.optional_attributes.address_3?json_string}"
|
||||||
"StreetAddressThree" : "${actor.optional_attributes.address_3?json_string}",
|
|
||||||
"CountryCode" : ""
|
|
||||||
</#if>
|
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
},
|
},
|
||||||
<#if actor.optional_attributes?? >
|
"Phones": ["${actor.optional_attributes.telephone?json_string}",
|
||||||
"Phones": ["${actor.optional_attributes.telephone?json_string}",
|
"${actor.optional_attributes.other_number?json_string}"
|
||||||
"${actor.optional_attributes.other_number?json_string}"
|
],
|
||||||
],
|
|
||||||
</#if>
|
|
||||||
"Typology": "TYPOLOGY_UNKNOWN"
|
"Typology": "TYPOLOGY_UNKNOWN"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,10 +1,4 @@
|
|||||||
<#-- use protobuf of class HsaSup to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsaSup to find Reflex WMS fields names -->
|
||||||
|
|
||||||
<#-- Best practices:
|
|
||||||
If the SK is of type:
|
|
||||||
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
|
||||||
- boolean: possible values: true and false
|
|
||||||
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
|
||||||
- decimal number: the separator is a point (e.g. 10.5)-->
|
|
||||||
|
|
||||||
"MetaData": [ ]
|
"MetaData": [ ]
|
||||||
@@ -1,11 +1,12 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${RFXtoRPprefixSupplier(actor.code?trim?json_string)}"
|
"RefID": "${actor.code}"
|
||||||
},
|
},
|
||||||
|
|
||||||
"Payload": {}
|
"Payload": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,50 +0,0 @@
|
|||||||
<#-- **** input parameters ***** -->
|
|
||||||
<#-- input : message HARDIS WMS -->
|
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
|
||||||
<#assign projectRP = project>
|
|
||||||
<#assign organisationRP = organisation>
|
|
||||||
|
|
||||||
<#assign aDateTime = .now>
|
|
||||||
|
|
||||||
<#switch cloudEventMsg.action>
|
|
||||||
<#case "C">
|
|
||||||
<#-- *********************************************** Action = CREATE ******************** -->
|
|
||||||
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
||||||
<#assign ancReceipt = JsonUtil.jsonToMap(dataRfx)>
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#stop >
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#break>
|
|
||||||
<#case "U">
|
|
||||||
<#-- *********************************************** Action = UPDATE ******************** -->
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
||||||
<#assign ancReceipt = JsonUtil.jsonToMap(dataRfx)>
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#stop >
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
<#case "D">
|
|
||||||
<#-- *********************************************** Action = DELETE ******************** -->
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
||||||
<#assign ancReceipt = JsonUtil.jsonToMap(dataRfx)>
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#stop >
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
|
|
||||||
<#default>
|
|
||||||
<#stop >
|
|
||||||
</#switch>
|
|
||||||
|
|
||||||
@@ -1,156 +0,0 @@
|
|||||||
<#-- **** input parameters ***** -->
|
|
||||||
<#-- 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 partnerApplicationRP = partnerApplication>
|
|
||||||
|
|
||||||
<#assign aDateTime = .now>
|
|
||||||
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
||||||
<#assign carrier_apt = JsonUtil.jsonToMap(dataRfx)>
|
|
||||||
|
|
||||||
<#switch cloudEventMsg.action>
|
|
||||||
<#case "C">
|
|
||||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.BookingForceBookAppointment>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl">
|
|
||||||
},
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierExpected>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrCarrierApt_CarrierExpected.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.BookingForceCancelAppointment>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrCarrierApt_BookingForceCancelAppointment.ftl">
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.status?? && carrier_apt.status.status_code=="100"> <#--Carrier Arrived-->
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierArrived>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrCarrierApt_CarrierArrived.ftl">
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.status?? && carrier_apt.status.status_code=="210"> <#--Unloading Started -->
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentUnloadingStarted>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrCarrierApt_UnloadingStarted.ftl">
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.status?? && carrier_apt.status.status_code=="290"><#--Unloading Completed-->
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentUnloadingCompleted>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrCarrierApt_UnloadingCompleted.ftl">
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.status?? && carrier_apt.status.status_code=="310"><#--Loading Started-->
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentLoadingStarted>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrCarrierApt_LoadingStarted.ftl">
|
|
||||||
},
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierExpected>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrCarrierApt_CarrierExpected.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.BookingWMSUpdateAppointment>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl">
|
|
||||||
}
|
|
||||||
]
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
]
|
|
||||||
<#break>
|
|
||||||
<#case "D">
|
|
||||||
<#-- *********************************************** Action = Delete ******************** -->
|
|
||||||
[
|
|
||||||
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.BookingForceCancelAppointment>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrCarrierApt_BookingForceCancelAppointment.ftl">
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#break>
|
|
||||||
<#default>
|
|
||||||
<#stop >
|
|
||||||
</#switch>
|
|
||||||
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
<#-- 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">
|
|
||||||
},
|
|
||||||
-->
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
<#--
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
|
||||||
"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": "${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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
-->
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
[
|
|
||||||
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) />
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
|
||||||
"RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
|
||||||
<#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)}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
<#-- A décommenter si besoin de les utiliser-->
|
|
||||||
<#-- Uncomment if you need to use them-->
|
|
||||||
<#--{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentMetaDataUpdated>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrCarrierApt_AppointmentMetadataUpdatedToConfigure.ftl">
|
|
||||||
},
|
|
||||||
-->
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
<#--
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
|
||||||
"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": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
|
||||||
<#--To configure-->
|
|
||||||
<#-- "MetaData": [
|
|
||||||
{
|
|
||||||
"Key": "string",
|
|
||||||
"Value": {
|
|
||||||
"Bool": "true / false",
|
|
||||||
"Float": 3.1415,
|
|
||||||
"Int": 42,
|
|
||||||
"String": "Hello World !",
|
|
||||||
"Timestamp": {
|
|
||||||
"AuthorTimeZone": "Europe/Paris",
|
|
||||||
"DateTime": "2023-01-01T00:00:00Z"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
-->
|
|
||||||
@@ -1,192 +0,0 @@
|
|||||||
[
|
|
||||||
<#assign creation_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) />
|
|
||||||
{
|
|
||||||
"Header":{
|
|
||||||
"ProjectID": "${projectRP}:${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
|
||||||
},
|
|
||||||
"ID":{
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${creation_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
},
|
|
||||||
<#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>
|
|
||||||
"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": {
|
|
||||||
"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" >
|
|
||||||
<#else>
|
|
||||||
<#if (duration == 0)>
|
|
||||||
<#assign duration = 1 />
|
|
||||||
</#if>
|
|
||||||
</#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_load_start_datetime or planned_load_end_datetime field of appointmend are not valid" >
|
|
||||||
<#else>
|
|
||||||
<#if (duration == 0)>
|
|
||||||
<#assign duration = 1 />
|
|
||||||
</#if>
|
|
||||||
</#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" >
|
|
||||||
<#else>
|
|
||||||
<#if (duration == 0)>
|
|
||||||
<#assign duration = 1 />
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#stop "Appointment type not supported" >
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
"AppointmentType": "${appointmentType}",
|
|
||||||
"Emails": ["${carrier_apt.creation_user_email?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)>
|
|
||||||
"Unloading" :
|
|
||||||
{
|
|
||||||
"Projects" : [{
|
|
||||||
"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}",
|
|
||||||
<#else>
|
|
||||||
"OrderID": "R${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>
|
|
||||||
"ExecutionflowID": "R${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}",
|
|
||||||
"ProjectID": "${projectRP}",
|
|
||||||
"PartnerAppID": "${partnerApplicationRP}",
|
|
||||||
"OrganisationID": "${organisationRP}"
|
|
||||||
}<#sep>,</#sep>
|
|
||||||
</#list>
|
|
||||||
],
|
|
||||||
"ProjectID" : "${projectRP}"
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
<#else>
|
|
||||||
<#if appointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
|
||||||
"Unloading" :
|
|
||||||
<#else>
|
|
||||||
"Loading" :
|
|
||||||
</#if>
|
|
||||||
{
|
|
||||||
"Projects" : [{
|
|
||||||
"Commissions": [{
|
|
||||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
|
||||||
"ProjectID": "${projectRP}",
|
|
||||||
"PartnerAppID": "${partnerApplicationRP}",
|
|
||||||
"OrganisationID": "${organisationRP}"
|
|
||||||
}],
|
|
||||||
"ProjectID" : "${projectRP}"
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
<#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>
|
|
||||||
"Slot": {
|
|
||||||
<#-- 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,58 +0,0 @@
|
|||||||
<#assign update_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) />
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"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": "${update_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}"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
},
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}:${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,196 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
<#assign update_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) />
|
|
||||||
|
|
||||||
"Header":{
|
|
||||||
"ProjectID": "${projectRP}:${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
|
||||||
},
|
|
||||||
"ID":{
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${update_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
},
|
|
||||||
<#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>
|
|
||||||
"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": {
|
|
||||||
<#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>
|
|
||||||
<#stop "Appointment type not supported" >
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
"TimeZone":"${time_zone_rfx}",
|
|
||||||
<#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"))>
|
|
||||||
"Unloading" :
|
|
||||||
{
|
|
||||||
"Projects" : [
|
|
||||||
{
|
|
||||||
"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}",
|
|
||||||
<#else>
|
|
||||||
"OrderID": "R${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>
|
|
||||||
"ExecutionflowID": "R${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}",
|
|
||||||
"ProjectID": "${projectRP}",
|
|
||||||
"PartnerAppID": "${partnerApplicationRP}",
|
|
||||||
"OrganisationID": "${organisationRP}"
|
|
||||||
}<#sep>,</#sep>
|
|
||||||
</#list>
|
|
||||||
],
|
|
||||||
"ProjectID" : "${projectRP}"
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
"Reason": "",
|
|
||||||
<#else>
|
|
||||||
<#if appointmentType == AppointmentType.APPOINTMENT_TYPE_LOADING>
|
|
||||||
"Loading" :
|
|
||||||
{
|
|
||||||
"Projects" : [
|
|
||||||
{
|
|
||||||
"Commissions": [
|
|
||||||
{
|
|
||||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
|
||||||
"ProjectID": "${projectRP}",
|
|
||||||
"PartnerAppID": "${partnerApplicationRP}",
|
|
||||||
"OrganisationID": "${organisationRP}"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"ProjectID" : "${projectRP}"
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
<#else>
|
|
||||||
<#if appointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
|
||||||
"Unloading" :
|
|
||||||
{
|
|
||||||
"Projects" : [
|
|
||||||
{
|
|
||||||
"Commissions": [
|
|
||||||
{
|
|
||||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
|
||||||
"ProjectID": "${projectRP}",
|
|
||||||
"PartnerAppID": "${partnerApplicationRP}",
|
|
||||||
"OrganisationID": "${organisationRP}"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"ProjectID" : "${projectRP}"
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
<#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>
|
|
||||||
"Slot": {
|
|
||||||
<#-- 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,30 +0,0 @@
|
|||||||
[
|
|
||||||
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) />
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
|
||||||
"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)}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
[
|
|
||||||
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) />
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
|
||||||
"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)}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
[
|
|
||||||
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) />
|
|
||||||
<#assign ref_datetime2 = AddSecondsToDatetime(ref_datetime?datetime.iso, 60)?iso_utc />
|
|
||||||
{
|
|
||||||
"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_datetime2}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload":{
|
|
||||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
"CarrierInformation": [
|
|
||||||
|
|
||||||
]
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
[
|
|
||||||
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) />
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
|
||||||
"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)}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
[
|
|
||||||
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) />
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
|
||||||
"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)}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
|
|
||||||
"MetaData": [
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
"SegmentationSelections": [
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) />
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
|
||||||
"AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
|
||||||
<#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)}"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
[
|
|
||||||
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) />
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
|
||||||
"RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo -->
|
|
||||||
<#else>
|
|
||||||
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo -->
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
|
||||||
"RefID": "${carrier_apt.appointment_reference?json_string}",
|
|
||||||
<#else>
|
|
||||||
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${ref_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload":{
|
|
||||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
[
|
|
||||||
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) />
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
|
||||||
"RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo -->
|
|
||||||
<#else>
|
|
||||||
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo -->
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
|
||||||
"RefID": "${carrier_apt.appointment_reference?json_string}",
|
|
||||||
<#else>
|
|
||||||
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${ref_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload":{
|
|
||||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,149 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
<#assign creation_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) />
|
|
||||||
|
|
||||||
"Header":{
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
|
||||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
|
||||||
"AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
|
||||||
<#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 />
|
|
||||||
</#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}",
|
|
||||||
<#else>
|
|
||||||
"OrderID": "R${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>
|
|
||||||
"ExecutionflowID": "R${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}",
|
|
||||||
"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,9 +1,9 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message HARDIS WMS -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
<#assign organisationRP = organisation>
|
<#assign organisationRP = organisation>
|
||||||
|
|
||||||
@@ -14,33 +14,33 @@
|
|||||||
<#case "U">
|
<#case "U">
|
||||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreatedv2>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrDepot_ActorCreated.ftl">
|
<#include "RFXtoRP_HsrDepot_ActorCreated.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#case "D">
|
<#case "D">
|
||||||
<#-- *********************************************** Action = DELETE *************************** -->
|
<#-- *********************************************** Action = DELETE *************************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorDeleted>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorDeleted>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrDepot_ActorDeleted.ftl">
|
<#include "RFXtoRP_HsrDepot_ActorDeleted.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop "event not supported">
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -1,52 +1,50 @@
|
|||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${RFXtoRPprefixDepot(depot.physical_depot_code?trim?json_string)}"
|
"RefID": "${depot.physical_depot_code}"
|
||||||
},
|
},
|
||||||
|
|
||||||
"Payload": {
|
"Payload": {
|
||||||
"Name": "${depot.physical_depot_designation?json_string}",
|
"Name": "${depot.physical_depot_designation?json_string}",
|
||||||
|
"ManagedStock": true,
|
||||||
"IsCarrier": false,
|
"IsCarrier": false,
|
||||||
|
<#-- ***Partner ID could be added here *** -->
|
||||||
|
<#-- "PartnerID": "${}", -->
|
||||||
|
|
||||||
|
<#--
|
||||||
<#include "RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl">,
|
<#include "RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl">,
|
||||||
|
-->
|
||||||
|
|
||||||
"Address":
|
"Address":
|
||||||
{
|
{
|
||||||
<#-- if HARDIS WMS address is structured -->
|
<#-- if Reflex WMS address is structured -->
|
||||||
<#if depot.physical_depot_structured_address?? >
|
<#if depot.physical_depot_structured_address?? >
|
||||||
|
|
||||||
"Name": "${depot.physical_depot_structured_address.name_or_company?json_string}",
|
"Name": "${depot.physical_depot_structured_address.name_or_company?json_string}",
|
||||||
"StreetAddressOne" : "${depot.physical_depot_structured_address.street_and_PO?json_string}",
|
"StreetAddressOne" : "${depot.physical_depot_structured_address.street_and_PO?json_string}",
|
||||||
"StreetAddressTwo" : "${depot.physical_depot_structured_address.additionnal_data?json_string}",
|
"StreetAddressTwo" : "${depot.physical_depot_structured_address.additionnal_data?json_string}",
|
||||||
"PostalCode" : "${depot.physical_depot_structured_address.postal_code?json_string}",
|
"PostalCode" : "${depot.physical_depot_structured_address.postal_code?json_string}",
|
||||||
"City" : "${depot.physical_depot_structured_address.post_code_area_name?json_string}",
|
"City" : "${depot.physical_depot_structured_address.post_code_area_name?json_string}",
|
||||||
<#assign isCountryCode = JsonUtil.isCountryCode(depot.physical_depot_structured_address.country_code?upper_case) />
|
"CountryCode" : "${depot.physical_depot_structured_address.country_code?json_string}",
|
||||||
<#if isCountryCode >
|
|
||||||
"CountryCode" : "${depot.physical_depot_structured_address.country_code?upper_case?json_string}",
|
|
||||||
<#else>
|
|
||||||
"CountryCode" : "",
|
|
||||||
</#if>
|
|
||||||
"ProvinceCode": "${depot.physical_depot_structured_address.territorial_div_code?json_string}",
|
"ProvinceCode": "${depot.physical_depot_structured_address.territorial_div_code?json_string}",
|
||||||
"State": "${depot.physical_depot_structured_address.country_designation?json_string}"
|
"State": "${depot.physical_depot_structured_address.country_designation?json_string}"
|
||||||
<#-- if HARDIS WMS address is not structured -->
|
|
||||||
|
<#-- if Reflex WMS address is not structured -->
|
||||||
<#else>
|
<#else>
|
||||||
<#if depot.physical_depot_address??>
|
|
||||||
"Name": "${depot.physical_depot_address.company_name?json_string}",
|
"Name": "${depot.physical_depot_address.company_name?json_string}",
|
||||||
"StreetAddressOne" : "${depot.physical_depot_address.address_1?json_string}",
|
"StreetAddressOne" : "${depot.physical_depot_address.address_1?json_string}",
|
||||||
"StreetAddressTwo" : "${depot.physical_depot_address.address_2?json_string}",
|
"StreetAddressTwo" : "${depot.physical_depot_address.address_2?json_string}",
|
||||||
"StreetAddressThree" : "${depot.physical_depot_address.address_3?json_string}",
|
"StreetAddressThree" : "${depot.physical_depot_address.address_3?json_string}"
|
||||||
"CountryCode" : ""
|
|
||||||
</#if>
|
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
},
|
},
|
||||||
<#if depot.physical_depot_address??>
|
"Phones": ["${depot.physical_depot_address.telephone?json_string}",
|
||||||
"Phones": ["${depot.physical_depot_address.telephone?json_string}",
|
"${depot.physical_depot_address.other_number?json_string}"
|
||||||
"${depot.physical_depot_address.other_number?json_string}"
|
],
|
||||||
],
|
"Typology": "TYPOLOGY_UNKNOWN"
|
||||||
</#if>
|
|
||||||
"Typology": "TYPOLOGY_WAREHOUSE"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,10 +1,4 @@
|
|||||||
<#-- use protobuf of class HsrDepot to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsrDepot to find Reflex WMS fields names -->
|
||||||
|
|
||||||
<#-- Best practices:
|
|
||||||
If the SK is of type:
|
|
||||||
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
|
||||||
- boolean: possible values: true and false
|
|
||||||
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
|
||||||
- decimal number: the separator is a point (e.g. 10.5)-->
|
|
||||||
|
|
||||||
"MetaData": [ ]
|
"MetaData": [ ]
|
||||||
@@ -1,14 +1,12 @@
|
|||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${RFXtoRPprefixDepot(depot.physical_depot_code?trim?json_string)}"
|
"RefID": "${depot.physical_depot_code}"
|
||||||
},
|
},
|
||||||
|
|
||||||
"Payload": {}
|
"Payload": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,40 +0,0 @@
|
|||||||
<#-- **** input parameters ***** -->
|
|
||||||
<#-- input : message HARDIS WMS -->
|
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
|
||||||
<#assign projectRP = project>
|
|
||||||
<#assign organisationRP = organisation>
|
|
||||||
|
|
||||||
<#assign aDateTime = .now>
|
|
||||||
|
|
||||||
<#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 *************************** -->
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
||||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
|
||||||
[
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
<#default>
|
|
||||||
<#stop >
|
|
||||||
</#switch>
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
<#-- **** input parameters ***** -->
|
|
||||||
<#-- input : message HARDIS WMS -->
|
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
|
||||||
<#assign projectRP = project>
|
|
||||||
<#assign organisationRP = organisation>
|
|
||||||
|
|
||||||
<#assign aDateTime = .now>
|
|
||||||
|
|
||||||
<#switch cloudEventMsg.action>
|
|
||||||
<#case "C">
|
|
||||||
<#case "U">
|
|
||||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
||||||
<#assign packBranch = JsonUtil.jsonToMap(dataRfx)>
|
|
||||||
|
|
||||||
<#stop "no generic FTL file available yet for Pack Branch">
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
<#case "D">
|
|
||||||
<#-- *********************************************** Action = DELETE ******************** -->
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
||||||
<#assign packBranch = JsonUtil.jsonToMap(dataRfx)>
|
|
||||||
|
|
||||||
<#stop "no generic FTL file available yet for Pack Branch">
|
|
||||||
<#break>
|
|
||||||
<#default>
|
|
||||||
<#stop >
|
|
||||||
</#switch>
|
|
||||||
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
<#-- **** input parameters ***** -->
|
|
||||||
<#-- input : message HARDIS WMS -->
|
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
|
||||||
<#assign projectRP = project>
|
|
||||||
<#assign organisationRP = organisation>
|
|
||||||
|
|
||||||
<#assign aDateTime = .now>
|
|
||||||
|
|
||||||
<#switch cloudEventMsg.action>
|
|
||||||
<#case "C">
|
|
||||||
<#case "U">
|
|
||||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
||||||
<#assign packOrder = JsonUtil.jsonToMap(dataRfx)>
|
|
||||||
|
|
||||||
<#stop "no generic FTL file available yet for Pack Order">
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
<#case "D">
|
|
||||||
<#-- *********************************************** Action = DELETE ******************** -->
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
||||||
<#assign packOrder = JsonUtil.jsonToMap(dataRfx)>
|
|
||||||
|
|
||||||
<#stop "no generic FTL file available yet for Pack Order">
|
|
||||||
<#break>
|
|
||||||
<#default>
|
|
||||||
<#stop >
|
|
||||||
</#switch>
|
|
||||||
|
|
||||||
@@ -1,114 +1,58 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message HARDIS WMS -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
<#assign organisationRP = organisation>
|
<#assign organisationRP = organisation>
|
||||||
<#include "RFX_PartnerAPP_Settings.ftl">
|
|
||||||
|
|
||||||
<#assign aDateTime = .now>
|
<#assign aDateTime = .now>
|
||||||
|
|
||||||
<#switch cloudEventMsg.action>
|
<#switch cloudEventMsg.action>
|
||||||
<#case "C">
|
<#case "C">
|
||||||
<#--<#case "U">
|
<#--<#case "U">
|
||||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign preparationOrder = JsonUtil.jsonToMap(dataRfx)>
|
<#assign preparationOrder = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
[
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.GoodsPrepared>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrPrepa_GoodsPrepared.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl">
|
||||||
|
}
|
||||||
|
|
||||||
|
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list??) as preparation_line>
|
||||||
|
<#list preparation_line.despatched_ipg_list as despatched_ipg>
|
||||||
|
<#if despatched_ipg.consignment_unit_id != "">
|
||||||
|
,
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl">
|
||||||
|
}
|
||||||
|
</#if>
|
||||||
|
|
||||||
<#if preparationOrder.total_lv_validated?? && preparationOrder.total_lv_validated !=0>
|
</#list>
|
||||||
<#if preparationOrder.preparation_type_code=="010" || preparationOrder.preparation_type_code=="030">
|
</#list>
|
||||||
<#if preparationOrder.preparation_line_lst??>
|
]
|
||||||
[
|
<#break>
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsPrepared>
|
<#case "D">
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
<#-- *********************************************** Action = DELETE ******************** -->
|
||||||
"datas" :
|
<#stop "event not supported (Case D)">
|
||||||
<#include "RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl">
|
<#break>
|
||||||
},
|
|
||||||
<#include "RFXtoRP_HsrPrepa_ExecutionflowMetadataUpdated.ftl">
|
|
||||||
{
|
<#default>
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
|
<#stop "event not supported">
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
</#switch>
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl">
|
|
||||||
}
|
|
||||||
<#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="">
|
|
||||||
,
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCarrierUpdated>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrPrepa_CarrierUpdated.ftl">
|
|
||||||
}
|
|
||||||
</#if>
|
|
||||||
|
|
||||||
<#assign refIDHmap ={}>
|
|
||||||
<#assign hd_numberHmap ={}>
|
|
||||||
<#assign hd_numberHmapHUadded ={}>
|
|
||||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? ) as preparation_line>
|
|
||||||
<#list preparation_line.despatched_ipg_list as despatched_ipg>
|
|
||||||
<#assign HUadded_packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) />
|
|
||||||
<#if (!hd_numberHmap[despatched_ipg.hd_number]?? || !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>
|
|
||||||
<#-- Preparation Type not supported-->
|
|
||||||
<#stop>
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#-- no confirmed quantity for the preparation - preparation closed-->
|
|
||||||
<#stop>
|
|
||||||
</#if>
|
|
||||||
|
|
||||||
|
|
||||||
<#break>
|
|
||||||
<#case "D">
|
|
||||||
<#-- *********************************************** Action = DELETE ******************** -->
|
|
||||||
<#stop>
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
<#default>
|
|
||||||
<#stop>
|
|
||||||
</#switch>
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
[
|
|
||||||
<#assign refIDHmap_local ={}>
|
|
||||||
<#list preparationOrder.preparation_line_lst as preparation_line>
|
|
||||||
<#if preparation_line.preparation_order_originator_reference?? && preparation_line.preparation_order_originator_reference!="">
|
|
||||||
<#assign OrderOriginReference = "${preparation_line.pro_physical_depot_code?trim?json_string}${preparationOrder.activity_code?trim?json_string}${preparation_line.pro_originator_code?trim?json_string}${preparation_line.preparation_order_originator_reference?trim?json_string}">
|
|
||||||
<#else>
|
|
||||||
<#assign OrderOriginReference = "O${preparation_line.pro_physical_depot_code?trim?json_string}${preparationOrder.activity_code?trim?json_string}${preparation_line.pro_originator_code?trim?json_string}${preparation_line.pro_year}${preparation_line.pro_number}">
|
|
||||||
</#if>
|
|
||||||
<#if !refIDHmap_local[OrderOriginReference]?? >
|
|
||||||
<#if refIDHmap_local?size != 0 >
|
|
||||||
,
|
|
||||||
</#if>
|
|
||||||
<#assign refIDHmap_local +={OrderOriginReference,OrderOriginReference}>
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID":{
|
|
||||||
"RefID": "${OrderOriginReference}"
|
|
||||||
},
|
|
||||||
"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> -->
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</#if>
|
|
||||||
</#list>
|
|
||||||
<#assign refIDHmap_local ={}>
|
|
||||||
]
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
<#--
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID":{
|
|
||||||
"RefID": "${Your_Object_ID}"
|
|
||||||
},
|
|
||||||
"Payload":{
|
|
||||||
"MetaData": [
|
|
||||||
{
|
|
||||||
"Key": "string",
|
|
||||||
"Value": {
|
|
||||||
"Bool": "true / false",
|
|
||||||
"Float": 3.1415,
|
|
||||||
"Int": 42,
|
|
||||||
"String": "Hello World !",
|
|
||||||
"Timestamp": {
|
|
||||||
"AuthorTimeZone": "Europe/Paris",
|
|
||||||
"DateTime": "2023-01-01T00:00:00Z"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-->
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
<#-- A décommenter si besoin de les utiliser-->
|
|
||||||
<#-- Uncomment if you need to use them-->
|
|
||||||
<#--
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowMetaDataUpdated>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrPrepa_ExecutionflowMetaDataUpdatedToConfigure.ftl">
|
|
||||||
},
|
|
||||||
-->
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user