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>
|
|
||||||
17
README.md
17
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**.
|
|
||||||
|
|
||||||
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.
|
These FTL core files aim to translate data flow from Reflex WMS into Reflex platform API.
|
||||||
|
|
||||||
## Role of the FTL Files
|
|
||||||
|
|
||||||
- Each `.ftl` file corresponds to a **flow type** (order, stock, receipt, shipment, etc.).
|
|
||||||
- These templates use the **FreeMarker** syntax to:
|
|
||||||
- Extract the required fields from the WMS source flow.
|
|
||||||
- Apply transformation rules (mapping, conversions, enrichments).
|
|
||||||
- Generate a **final structured JSON** for HARDIS SC NETWORK.
|
|
||||||
|
|
||||||
## Useful Resources
|
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/
|
||||||
|
|
||||||
|
|
||||||
- [FreeMarker Documentation](https://freemarker.apache.org/docs/index.html)
|
|
||||||
- [HARDIS SC NETWORK](https://auth.reflex-platform.com/)
|
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
<#assign trackingNumberSource = 3>
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message HARDIS WMS -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
<#-- sum_elt : nb element in snapshot (optional parameter) -->
|
<#-- sum_elt : nb element in snapshot (optional parameter) -->
|
||||||
|
|
||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
<#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>
|
||||||
@@ -50,11 +50,11 @@
|
|||||||
|
|
||||||
<#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,6 +1,4 @@
|
|||||||
<#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>
|
||||||
{
|
{
|
||||||
@@ -8,10 +6,10 @@
|
|||||||
"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}",
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
<#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>
|
||||||
{
|
{
|
||||||
@@ -8,8 +6,8 @@
|
|||||||
"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}",
|
||||||
@@ -24,14 +22,10 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"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">
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<#-- use protobuf of class HfDtlStockLs to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HfDtlStockLs to find Reflex WMS fields names -->
|
||||||
|
|
||||||
<#--
|
<#--
|
||||||
|
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
<#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}",
|
||||||
|
|||||||
@@ -24,5 +24,5 @@ ${output}
|
|||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop>
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|||||||
@@ -14,6 +14,6 @@
|
|||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop "event not supported">
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,6 @@
|
|||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop "event not supported">
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<#-- ****
|
<#-- ****
|
||||||
HARDIS WMS provides some of their environment parameters through the class HfRpConfig
|
Reflex WMS provides some of their environment parameters through the class HfRpConfig
|
||||||
those parameters are stored in FTL file HfRpConfig.ftl for later use in some of the data ftl files
|
those parameters are stored in FTL file HfRpConfig.ftl for later use in some of the data ftl files
|
||||||
*** -->
|
*** -->
|
||||||
|
|
||||||
@@ -28,6 +28,6 @@ those parameters are stored in FTL file HfRpConfig.ftl for later use in some of
|
|||||||
|
|
||||||
|
|
||||||
<#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,10 +1,7 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message HARDIS WMS -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
@@ -20,7 +17,7 @@
|
|||||||
<#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">
|
||||||
@@ -44,6 +41,6 @@
|
|||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop "event not supported">
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -4,17 +4,24 @@
|
|||||||
"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}",
|
||||||
@@ -22,30 +29,22 @@
|
|||||||
"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}"
|
||||||
"CountryCode" : ""
|
|
||||||
</#if>
|
|
||||||
</#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,4 +1,4 @@
|
|||||||
<#-- use protobuf of class HsaCarrier to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsaCarrier to find Reflex WMS fields names -->
|
||||||
|
|
||||||
|
|
||||||
"MetaData": [ ]
|
"MetaData": [ ]
|
||||||
@@ -4,8 +4,9 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${RFXtoRPprefixCarrier(carrier.carrier_code?trim?json_string)}"
|
"RefID": "${carrier.carrier_code}"
|
||||||
},
|
},
|
||||||
|
|
||||||
"Payload": {}
|
"Payload": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message HARDIS WMS -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
@@ -20,13 +17,12 @@
|
|||||||
<#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">
|
||||||
@@ -45,6 +41,6 @@
|
|||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop "event not supported">
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -4,17 +4,24 @@
|
|||||||
"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}",
|
||||||
@@ -22,32 +29,24 @@
|
|||||||
"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,4 +1,4 @@
|
|||||||
<#-- use protobuf of class HsaCons to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsaCons to find Reflex WMS fields names -->
|
||||||
|
|
||||||
|
|
||||||
"MetaData": [ ]
|
"MetaData": [ ]
|
||||||
@@ -4,8 +4,9 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${RFXtoRPprefixConsignee(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">
|
|
||||||
<#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,4 +0,0 @@
|
|||||||
<#-- use protobuf of class HsaDispute to find Reflex Wms fields names -->
|
|
||||||
|
|
||||||
|
|
||||||
"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,7 +0,0 @@
|
|||||||
<#-- Specify table for reason code -->
|
|
||||||
<#assign TableReasonCode = {}/>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -12,8 +12,8 @@
|
|||||||
<#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 -->
|
<#-- IPG moves translated into Stock moves -->
|
||||||
<#if reflexMvtStockInterface.ipg_move_type == "130" ||
|
<#if reflexMvtStockInterface.ipg_move_type == "130" ||
|
||||||
reflexMvtStockInterface.ipg_move_type == "200" ||
|
reflexMvtStockInterface.ipg_move_type == "200" ||
|
||||||
@@ -24,54 +24,52 @@
|
|||||||
reflexMvtStockInterface.ipg_move_type == "260" ||
|
reflexMvtStockInterface.ipg_move_type == "260" ||
|
||||||
reflexMvtStockInterface.ipg_move_type == "290" ||
|
reflexMvtStockInterface.ipg_move_type == "290" ||
|
||||||
reflexMvtStockInterface.ipg_move_type == "300" ||
|
reflexMvtStockInterface.ipg_move_type == "300" ||
|
||||||
reflexMvtStockInterface.ipg_move_type == "350" ||
|
|
||||||
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" ||
|
|
||||||
(reflexMvtStockInterface.ipg_move_type == "520" && reflexMvtStockInterface.ipg_move_creation_program == "HFST69")
|
|
||||||
>
|
>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.MovementCreated>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.StockMoved>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaIpgMove_StockMoved.ftl">
|
<#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>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.GoodsReceived>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaIpgMove_GoodsReceived.ftl">
|
<#include "RFXtoRP_HsaIpgMove_GoodsReceived.ftl">
|
||||||
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#else>
|
<#else>
|
||||||
<#stop>
|
<#-- Case of IPG move type volontarilly ignored-->
|
||||||
|
<#stop "Move type not supported">
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
<#else>
|
<#else>
|
||||||
<#-- cases of an IPG move with quantity = 0 (weight modification)-->
|
<#-- cases of an IPG move with quantity = 0 (weight modification))-->
|
||||||
<#stop>
|
<#stop "move ignored quantity = 0">
|
||||||
</#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,15 +1,14 @@
|
|||||||
<#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" :[
|
||||||
@@ -19,44 +18,16 @@
|
|||||||
"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!="">
|
|
||||||
"ExecutionflowID": "${reflexMvtStockInterface.original_receipt_physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.origin_order_line_reference?trim?json_string}",
|
|
||||||
"OrderID": "${reflexMvtStockInterface.origin_order_line_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
<#if reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!="">
|
|
||||||
"ExecutionflowID": "${reflexMvtStockInterface.original_receipt_physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_reference?trim?json_string}",
|
|
||||||
"OrderID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
"ExecutionflowID": "R${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_year_number}${reflexMvtStockInterface.receipt_number}",
|
|
||||||
"OrderID": "R${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_year_number}${reflexMvtStockInterface.receipt_number}",
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#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}",
|
"LineID": "${reflexMvtStockInterface.receipt_line_number}",
|
||||||
</#if>
|
"ActorID": "${reflexMvtStockInterface.physical_depot_code}",
|
||||||
"ActorID": "${RFXtoRPprefixDepot(reflexMvtStockInterface.physical_depot_code?trim?json_string)}",
|
|
||||||
"Quantity": {
|
"Quantity": {
|
||||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||||
"Value": ${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs}
|
"Value": ${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs}
|
||||||
|
|||||||
@@ -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,18 +10,12 @@
|
|||||||
"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": {
|
||||||
@@ -30,35 +23,27 @@
|
|||||||
},
|
},
|
||||||
"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>
|
||||||
@@ -66,7 +51,7 @@
|
|||||||
"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,4 +1,4 @@
|
|||||||
<#-- use protobuf of class HsaIpgMove to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsaIpgMove to find Reflex WMS fields names -->
|
||||||
<#--
|
<#--
|
||||||
"SegmentationKeys": [
|
"SegmentationKeys": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message HARDIS WMS -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
@@ -18,10 +18,14 @@
|
|||||||
<#assign item = JsonUtil.jsonToMap(dataRfx)>
|
<#assign item = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
|
<#if item.logistical_variant_list?? >
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ItemCreated>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ItemCreated>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaItm_ItemCreated.ftl">
|
<#include "RFXtoRP_HsaItm_ItemCreated.ftl">
|
||||||
|
<#else>
|
||||||
|
<#stop "no LV for the item">
|
||||||
|
</#if>
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
@@ -42,6 +46,6 @@
|
|||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop "event not supported">
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,6 @@
|
|||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop "event not supported">
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
"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}"]
|
||||||
|
|||||||
@@ -5,19 +5,19 @@
|
|||||||
"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>
|
||||||
],
|
],
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
"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},
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<#-- use protobuf of class HsaItmLv to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsaItmLv to find Reflex Wms fields names -->
|
||||||
|
|
||||||
|
|
||||||
"MetaData": [ ]
|
"MetaData": [ ]
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${item.item_code?trim?json_string}"
|
"RefID": "${item.item_code}"
|
||||||
},
|
},
|
||||||
"Payload": {
|
"Payload": {
|
||||||
"DescriptionsByLanguage": [{
|
"DescriptionsByLanguage": [{
|
||||||
@@ -21,30 +21,26 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
<#-- Item metadata inclusion -->
|
<#-- Item metadata inclusion -->
|
||||||
<#include "RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl">
|
<#include "RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl">,
|
||||||
|
|
||||||
<#-- Item Photo URI could be added here -->
|
<#-- Item Photo URI could be added here -->
|
||||||
<#if item.url?? && item.url!="">
|
<#--"PhotoURI": " ", -->
|
||||||
,
|
|
||||||
"PhotoURI": "${item.url?json_string}"
|
|
||||||
</#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>
|
||||||
],
|
],
|
||||||
@@ -53,12 +49,10 @@
|
|||||||
<#-- 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},
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<#-- use protobuf of class HsaItm to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsaItm to find Reflex Wms fields names -->
|
||||||
|
|
||||||
|
|
||||||
"MetaData": [ ]
|
"MetaData": [ ]
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${item.item_code?trim?json_string}"
|
"RefID": "${item.item_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,7 +1,7 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message HARDIS WMS -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign preparationStatusInterface = JsonUtil.jsonToMap(dataRfx) />
|
<#assign preparationStatusInterface = JsonUtil.jsonToMap(dataRfx) />
|
||||||
[
|
[
|
||||||
<#--**Pick batch runned (200) **-->
|
<#--**Pick batch runned (100) **-->
|
||||||
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "200" >
|
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "200" >
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationExpected>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationExpected>
|
||||||
@@ -34,14 +34,17 @@
|
|||||||
<#include "RFXtoRP_HsaProStatus_PreparationStarted.ftl">
|
<#include "RFXtoRP_HsaProStatus_PreparationStarted.ftl">
|
||||||
}
|
}
|
||||||
<#else>
|
<#else>
|
||||||
<#-- ****Preparation dispatched (600)** -->
|
<#-- **Preparation to package (500) and preparation completed (550)** -->
|
||||||
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "600" >
|
<#if preparationStatusInterface.preparation_status_type == "100" && (preparationStatusInterface.preparation_status_code == "500" || preparationStatusInterface.preparation_status_code == "550")>
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationCompleted>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationCompleted>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaProStatus_PreparationCompleted.ftl">
|
<#include "RFXtoRP_HsaProStatus_PreparationCompleted.ftl">
|
||||||
},
|
}
|
||||||
|
<#else>
|
||||||
|
<#-- ****Preparation dispatched (600)** -->
|
||||||
|
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "600" >
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowTransportStarted>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowTransportStarted>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
@@ -58,7 +61,8 @@
|
|||||||
<#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>
|
||||||
@@ -68,10 +72,10 @@
|
|||||||
|
|
||||||
<#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,6 +1,6 @@
|
|||||||
<#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) />
|
||||||
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@@ -8,11 +8,7 @@
|
|||||||
"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,17 +1,13 @@
|
|||||||
<#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,17 +1,13 @@
|
|||||||
<#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,17 +1,13 @@
|
|||||||
<#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,17 +1,13 @@
|
|||||||
<#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}"
|
||||||
|
|||||||
@@ -2,9 +2,6 @@
|
|||||||
<#-- 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>
|
||||||
@@ -20,7 +17,7 @@
|
|||||||
<#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">
|
||||||
@@ -44,6 +41,6 @@
|
|||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop "event not supported">
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -4,47 +4,46 @@
|
|||||||
"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}",
|
||||||
|
"ManagedStock": false,
|
||||||
"IsCarrier": false,
|
"IsCarrier": false,
|
||||||
|
<#-- ***Partner ID could be added here *** -->
|
||||||
|
<#-- "PartnerID": "${}", -->
|
||||||
|
|
||||||
|
<#--
|
||||||
<#include "RFXtoRP_HsaSup_ActorCreated_Metadata.ftl">,
|
<#include "RFXtoRP_HsaSup_ActorCreated_Metadata.ftl">,
|
||||||
|
-->
|
||||||
|
|
||||||
"Address":
|
"Address":
|
||||||
{
|
{
|
||||||
<#-- if HARDIS WMS address is structured -->
|
<#-- if Reflex WMS address is structured -->
|
||||||
<#if actor.supplier_structured_address?? >
|
<#if actor.supplier_structured_address?? >
|
||||||
|
|
||||||
"Name": "${actor.supplier_structured_address.name_or_company?json_string}",
|
"Name": "${actor.supplier_structured_address.name_or_company?json_string}",
|
||||||
"StreetAddressOne" : "${actor.supplier_structured_address.street_and_PO?json_string}",
|
"StreetAddressOne" : "${actor.supplier_structured_address.street_and_PO?json_string}",
|
||||||
"StreetAddressTwo" : "${actor.supplier_structured_address.additionnal_data?json_string}",
|
"StreetAddressTwo" : "${actor.supplier_structured_address.additionnal_data?json_string}",
|
||||||
"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,4 +1,4 @@
|
|||||||
<#-- use protobuf of class HsaSup to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsaSup to find Reflex WMS fields names -->
|
||||||
|
|
||||||
|
|
||||||
"MetaData": [ ]
|
"MetaData": [ ]
|
||||||
@@ -4,8 +4,9 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${RFXtoRPprefixSupplier(actor.code?trim?json_string)}"
|
"RefID": "${actor.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,7 +1,7 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message HARDIS WMS -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreatedv2>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrDepot_ActorCreated.ftl">
|
<#include "RFXtoRP_HsrDepot_ActorCreated.ftl">
|
||||||
@@ -41,6 +41,6 @@
|
|||||||
|
|
||||||
|
|
||||||
<#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}"
|
||||||
],
|
],
|
||||||
</#if>
|
"Typology": "TYPOLOGY_UNKNOWN"
|
||||||
"Typology": "TYPOLOGY_WAREHOUSE"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<#-- use protobuf of class HsrDepot to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsrDepot to find Reflex WMS fields names -->
|
||||||
|
|
||||||
|
|
||||||
"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,57 +1,37 @@
|
|||||||
<#-- **** 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)>
|
||||||
|
|
||||||
<#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>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.GoodsPrepared>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl">
|
<#include "RFXtoRP_HsrPrepa_GoodsPrepared.ftl">
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl">
|
<#include "RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl">
|
||||||
}
|
}
|
||||||
|
|
||||||
<#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="">
|
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list??) as preparation_line>
|
||||||
,
|
|
||||||
{
|
|
||||||
<#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>
|
<#list preparation_line.despatched_ipg_list as despatched_ipg>
|
||||||
<#assign HUadded_packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) />
|
<#if despatched_ipg.consignment_unit_id != "">
|
||||||
<#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>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled>
|
||||||
@@ -60,56 +40,19 @@
|
|||||||
<#include "RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl">
|
<#include "RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl">
|
||||||
}
|
}
|
||||||
</#if>
|
</#if>
|
||||||
<#if despatched_ipg.carton_number != "000000000000000000" && despatched_ipg.carton_number!=despatched_ipg.hd_number >
|
|
||||||
,
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitHUsAdded>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrPrepa_HandlingunitHUsAdded.ftl">
|
|
||||||
},
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl">
|
|
||||||
}
|
|
||||||
<#if !hd_numberHmapHUadded[despatched_ipg.hd_number]?? && (trackingNumberSource==2 || trackingNumberSource==3 )>
|
|
||||||
<#assign hd_numberHmapHUadded += {despatched_ipg.hd_number,despatched_ipg.hd_number}>
|
|
||||||
,
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrPrepa_HUsAdded_TrackingHuLabelled.ftl">
|
|
||||||
}
|
|
||||||
</#if>
|
|
||||||
|
|
||||||
</#if>
|
|
||||||
</#list>
|
</#list>
|
||||||
</#list>
|
</#list>
|
||||||
<#assign refIDHmap ={}>
|
|
||||||
]
|
]
|
||||||
<#else>
|
<#break>
|
||||||
<#-- No line-->
|
|
||||||
<#stop>
|
<#case "D">
|
||||||
</#if>
|
<#-- *********************************************** Action = DELETE ******************** -->
|
||||||
<#else>
|
<#stop "event not supported (Case D)">
|
||||||
<#-- Preparation Type not supported-->
|
<#break>
|
||||||
<#stop>
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#-- no confirmed quantity for the preparation - preparation closed-->
|
|
||||||
<#stop>
|
|
||||||
</#if>
|
|
||||||
|
|
||||||
|
|
||||||
<#break>
|
<#default>
|
||||||
<#case "D">
|
<#stop "event not supported">
|
||||||
<#-- *********************************************** Action = DELETE ******************** -->
|
|
||||||
<#stop>
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
<#default>
|
|
||||||
<#stop>
|
|
||||||
</#switch>
|
</#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 ={}>
|
|
||||||
]
|
|
||||||
85
RFXtoRP_HsrPrepa_GoodsPrepared.ftl
Normal file
85
RFXtoRP_HsrPrepa_GoodsPrepared.ftl
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
|
||||||
|
[
|
||||||
|
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list??) as preparation_line>
|
||||||
|
<#list preparation_line.despatched_ipg_list as despatched_ipg>
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
<#if despatched_ipg.carton_number != "000000000000000000">
|
||||||
|
"RefID": "${despatched_ipg.carton_number}"
|
||||||
|
<#else>
|
||||||
|
"RefID": "${despatched_ipg.hd_number}"
|
||||||
|
</#if>
|
||||||
|
},
|
||||||
|
|
||||||
|
"Payload": {
|
||||||
|
"Information" :{
|
||||||
|
<#if despatched_ipg.carton_number != "000000000000000000">
|
||||||
|
"ContainerType": "${despatched_ipg.carton_type_code}"
|
||||||
|
<#else>
|
||||||
|
"ContainerType": "${despatched_ipg.hd_type_code}"
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
},
|
||||||
|
<#-- HU Metadata inclusin inclusion -->
|
||||||
|
<#include "RFXtoRP_HsrPrepa_GoodsPrepared_HandlingUnitMetadata.ftl">
|
||||||
|
,
|
||||||
|
"PreparedContents" :[
|
||||||
|
{
|
||||||
|
"Goods": {
|
||||||
|
"ItemID": "${preparation_line.item_code}",
|
||||||
|
"LVBranchID": "${preparation_line.item_lv_code}",
|
||||||
|
<#if (despatched_ipg.ipg_manufacture_date?length != 0) && (despatched_ipg.ipg_manufacture_date?starts_with("00") == false)>
|
||||||
|
<#-- <#assign priority_date = JsonUtil.createUTCDateTime(despatched_ipg.ipg_manufacture_date) /> -->
|
||||||
|
<#assign priority_date = despatched_ipg.ipg_manufacture_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
|
"PriorityDate": "${priority_date}",
|
||||||
|
<#else>
|
||||||
|
<#if (despatched_ipg.ipg_receipt_date?length != 0) && (despatched_ipg.ipg_receipt_date?starts_with("00")== false)>
|
||||||
|
<#-- <#assign priority_date = JsonUtil.createUTCDateTime(despatched_ipg.ipg_receipt_date) /> -->
|
||||||
|
<#assign priority_date = despatched_ipg.ipg_receipt_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
|
"PriorityDate": "${priority_date}",
|
||||||
|
<#else>
|
||||||
|
<#if (despatched_ipg.ipg_best_before_date?length != 0) && (despatched_ipg.ipg_best_before_date?starts_with("00")== false)>
|
||||||
|
<#-- <#assign priority_date = JsonUtil.createUTCDateTime(despatched_ipg.ipg_best_before_date) /> -->
|
||||||
|
<#assign priority_date = despatched_ipg.ipg_best_before_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
|
"PriorityDate": "${priority_date}",
|
||||||
|
<#else>
|
||||||
|
<#if (despatched_ipg.ipg_sell_by_date?length != 0) && (despatched_ipg.ipg_sell_by_date?starts_with("00")== false)>
|
||||||
|
<#-- <#assign priority_date = JsonUtil.createUTCDateTime(despatched_ipg.ipg_sell_by_date) /> -->
|
||||||
|
<#assign priority_date = despatched_ipg.ipg_sell_by_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
|
"PriorityDate": "${priority_date}",
|
||||||
|
<#else>
|
||||||
|
<#if (despatched_ipg.ipg_use_by_date?length != 0) && (despatched_ipg.ipg_use_by_date?starts_with("00")== false)>
|
||||||
|
<#-- <#assign priority_date = JsonUtil.createUTCDateTime(despatched_ipg.ipg_use_by_date) /> -->
|
||||||
|
<#assign priority_date = despatched_ipg.ipg_use_by_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
|
"PriorityDate": "${priority_date}",
|
||||||
|
<#else>
|
||||||
|
"PriorityDate": "error_date",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
<#-- Segmentation Keys inclusion -->
|
||||||
|
<#include "RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl">
|
||||||
|
},
|
||||||
|
"ExecutionflowID": "${preparation_line.preparation_order_originator_reference}",
|
||||||
|
"LineID": "${preparation_line.pro_line_number}",
|
||||||
|
"ActorID": "${preparationOrder.physical_depot_code}",
|
||||||
|
"Quantity": {
|
||||||
|
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||||
|
"Value": ${despatched_ipg.quantity_lvs}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
}<#sep>,</#sep>
|
||||||
|
</#list>
|
||||||
|
<#sep>,</#sep>
|
||||||
|
</#list>
|
||||||
|
]
|
||||||
@@ -1,7 +1,9 @@
|
|||||||
<#-- use protobuf of class HsrPrepa to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsrPrepa to find Reflex WMS fields names -->
|
||||||
|
|
||||||
<#--
|
<#--
|
||||||
"MetaData" :[
|
"MetaData" :[
|
||||||
]
|
|
||||||
|
]
|
||||||
|
|
||||||
-->
|
-->
|
||||||
"MetaData": [ ]
|
"MetaData": [ ]
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<#-- use protobuf of class Hsrprepa to find HARDIS WMS fields names -->
|
<#-- use protobuf of class Hsrprepa to find Reflex WMS fields names -->
|
||||||
<#--
|
<#--
|
||||||
"SegmentationKeys": [
|
"SegmentationKeys": [
|
||||||
{
|
{
|
||||||
@@ -24,6 +24,7 @@
|
|||||||
<#else>
|
<#else>
|
||||||
"Value": { "Bool" : "False"}
|
"Value": { "Bool" : "False"}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
<#assign manufacturing_date = despatched_ipg.ipg_manufacture_date?datetime(rfx_date_format_default)?iso_utc />
|
<#assign manufacturing_date = despatched_ipg.ipg_manufacture_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
"Key": "ManufacturingDate",
|
"Key": "ManufacturingDate",
|
||||||
|
|||||||
@@ -1,29 +0,0 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ReflexUtils.ftl">
|
|
||||||
[
|
|
||||||
<#assign dispatched3_datetime = RfxDateTimetoUTCWithTimezone(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_rfx) />
|
|
||||||
|
|
||||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.despatched_ipg_list?size != 0) as preparation_line3>
|
|
||||||
<#list preparation_line3.despatched_ipg_list?filter(j ->j.carton_number!="000000000000000000") as despatched_ipg3>
|
|
||||||
<#if !refIDHmap[despatched_ipg3.carton_number]?? >
|
|
||||||
<#if refIDHmap?size != 0 >
|
|
||||||
,
|
|
||||||
</#if>
|
|
||||||
<#assign refIDHmap += {despatched_ipg3.carton_number,despatched_ipg3.carton_number}>
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
"RefID": "${despatched_ipg3.carton_number}",
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${dispatched3_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload": { }
|
|
||||||
}
|
|
||||||
</#if>
|
|
||||||
</#list>
|
|
||||||
</#list>
|
|
||||||
]
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
<#-- use protobuf of class HsrPrepa to find HARDIS WMS fields names -->
|
|
||||||
|
|
||||||
<#--
|
|
||||||
"MetaData" :[
|
|
||||||
|
|
||||||
]
|
|
||||||
|
|
||||||
-->
|
|
||||||
"MetaData": [ ]
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
[
|
|
||||||
<#assign dispatched_datetime5 = RfxDateTimetoUTCWithTimezone(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_rfx) />
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
"RefID":"${despatched_ipg.hd_number}",
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${dispatched_datetime5}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
"HandlingunitID": "${despatched_ipg.hd_number}"
|
|
||||||
<#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" >
|
|
||||||
,
|
|
||||||
"HUCarrier":{
|
|
||||||
"ActorID": "${RFXtoRPprefixCarrier(preparationOrder.load_data.carrier_code?trim?json_string)}"
|
|
||||||
}
|
|
||||||
</#if>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,28 +1,27 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
[
|
[
|
||||||
<#assign dispatched_datetime = RfxDateTimetoUTCWithTimezone(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_rfx) />
|
<#assign dispatched_datetime = RfxDateTimetoUTC(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_offset_rfx) />
|
||||||
<#assign refIDHmap_local ={}>
|
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list??) as preparation_line>
|
||||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.despatched_ipg_list?size != 0) as preparation_line>
|
|
||||||
<#list preparation_line.despatched_ipg_list as despatched_ipg>
|
<#list preparation_line.despatched_ipg_list as despatched_ipg>
|
||||||
<#if !refIDHmap_local[despatched_ipg.hd_number]?? >
|
|
||||||
<#if refIDHmap_local?size != 0 >
|
|
||||||
,
|
|
||||||
</#if>
|
|
||||||
<#assign refIDHmap_local +={despatched_ipg.hd_number,despatched_ipg.hd_number}>
|
|
||||||
{
|
{
|
||||||
"Header": {"ProjectID": "${projectRP}"},
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
|
<#if despatched_ipg.carton_number != "000000000000000000">
|
||||||
|
"RefID": "${despatched_ipg.carton_number}",
|
||||||
|
<#else>
|
||||||
"RefID": "${despatched_ipg.hd_number}",
|
"RefID": "${despatched_ipg.hd_number}",
|
||||||
|
</#if>
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${dispatched_datetime}",
|
"DateTime": "${dispatched_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Payload": { }
|
"Payload": { }
|
||||||
}
|
}<#sep>,</#sep>
|
||||||
</#if>
|
|
||||||
</#list>
|
</#list>
|
||||||
|
<#sep>,</#sep>
|
||||||
</#list>
|
</#list>
|
||||||
<#assign refIDHmap_local ={}>
|
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,141 +0,0 @@
|
|||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
[
|
|
||||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.despatched_ipg_list?size != 0 ) as preparation_line>
|
|
||||||
<#list preparation_line.despatched_ipg_list as despatched_ipg>
|
|
||||||
<#assign packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) />
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
"RefDate": {
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}",
|
|
||||||
"DateTime": "${packing_datetime}"
|
|
||||||
},
|
|
||||||
<#if despatched_ipg.carton_number != "000000000000000000">
|
|
||||||
"RefID": "${despatched_ipg.carton_number}"
|
|
||||||
<#else>
|
|
||||||
"RefID": "${despatched_ipg.hd_number}"
|
|
||||||
</#if>
|
|
||||||
},
|
|
||||||
|
|
||||||
"Payload": {
|
|
||||||
"Information" :{
|
|
||||||
<#if despatched_ipg.carton_number != "000000000000000000">
|
|
||||||
"ContainerType": "${despatched_ipg.carton_type_code?json_string}"
|
|
||||||
<#if preparation_line.despatched_cartons_list?? >
|
|
||||||
<#list preparation_line.despatched_cartons_list?filter(l -> l?? && l.carton_number==despatched_ipg.carton_number) as dimensionCarton>
|
|
||||||
,
|
|
||||||
"Length": {
|
|
||||||
"Unit": "${length_unit_rfx}",
|
|
||||||
"Value": "${dimensionCarton.overall_depth}"
|
|
||||||
},
|
|
||||||
"Weight": {
|
|
||||||
"Unit": "${weight_unit_rfx}",
|
|
||||||
"Value": "${dimensionCarton.carton_gross_weight}"
|
|
||||||
},
|
|
||||||
"Height": {
|
|
||||||
"Unit": "${length_unit_rfx}",
|
|
||||||
"Value": "${dimensionCarton.overall_height}"
|
|
||||||
},
|
|
||||||
"Width": {
|
|
||||||
"Unit": "${length_unit_rfx}",
|
|
||||||
"Value": "${dimensionCarton.overall_width}"
|
|
||||||
}
|
|
||||||
</#list>
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
"ContainerType": "${despatched_ipg.hd_type_code?json_string}"
|
|
||||||
<#if preparation_line.despatched_hds_list??>
|
|
||||||
<#list preparation_line.despatched_hds_list?filter(j -> j?? && j.handling_device_number==despatched_ipg.hd_number) as dimensionHU>
|
|
||||||
,
|
|
||||||
"Length": {
|
|
||||||
"Unit": "${length_unit_rfx}",
|
|
||||||
"Value": "${dimensionHU.hd_type_depth}"
|
|
||||||
},
|
|
||||||
"Weight": {
|
|
||||||
"Unit": "${weight_unit_rfx}",
|
|
||||||
"Value": "${dimensionHU.hd_gross_weight}"
|
|
||||||
},
|
|
||||||
"Width": {
|
|
||||||
"Unit": "${length_unit_rfx}",
|
|
||||||
"Value": "${dimensionHU.hd_type_width}"
|
|
||||||
}
|
|
||||||
</#list>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
},
|
|
||||||
|
|
||||||
<#-- HU Metadata inclusin inclusion -->
|
|
||||||
<#include "RFXtoRP_HsrPrepa_GoodsPrepared_HandlingUnitMetadata.ftl">
|
|
||||||
,
|
|
||||||
"PreparedContents" :[
|
|
||||||
{
|
|
||||||
"Goods": {
|
|
||||||
"ItemID": "${preparation_line.item_code?trim?json_string}",
|
|
||||||
"LVBranchID": "${preparation_line.item_lv_code?json_string}",
|
|
||||||
|
|
||||||
<#if (despatched_ipg.ipg_use_by_date?length != 0) && (despatched_ipg.ipg_use_by_date?starts_with("00")== false)>
|
|
||||||
<#assign priority_date = despatched_ipg.ipg_use_by_date?datetime(rfx_date_format_default)?iso_utc />
|
|
||||||
"PriorityDate": "${priority_date}",
|
|
||||||
<#else>
|
|
||||||
<#if (despatched_ipg.ipg_best_before_date?length != 0) && (despatched_ipg.ipg_best_before_date?starts_with("00")== false)>
|
|
||||||
<#assign priority_date = despatched_ipg.ipg_best_before_date?datetime(rfx_date_format_default)?iso_utc />
|
|
||||||
"PriorityDate": "${priority_date}",
|
|
||||||
<#else>
|
|
||||||
<#if (despatched_ipg.ipg_sell_by_date?length != 0) && (despatched_ipg.ipg_sell_by_date?starts_with("00")== false)>
|
|
||||||
<#assign priority_date = despatched_ipg.ipg_sell_by_date?datetime(rfx_date_format_default)?iso_utc />
|
|
||||||
"PriorityDate": "${priority_date}",
|
|
||||||
<#else>
|
|
||||||
<#if (despatched_ipg.ipg_manufacture_date?length != 0) && (despatched_ipg.ipg_manufacture_date?starts_with("00") == false)>
|
|
||||||
<#assign priority_date = despatched_ipg.ipg_manufacture_date?datetime(rfx_date_format_default)?iso_utc />
|
|
||||||
"PriorityDate": "${priority_date}",
|
|
||||||
<#else>
|
|
||||||
<#if (despatched_ipg.ipg_receipt_date?length != 0) && (despatched_ipg.ipg_receipt_date?starts_with("00")== false)>
|
|
||||||
<#assign priority_date = despatched_ipg.ipg_receipt_date?datetime(rfx_date_format_default)?iso_utc />
|
|
||||||
"PriorityDate": "${priority_date}",
|
|
||||||
<#else>
|
|
||||||
<#if (preparationOrder.stock_despatch_at_preparation_datetime?length != 0) && (preparationOrder.stock_despatch_at_preparation_datetime?starts_with("00")== false)>
|
|
||||||
<#assign priority_date = preparationOrder.stock_despatch_at_preparation_datetime?datetime(rfx_date_format_default)?iso_utc />
|
|
||||||
"PriorityDate": "${priority_date}",
|
|
||||||
<#else>
|
|
||||||
"PriorityDate": "1970-01-01T00:00:00Z",
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
|
|
||||||
<#-- Segmentation Keys inclusion -->
|
|
||||||
<#include "RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl">
|
|
||||||
},
|
|
||||||
<#if preparation_line.preparation_order_originator_reference?? && preparation_line.preparation_order_originator_reference!="">
|
|
||||||
"OrderID": "${preparation_line.preparation_order_originator_reference?trim?json_string}",
|
|
||||||
"ExecutionflowID": "${preparation_line.pro_physical_depot_code?trim?json_string}${preparationOrder.activity_code?trim?json_string}${preparation_line.pro_originator_code?trim?json_string}${preparation_line.preparation_order_originator_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
"OrderID": "O${preparation_line.pro_physical_depot_code?trim?json_string}${preparationOrder.activity_code?trim?json_string}${preparation_line.pro_originator_code?trim?json_string}${preparation_line.pro_year}${preparation_line.pro_number}",
|
|
||||||
"ExecutionflowID": "O${preparation_line.pro_physical_depot_code?trim?json_string}${preparationOrder.activity_code?trim?json_string}${preparation_line.pro_originator_code?trim?json_string}${preparation_line.pro_year}${preparation_line.pro_number}",
|
|
||||||
</#if>
|
|
||||||
|
|
||||||
<#if (preparation_line.pro_originator_reference_line_number!0) != 0>
|
|
||||||
"LineID": "${preparation_line.pro_originator_reference_line_number}",
|
|
||||||
<#else>
|
|
||||||
"LineID": "${preparation_line.pro_line_number!0}",
|
|
||||||
</#if>
|
|
||||||
"ActorID": "${RFXtoRPprefixDepot(preparationOrder.physical_depot_code?trim?json_string)}",
|
|
||||||
"Quantity": {
|
|
||||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
|
||||||
"Value": ${despatched_ipg.quantity_lvs}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}<#sep>,</#sep>
|
|
||||||
</#list>
|
|
||||||
<#sep>,</#sep>
|
|
||||||
</#list>
|
|
||||||
]
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ReflexUtils.ftl">
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
"RefDate": {
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}",
|
|
||||||
"DateTime": "${HUadded_packing_datetime}"
|
|
||||||
},
|
|
||||||
"RefID": "${despatched_ipg.hd_number}"
|
|
||||||
},
|
|
||||||
|
|
||||||
"Payload": {
|
|
||||||
|
|
||||||
"IncludedHandlingunitIDs": [ "${despatched_ipg.carton_number}" ]
|
|
||||||
<#if preparation_line.despatched_hds_list?? && preparation_line.despatched_hds_list[0]??>
|
|
||||||
,
|
|
||||||
"Information": {
|
|
||||||
"ContainerType": "${preparation_line.despatched_hds_list[0].hd_type_code}",
|
|
||||||
"Length": {
|
|
||||||
"Unit": "${length_unit_rfx}",
|
|
||||||
"Value": ${preparation_line.despatched_hds_list[0].hd_type_depth}
|
|
||||||
},
|
|
||||||
"Weight": {
|
|
||||||
"Unit": "${weight_unit_rfx}",
|
|
||||||
"Value": ${preparation_line.despatched_hds_list[0].hd_gross_weight}
|
|
||||||
},
|
|
||||||
"Width": {
|
|
||||||
"Unit": "${length_unit_rfx}",
|
|
||||||
"Value": ${preparation_line.despatched_hds_list[0].hd_type_width}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</#if>,
|
|
||||||
<#-- HU Metadata inclusin inclusion -->
|
|
||||||
<#include "RFXtoRP_HsrPrepa_HUsAdded_Metadata.ftl">
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,68 +1,19 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
<#include "RFX_PartnerAPP_Settings.ftl">
|
|
||||||
[
|
[
|
||||||
<#assign dispatched_datetime4 = RfxDateTimetoUTCWithTimezone(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_rfx) />
|
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
<#switch trackingNumberSource>
|
"RefID": "${despatched_ipg.consignment_unit_id}"
|
||||||
<#case 1>
|
|
||||||
<#if despatched_ipg.consignment_unit_id!="">
|
|
||||||
"RefID": "${despatched_ipg.consignment_unit_id?trim?json_string}",
|
|
||||||
</#if>
|
|
||||||
<#break>
|
|
||||||
<#case 2>
|
|
||||||
<#if despatched_ipg.carton_number != "000000000000000000">
|
|
||||||
"RefID":"${despatched_ipg.carton_number}",
|
|
||||||
<#else>
|
|
||||||
"RefID":"${despatched_ipg.hd_number}",
|
|
||||||
</#if>
|
|
||||||
<#break>
|
|
||||||
<#case 3>
|
|
||||||
<#if despatched_ipg.consignment_unit_id!="">
|
|
||||||
"RefID": "${despatched_ipg.consignment_unit_id?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
<#if despatched_ipg.carton_number != "000000000000000000">
|
|
||||||
"RefID":"${despatched_ipg.carton_number}",
|
|
||||||
<#else>
|
|
||||||
"RefID":"${despatched_ipg.hd_number}",
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
<#break>
|
|
||||||
<#default>
|
|
||||||
<#if despatched_ipg.consignment_unit_id!="">
|
|
||||||
"RefID": "${despatched_ipg.consignment_unit_id?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
<#if despatched_ipg.carton_number != "000000000000000000">
|
|
||||||
"RefID":"${despatched_ipg.carton_number}",
|
|
||||||
<#else>
|
|
||||||
"RefID":"${despatched_ipg.hd_number}",
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#switch>
|
|
||||||
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${dispatched_datetime4}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"Payload": {
|
"Payload": {
|
||||||
<#if despatched_ipg.carton_number != "000000000000000000">
|
<#if despatched_ipg.carton_number != "000000000000000000">
|
||||||
"HandlingunitID": "${despatched_ipg.carton_number}"
|
"HandlingunitID": "${despatched_ipg.carton_number}"
|
||||||
<#assign hd_numberHmap += {despatched_ipg.carton_number,despatched_ipg.carton_number}>
|
|
||||||
<#else>
|
<#else>
|
||||||
"HandlingunitID": "${despatched_ipg.hd_number}"
|
"HandlingunitID": "${despatched_ipg.hd_number}"
|
||||||
<#assign hd_numberHmap += {despatched_ipg.hd_number,despatched_ipg.hd_number}>
|
|
||||||
</#if>
|
|
||||||
<#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" >
|
|
||||||
,
|
|
||||||
"HUCarrier":{
|
|
||||||
"ActorID": "${RFXtoRPprefixCarrier(preparationOrder.load_data.carrier_code?trim?json_string)}"
|
|
||||||
}
|
|
||||||
</#if>
|
</#if>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message HARDIS WMS -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
@@ -14,52 +14,46 @@
|
|||||||
<#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 preparation_order = JsonUtil.jsonToMap(dataRfx)>
|
<#assign 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??>
|
|
||||||
{
|
{
|
||||||
|
<#-- check preparation type code (internal order and reservation are ignored) -->
|
||||||
|
<#if order.preparation_type_code == "010" || order.preparation_type_code == "030">
|
||||||
|
|
||||||
|
<#-- Only if preparation order not confirmed -->
|
||||||
|
<#if order.preparation_order_confirmed == "false" >
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl">
|
<#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl">
|
||||||
|
<#else>
|
||||||
|
<#stop "preparation order already confirmed">
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
<#else>
|
||||||
|
<#stop "preparation order type not supported">
|
||||||
|
</#if>
|
||||||
}
|
}
|
||||||
<#else>
|
|
||||||
<#-- No line -->
|
|
||||||
<#stop>
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#-- Preparation order type not supported -->
|
|
||||||
<#stop>
|
|
||||||
</#if>
|
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#case "D">
|
<#case "D">
|
||||||
<#-- *********************************************** Action = DELETE ******************** -->
|
<#-- *********************************************** Action = DELETE ******************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
|
<#assign 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>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrPro_ExecutionflowCancelled.ftl">
|
<#include "RFXtoRP_HsrPro_ExecutionflowCancelled.ftl">
|
||||||
}
|
}
|
||||||
<#else>
|
|
||||||
<#-- No line -->
|
|
||||||
<#stop>
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#-- Preparation order type not supported -->
|
|
||||||
<#stop>
|
|
||||||
</#if>
|
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop "event not supported">
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,13 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
<#assign preparation_status_datetime = RfxDateTimetoUTCWithTimezone(preparation_order.modification_datetime,time_zone_rfx) />
|
<#assign preparation_status_datetime = RfxDateTimetoUTC(order.modification_datetime,time_zone_offset_rfx) />
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
|
"RefID": "${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": {
|
"RefDate": {
|
||||||
"DateTime": "${preparation_status_datetime}",
|
"DateTime": "${preparation_status_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
|||||||
@@ -1,19 +1,14 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.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 planned_final_delivery_start_datetime = RfxDateTimetoUTC(order.planned_final_delivery_start_datetime,time_zone_offset_rfx) />
|
||||||
<#assign pro_creation_datetime = RfxDateTimetoUTCWithTimezone(preparation_order.creation_datetime,time_zone_rfx) />
|
<#assign pro_creation_datetime = RfxDateTimetoUTC(order.creation_datetime,time_zone_offset_rfx) />
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
|
"RefID": "${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": {
|
"RefDate": {
|
||||||
"DateTime": "${pro_creation_datetime}",
|
"DateTime": "${pro_creation_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
@@ -26,106 +21,83 @@
|
|||||||
},
|
},
|
||||||
<#-- Header Metadata inclusion -->
|
<#-- Header Metadata inclusion -->
|
||||||
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_HeaderMetadata.ftl">,
|
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_HeaderMetadata.ftl">,
|
||||||
<#-- Add transport grade code
|
|
||||||
<#if preparation_order.transport_grade_code!="">
|
|
||||||
"CarrierService":"${preparation_order.transport_grade_code?trim?json_string}",
|
|
||||||
</#if> -->
|
|
||||||
"ShipFrom": {
|
"ShipFrom": {
|
||||||
"ActorID": "${RFXtoRPprefixDepot(preparation_order.physical_depot_code?trim?json_string)}"
|
"ActorID": "${order.physical_depot_code}"
|
||||||
},
|
},
|
||||||
"ShipFromAcked": true,
|
"ShipFromAcked": true,
|
||||||
"ShipTo": {
|
"ShipTo": {
|
||||||
<#if preparation_order.preparation_type_code == "030" && preparation_order.optional_attributes.intermediate_consignee_transfer_physical_depot?? && preparation_order.optional_attributes.intermediate_consignee_transfer_physical_depot!="" && preparation_order.optional_attributes.transfer_intermediate_consignee=="true">
|
<#if order.address.type_code == "" && order.address.title_code == "" && order.address.first_name == "" && order.address.last_name == "" && order.address.mail_address == "" && order.address.contact_type_code == "" && order.address.mobile_phone_number == "" && order.address.land_line_phone_number == "" && order.address.fax_number == "" && order.address.address_type_code == "" && order.address.name_or_company_name == "" && order.address.additional_address_data_1 == "" && order.address.additional_address_data_2 == "" && order.address.post_code_area_name == "" && order.address.territorial_division_code == "" && order.address.postal_code == "" && order.address.iso_country_code == "">
|
||||||
"ActorID": "${RFXtoRPprefixDepot(preparation_order.optional_attributes.intermediate_consignee_transfer_physical_depot?json_string)}"
|
"ActorID": "${order.end_consignee_code}"
|
||||||
<#else>
|
|
||||||
<#if preparation_order.preparation_type_code == "030" && preparation_order.optional_attributes.transfer_intermediate_consignee=="false" && preparation_order.transfer_physical_depot_code?? && preparation_order.transfer_physical_depot_code!="">
|
|
||||||
"ActorID": "${RFXtoRPprefixDepot(preparation_order.transfer_physical_depot_code?json_string)}"
|
|
||||||
<#else>
|
|
||||||
<#if preparation_order.address.address_type_code == "" &&
|
|
||||||
preparation_order.address.name_or_company_name == "" &&
|
|
||||||
preparation_order.address.additional_address_data_1 == "" &&
|
|
||||||
preparation_order.address.additional_address_data_2 == "" &&
|
|
||||||
preparation_order.address.post_code_area_name == "" &&
|
|
||||||
preparation_order.address.territorial_division_code == "" &&
|
|
||||||
preparation_order.address.postal_code == "" &&
|
|
||||||
preparation_order.address.iso_country_code == "">
|
|
||||||
"ActorID": "${RFXtoRPprefixConsignee(preparation_order.end_consignee_code?json_string)}"
|
|
||||||
<#else>
|
<#else>
|
||||||
"Actor":
|
"Actor":
|
||||||
{
|
{
|
||||||
"Name" : "${(preparation_order.address.name_or_company_name!"")?json_string}",
|
"Name" : "${order.address.name_or_company_name!""}",
|
||||||
"Address" :
|
"Address" :
|
||||||
{
|
{
|
||||||
"City" : "${(preparation_order.address.post_code_area_name!"")?json_string}",
|
"City" : "${order.address.post_code_area_name!""}",
|
||||||
"CountryCode" : "${preparation_order.address.iso_country_code!""}",
|
"CountryCode" : "${order.address.iso_country_code!""}",
|
||||||
"PostalCode" : "${preparation_order.address.postal_code!""}",
|
"PostalCode" : "${order.address.postal_code!""}",
|
||||||
"StreetAddressOne" : "${(preparation_order.address.street_and_number_and_po_box!"")?json_string}",
|
"StreetAddressOne" : "${order.address.street_and_number_and_po_box!""}",
|
||||||
"StreetAddressTwo" : "${(preparation_order.address.additional_address_data_1!"")?json_string}",
|
"StreetAddressTwo" : "${order.address.additional_address_data_1!""}",
|
||||||
"StreetAddressThree" : "${(preparation_order.address.additional_address_data_2!"")?json_string}"
|
"StreetAddressThree" : "${order.address.additional_address_data_2!""}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Contact" :
|
"Contact" :
|
||||||
{
|
{
|
||||||
"FirstName" : "${(preparation_order.address.first_name!"")?json_string}",
|
"FirstName" : "${order.address.first_name!""}",
|
||||||
"LastName" : "${(preparation_order.address.last_name!"")?json_string}",
|
"LastName" : "${order.address.last_name!""}",
|
||||||
"Emails" : ${splitEmailsIntoArray((preparation_order.address.mail_address!"")?json_string)},
|
"Emails" : ["${order.address.mail_address!""}"],
|
||||||
"Phones" : ["${(preparation_order.address.mobile_phone_number!"")?json_string}","${(preparation_order.address.land_line_phone_number!"")?json_string}", "${(preparation_order.address.fax_number!"")?json_string}" ]
|
"Phones" : ["${order.address.mobile_phone_number!""}","${order.address.land_line_phone_number!""}", "${order.address.fax_number!""}" ]
|
||||||
}
|
}
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
</#if>
|
||||||
},
|
},
|
||||||
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
|
|
||||||
"OrderID": "${preparation_order.originator_reference?trim?json_string}",
|
<#if order.line_list??>
|
||||||
<#else>
|
|
||||||
"OrderID": "O${preparation_order.physical_depot_code?trim?json_string}${preparation_order.activity_code?trim?json_string}${preparation_order.originator_code?trim?json_string}${preparation_order.preparation_order_year}${preparation_order.preparation_order_number}",
|
|
||||||
</#if>
|
|
||||||
<#if preparation_order.line_list??>
|
|
||||||
"Lines" : [
|
"Lines" : [
|
||||||
<#list preparation_order.line_list as preparation_order_line >
|
<#list order.line_list as line>
|
||||||
{
|
{
|
||||||
<#if (preparation_order_line.originator_reference_line_number!0) != 0>
|
<#if (line.originator_reference_line_number!0) != 0>
|
||||||
"LineID": "${preparation_order_line.originator_reference_line_number}",
|
"LineID": "${line.originator_reference_line_number}",
|
||||||
<#else>
|
<#else>
|
||||||
"LineID": "${preparation_order_line.preparation_order_line_number!0}",
|
"LineID": "${line.preparation_order_line_number!0}",
|
||||||
</#if>
|
</#if>
|
||||||
<#-- Line Metadata inclusion -->
|
<#-- Line Metadata inclusion -->
|
||||||
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_LineMetadata.ftl">,
|
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_LineMetadata.ftl">,
|
||||||
|
|
||||||
"RequestedContent":
|
"RequestedContent":
|
||||||
{
|
{
|
||||||
"Goods":
|
"Goods":
|
||||||
{
|
{
|
||||||
"ItemID": "${preparation_order_line.item_code?trim?json_string!"0"}",
|
"ItemID": "${line.item_code!"0"}",
|
||||||
"LVBranchID": "${preparation_order_line.item_lv_code?json_string!"0"}",
|
"LVBranchID": "${line.item_lv_code!"0"}",
|
||||||
<#if (preparation_order_line.optional_attributes.forced_priority_date?length != 0) && (preparation_order_line.optional_attributes.forced_priority_date?starts_with("00") == false)>
|
<#if (line.optional_attributes.forced_priority_date?length != 0) && (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 />
|
<#assign forced_priority_date = line.optional_attributes.forced_priority_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
"PriorityDate": "${forced_priority_date}",
|
"PriorityDate": "${forced_priority_date}",
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
<#-- Segmentation Keys inclusion -->
|
<#-- Segmentation Keys inclusion -->
|
||||||
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_SegmentationKeys.ftl">
|
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_SegmentationKeys.ftl">
|
||||||
|
|
||||||
},
|
},
|
||||||
"Quantity" :
|
"Quantity" :
|
||||||
{
|
{
|
||||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||||
"Value": "${preparation_order_line.base_lv_quantity_to_prepare!0}"
|
"Value": "${line.base_lv_quantity_to_prepare!0}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}<#sep>,</#sep>
|
}<#sep>,</#sep>
|
||||||
</#list>
|
</#list>
|
||||||
],
|
],
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
"RequestedMilestones" :
|
"RequestedMilestones" :
|
||||||
{
|
{
|
||||||
"RequestedDeliveryDateTime" :
|
"RequestedDeliveryDateTime" :
|
||||||
{
|
{
|
||||||
<#if preparation_order.intermediate_consignee_code?? && preparation_order.intermediate_consignee_code!="" && preparation_order.intermediate_delivery_start_datetime?? && preparation_order.intermediate_delivery_start_datetime!="0000-00-00T00:00:00">
|
|
||||||
<#assign intermediate_delivery_start_datetime = RfxDateTimetoUTCWithTimezone(preparation_order.intermediate_delivery_start_datetime,time_zone_rfx) />
|
|
||||||
"DateTime": "${intermediate_delivery_start_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
<#else>
|
|
||||||
"DateTime": "${planned_final_delivery_start_datetime}",
|
"DateTime": "${planned_final_delivery_start_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
</#if>
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<#-- use protobuf of class HsrPro to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsrPro to find Reflex Wms fields names -->
|
||||||
|
|
||||||
<#--
|
<#--
|
||||||
|
|
||||||
"MetaData": [
|
"MetaData": [
|
||||||
{
|
{
|
||||||
"Key": "OrderType",
|
"Key": "OrderType",
|
||||||
"Value": { "String" : "${preparation_order.optional_attributes.reason_code}"}
|
"Value": { "String" : "${order.optional_attributes.reason_code}"}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
-->
|
-->
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<#-- use protobuf of class HsrPro to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsrPro to find Reflex Wms fields names -->
|
||||||
|
|
||||||
|
|
||||||
"MetaData": [ ]
|
"MetaData": [ ]
|
||||||
@@ -1,21 +1,21 @@
|
|||||||
<#-- use protobuf of class HsrPro to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsrPro to find Reflex WMS fields names -->
|
||||||
<#--
|
<#--
|
||||||
|
|
||||||
"SegmentationKeys": [
|
"SegmentationKeys": [
|
||||||
{
|
{
|
||||||
"Key": "Grade",
|
"Key": "Grade",
|
||||||
"Value": { "String" : "${preparation_order_line.grade_code_to_prepare}"}
|
"Value": { "String" : "${line.grade_code_to_prepare}"}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Key": "Owner",
|
"Key": "Owner",
|
||||||
"Value": { "String" : "${preparation_order_line.owner_code_to_prepare}"}
|
"Value": { "String" : "${line.owner_code_to_prepare}"}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Key": "BatchNumber",
|
"Key": "BatchNumber",
|
||||||
<#if reflexMvtStockInterface.batch_1 == "">
|
<#if reflexMvtStockInterface.batch_1 == "">
|
||||||
"Value": { "String" : "no batch"}
|
"Value": { "String" : "no batch"}
|
||||||
<#else>
|
<#else>
|
||||||
"Value": { "String" : "${preparation_order_line.batch_1}"}
|
"Value": { "String" : "${line.batch_1}"}
|
||||||
</#if>
|
</#if>
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message HARDIS WMS -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
@@ -15,25 +15,10 @@
|
|||||||
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
||||||
<#if receipt.receipt_type?? && receipt.receipt_type = "030" && receipt.line_list??> <#-- if reception is a transfer type -->
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl">
|
|
||||||
|
|
||||||
},
|
<#if receipt.receipt_type = "030">
|
||||||
{
|
<#stop "ignored message because receipt type = transfert">
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrReceiptList_TransfertReceiptExpected.ftl">
|
|
||||||
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#else>
|
<#else>
|
||||||
<#if receipt.line_list ??>
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||||
@@ -50,9 +35,6 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#else>
|
|
||||||
<#stop>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
</#if>
|
||||||
<#break>
|
<#break>
|
||||||
<#case "U">
|
<#case "U">
|
||||||
@@ -60,61 +42,17 @@
|
|||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
<#if receipt.receipt_type?? && receipt.receipt_type == "030" && receipt.receipt_confirmed == "true" && receipt.confirmation_total_level_1==0 && receipt.confirmation_total_level_2==0 && receipt.confirmation_total_level_3==0>
|
<#if receipt.receipt_confirmed == "true" >
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ReceiptCompleted>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrReceiptList_TransfertExecutionflowCancelled.ftl">
|
<#include "RFXtoRP_HsrReceiptList_ReceiptCompleted.ftl">
|
||||||
}
|
}
|
||||||
<#else>
|
<#else>
|
||||||
<#if receipt.receipt_type?? && receipt.receipt_type == "030" && receipt.receipt_confirmed == "true">
|
<#if receipt.receipt_type = "030">
|
||||||
{
|
<#stop "ignored message because receipt type = transfert">
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrReceiptList_TransfertExecutionflowReceiptCompleted.ftl">
|
|
||||||
}
|
|
||||||
<#else>
|
<#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.ExecutionflowDetected>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl">
|
|
||||||
|
|
||||||
},
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrReceiptList_TransfertReceiptExpected.ftl">
|
|
||||||
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#else>
|
|
||||||
<#stop> <#-- Receipt reference for transfer is empty-->
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#if receipt.line_list ??>
|
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
@@ -126,13 +64,8 @@
|
|||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
|
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
|
||||||
|
|
||||||
}
|
}
|
||||||
<#else>
|
|
||||||
<#stop>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
]
|
]
|
||||||
@@ -142,7 +75,6 @@
|
|||||||
<#-- *********************************************** Action = DELETE ******************** -->
|
<#-- *********************************************** Action = DELETE ******************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
||||||
<#if receipt.line_list ??>
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -150,15 +82,13 @@
|
|||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl">
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl">
|
||||||
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#else>
|
|
||||||
<#stop> <#-- No line-->
|
|
||||||
</#if>
|
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop "event not supported">
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.modification_datetime,time_zone_rfx) />
|
<#assign receipt_status_datetime = RfxDateTimetoUTC(receipt.modification_datetime,time_zone_offset_rfx) />
|
||||||
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"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}",
|
"RefID": "${receipt.receipt_reference}",
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${receipt_status_datetime}",
|
"DateTime": "${receipt_status_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
|||||||
@@ -1,15 +1,14 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign receipt_datetime = RfxDateTimetoUTCWithTimezone(receipt.receipt_datetime,time_zone_rfx) />
|
<#assign receipt_datetime = RfxDateTimetoUTC(receipt.receipt_datetime,time_zone_offset_rfx) />
|
||||||
<#assign receipt_creation_datetime = RfxDateTimetoUTCWithTimezone(receipt.creation_datetime,time_zone_rfx) />
|
<#assign receipt_creation_datetime = RfxDateTimetoUTC(receipt.creation_datetime,time_zone_offset_rfx) />
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"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}",
|
"RefID": "${receipt.receipt_reference}",
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${receipt_creation_datetime}",
|
"DateTime": "${receipt_creation_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
@@ -26,29 +25,19 @@
|
|||||||
|
|
||||||
"ShipFrom":
|
"ShipFrom":
|
||||||
{
|
{
|
||||||
<#if receipt.receipt_type == '020'>
|
"ActorID": "${receipt.original_code}"
|
||||||
"ActorID": "${RFXtoRPprefixConsignee(receipt.original_code?trim?json_string)}"
|
|
||||||
<#else>
|
|
||||||
"ActorID": "${RFXtoRPprefixSupplier(receipt.original_code?trim?json_string)}"
|
|
||||||
</#if>
|
|
||||||
},
|
},
|
||||||
"ShipTo" :
|
"ShipTo" :
|
||||||
{
|
{
|
||||||
"ActorID": "${RFXtoRPprefixDepot(receipt.physical_depot_code?trim?json_string)}"
|
"ActorID": "${receipt.physical_depot_code}"
|
||||||
},
|
},
|
||||||
"ShipToAcked": true,
|
"ShipToAcked": true,
|
||||||
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
|
||||||
"OrderID":"${receipt.receipt_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
"OrderID":"R${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}",
|
|
||||||
</#if>
|
|
||||||
<#if receipt.carrier_informations.carrier_code != "">
|
<#if receipt.carrier_informations.carrier_code != "">
|
||||||
"Carrier":
|
"Carrier" : {"ActorID": "${receipt.carrier_informations.carrier_code}"},
|
||||||
{
|
|
||||||
"ActorID":"${RFXtoRPprefixCarrier(receipt.carrier_informations.carrier_code?trim?json_string)}"
|
|
||||||
},
|
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
|
|
||||||
<#if receipt.line_list??>
|
<#if receipt.line_list??>
|
||||||
"Lines" : [
|
"Lines" : [
|
||||||
<#list receipt.line_list as line>
|
<#list receipt.line_list as line>
|
||||||
@@ -60,18 +49,15 @@
|
|||||||
{
|
{
|
||||||
"Goods":
|
"Goods":
|
||||||
{
|
{
|
||||||
"ItemID": "${line.item_code?trim?json_string!"0"}",
|
"ItemID": "${line.item_code!"0"}",
|
||||||
"LVBranchID": "${line.item_lv_code?json_string!"0"}",
|
"LVBranchID": "${line.item_lv_code!"0"}",
|
||||||
<#if (line.line_without_detail?? && line.line_without_detail.priority_date?length != 0) && (line.line_without_detail.priority_date?starts_with("00") == false)>
|
<#if line.line_without_detail??>
|
||||||
|
<#if (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 />
|
<#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}",
|
"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>
|
||||||
|
<#else>
|
||||||
|
<#stop "line with detail">
|
||||||
</#if>
|
</#if>
|
||||||
<#-- Segmentation Keys inclusion -->
|
<#-- Segmentation Keys inclusion -->
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl">
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl">
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<#-- use protobuf of class HsrReceiptList to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsrReceiptList to find Reflex Wms fields names -->
|
||||||
|
|
||||||
<#--
|
<#--
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<#-- use protobuf of class HsrReceiptList to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsrReceiptList to find Reflex Wms fields names -->
|
||||||
|
|
||||||
|
|
||||||
"MetaData": [ ]
|
"MetaData": [ ]
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<#-- use protobuf of class HsrReceiptList to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsrReceiptList to find Reflex WMS fields names -->
|
||||||
|
|
||||||
<#--
|
<#--
|
||||||
"SegmentationKeys": [
|
"SegmentationKeys": [
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.confirmation_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_status_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
19
RFXtoRP_HsrReceiptList_ReceiptCompleted.ftl
Normal file
19
RFXtoRP_HsrReceiptList_ReceiptCompleted.ftl
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
<#assign receipt_status_datetime = RfxDateTimetoUTC(receipt.confirmation_datetime,time_zone_offset_rfx) />
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
"RefID": "${receipt.receipt_reference}",
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${receipt_status_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload": {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.creation_datetime,time_zone_rfx) />
|
<#assign receipt_status_datetime = RfxDateTimetoUTC(receipt.creation_datetime,time_zone_offset_rfx) />
|
||||||
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"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}",
|
"RefID": "${receipt.receipt_reference}",
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${receipt_status_datetime}",
|
"DateTime": "${receipt_status_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
|||||||
@@ -1,67 +0,0 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.modification_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": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}",
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${receipt_status_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
<#else>
|
|
||||||
<#if receipt.line_list??>
|
|
||||||
<#list receipt.line_list as receipt_line >
|
|
||||||
<#if receipt_line.origin_order_line_reference?? && receipt_line.origin_order_line_reference!="">
|
|
||||||
<#if !refIDHmap_local[receipt_line.origin_order_line_reference]?? >
|
|
||||||
<#if refIDHmap_local?size != 0 >
|
|
||||||
,
|
|
||||||
</#if>
|
|
||||||
<#assign refIDHmap_local +={receipt_line.origin_order_line_reference,receipt_line.origin_order_line_reference}>
|
|
||||||
{
|
|
||||||
"Header": {"ProjectID": "${projectRP}"},
|
|
||||||
"ID": {
|
|
||||||
<#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="">
|
|
||||||
"RefID": "${receipt.origin_order_line_depot?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt_line.origin_order_line_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
"RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt_line.origin_order_line_reference?trim?json_string}",
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${receipt_status_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
{
|
|
||||||
"Header": {"ProjectID": "${projectRP}"},
|
|
||||||
"ID": {
|
|
||||||
"RefID": "R${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year?trim?json_string}${receipt.receipt_number?trim?json_string}",
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${receipt_status_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
<#break>
|
|
||||||
</#if>
|
|
||||||
</#list>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
]
|
|
||||||
@@ -1,277 +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": {
|
|
||||||
"CreationDateTime": {
|
|
||||||
"DateTime": "${receipt_creation_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
},
|
|
||||||
<#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="">
|
|
||||||
"OrderID": "${receipt.receipt_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
"OrderID": "R${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}",
|
|
||||||
</#if>
|
|
||||||
<#-- Header Metadata inclusion -->
|
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl">,
|
|
||||||
"ShipFrom":
|
|
||||||
{
|
|
||||||
"ActorID": "${RFXtoRPprefixSupplier(receipt.original_code?trim?json_string)}"
|
|
||||||
},
|
|
||||||
"ShipTo" :
|
|
||||||
{
|
|
||||||
"ActorID": "${RFXtoRPprefixDepot(receipt.physical_depot_code?trim?json_string)}"
|
|
||||||
},
|
|
||||||
"ShipToAcked": true,
|
|
||||||
<#if receipt.carrier_informations.carrier_code != "">
|
|
||||||
"Carrier":
|
|
||||||
{
|
|
||||||
"ActorID":"${RFXtoRPprefixCarrier(receipt.carrier_informations.carrier_code?trim?json_string)}"
|
|
||||||
},
|
|
||||||
</#if>
|
|
||||||
<#if receipt.line_list??>
|
|
||||||
"Lines" : [
|
|
||||||
<#list receipt.line_list as line>
|
|
||||||
{
|
|
||||||
"LineID": "${line.receipt_line_number}",
|
|
||||||
<#-- Line Metadata inclusion -->
|
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl">,
|
|
||||||
"RequestedContent":
|
|
||||||
{
|
|
||||||
"Goods":
|
|
||||||
{
|
|
||||||
"ItemID": "${line.item_code?trim?json_string!"0"}",
|
|
||||||
"LVBranchID": "${line.item_lv_code?json_string!"0"}",
|
|
||||||
<#if (line.line_without_detail?? && line.line_without_detail.priority_date?length != 0) && (line.line_without_detail.priority_date?starts_with("00") == false)>
|
|
||||||
<#assign line_without_detail_priority_date = line.line_without_detail.priority_date?datetime(rfx_date_format_default)?iso_utc />
|
|
||||||
"PriorityDate": "${line_without_detail_priority_date}",
|
|
||||||
<#else>
|
|
||||||
<#if (line.line_detail?? && line.line_detail?size == 1 && line.line_detail[0].priority_date?length != 0) && (line.line_detail[0].priority_date?starts_with("00") == false)>
|
|
||||||
<#assign line_detail_priority_date = line.line_detail[0].priority_date?datetime(rfx_date_format_default)?iso_utc />
|
|
||||||
"PriorityDate": "${line_detail_priority_date}",
|
|
||||||
<#else>
|
|
||||||
"PriorityDate": "1970-01-01T00:00:00Z",
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
<#-- Segmentation Keys inclusion -->
|
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl">
|
|
||||||
},
|
|
||||||
"Quantity" :
|
|
||||||
{
|
|
||||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
|
||||||
"Value": "${line.order_quantity_in_lv!0}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
<#sep>,</#sep>
|
|
||||||
</#list>
|
|
||||||
],
|
|
||||||
</#if>
|
|
||||||
"RequestedMilestones" :
|
|
||||||
{
|
|
||||||
"RequestedDeliveryDateTime" :
|
|
||||||
{
|
|
||||||
"DateTime": "${receipt_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
<#else>
|
|
||||||
<#if receipt.line_list??>
|
|
||||||
<#list receipt.line_list as receipt_line >
|
|
||||||
<#if receipt_line.origin_order_line_reference!="">
|
|
||||||
<#if !refIDHmap_local[receipt_line.origin_order_line_reference]?? >
|
|
||||||
<#if refIDHmap_local?size != 0 >
|
|
||||||
,
|
|
||||||
</#if>
|
|
||||||
<#assign refIDHmap_local +={receipt_line.origin_order_line_reference,receipt_line.origin_order_line_reference}>
|
|
||||||
{
|
|
||||||
"Header": {"ProjectID": "${projectRP}"},
|
|
||||||
"ID": {
|
|
||||||
<#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="">
|
|
||||||
"RefID": "${receipt.origin_order_line_depot?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt_line.origin_order_line_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
"RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt_line.origin_order_line_reference?trim?json_string}",
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${receipt_creation_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
"CreationDateTime": {
|
|
||||||
"DateTime": "${receipt_creation_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
},
|
|
||||||
"OrderID":"${receipt_line.origin_order_line_reference?trim?json_string}",
|
|
||||||
<#-- Header Metadata inclusion -->
|
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl">,
|
|
||||||
"ShipFrom":
|
|
||||||
{
|
|
||||||
"ActorID": "${RFXtoRPprefixSupplier(receipt.original_code?trim?json_string)}"
|
|
||||||
},
|
|
||||||
"ShipTo" :
|
|
||||||
{
|
|
||||||
"ActorID": "${RFXtoRPprefixDepot(receipt.physical_depot_code?trim?json_string)}"
|
|
||||||
},
|
|
||||||
"ShipToAcked": true,
|
|
||||||
<#if receipt.carrier_informations.carrier_code != "">
|
|
||||||
"Carrier":
|
|
||||||
{
|
|
||||||
"ActorID":"${RFXtoRPprefixCarrier(receipt.carrier_informations.carrier_code?trim?json_string)}"
|
|
||||||
},
|
|
||||||
</#if>
|
|
||||||
<#if receipt.line_list??>
|
|
||||||
"Lines" : [
|
|
||||||
<#list receipt.line_list as line>
|
|
||||||
{
|
|
||||||
"LineID": "${line.receipt_line_number}",
|
|
||||||
<#-- Line Metadata inclusion -->
|
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl">,
|
|
||||||
"RequestedContent":
|
|
||||||
{
|
|
||||||
"Goods":
|
|
||||||
{
|
|
||||||
"ItemID": "${line.item_code?trim?json_string!"0"}",
|
|
||||||
"LVBranchID": "${line.item_lv_code?json_string!"0"}",
|
|
||||||
<#if (line.line_without_detail?? && line.line_without_detail.priority_date?length != 0) && (line.line_without_detail.priority_date?starts_with("00") == false)>
|
|
||||||
<#assign line_without_detail_priority_date = line.line_without_detail.priority_date?datetime(rfx_date_format_default)?iso_utc />
|
|
||||||
"PriorityDate": "${line_without_detail_priority_date}",
|
|
||||||
<#else>
|
|
||||||
<#if (line.line_detail?? && line.line_detail?size == 1 && line.line_detail[0].priority_date?length != 0) && (line.line_detail[0].priority_date?starts_with("00") == false)>
|
|
||||||
<#assign line_detail_priority_date = line.line_detail[0].priority_date?datetime(rfx_date_format_default)?iso_utc />
|
|
||||||
"PriorityDate": "${line_detail_priority_date}",
|
|
||||||
<#else>
|
|
||||||
"PriorityDate": "1970-01-01T00:00:00Z",
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
<#-- Segmentation Keys inclusion -->
|
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl">
|
|
||||||
},
|
|
||||||
"Quantity" :
|
|
||||||
{
|
|
||||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
|
||||||
"Value": "${line.order_quantity_in_lv!0}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
<#sep>,</#sep>
|
|
||||||
</#list>
|
|
||||||
],
|
|
||||||
</#if>
|
|
||||||
"RequestedMilestones" :
|
|
||||||
{
|
|
||||||
"RequestedDeliveryDateTime" :
|
|
||||||
{
|
|
||||||
"DateTime": "${receipt_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
{
|
|
||||||
"Header": {"ProjectID": "${projectRP}"},
|
|
||||||
"ID": {
|
|
||||||
"RefID": "R${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year?trim?json_string}${receipt.receipt_number?trim?json_string}",
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${receipt_creation_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
"CreationDateTime": {
|
|
||||||
"DateTime": "${receipt_creation_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
},
|
|
||||||
"OrderID":"${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year?trim?json_string}${receipt.receipt_number?trim?json_string}",
|
|
||||||
<#-- Header Metadata inclusion -->
|
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl">,
|
|
||||||
"ShipFrom":
|
|
||||||
{
|
|
||||||
"ActorID": "${RFXtoRPprefixSupplier(receipt.original_code?trim?json_string)}"
|
|
||||||
},
|
|
||||||
"ShipTo" :
|
|
||||||
{
|
|
||||||
"ActorID": "${RFXtoRPprefixDepot(receipt.physical_depot_code?trim?json_string)}"
|
|
||||||
},
|
|
||||||
"ShipToAcked": true,
|
|
||||||
<#if receipt.carrier_informations.carrier_code != "">
|
|
||||||
"Carrier":
|
|
||||||
{
|
|
||||||
"ActorID":"${RFXtoRPprefixCarrier(receipt.carrier_informations.carrier_code?trim?json_string)}"
|
|
||||||
},
|
|
||||||
</#if>
|
|
||||||
<#if receipt.line_list??>
|
|
||||||
"Lines" : [
|
|
||||||
<#list receipt.line_list as line>
|
|
||||||
{
|
|
||||||
"LineID": "${line.receipt_line_number}",
|
|
||||||
<#-- Line Metadata inclusion -->
|
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl">,
|
|
||||||
"RequestedContent":
|
|
||||||
{
|
|
||||||
"Goods":
|
|
||||||
{
|
|
||||||
"ItemID": "${line.item_code?trim?json_string!"0"}",
|
|
||||||
"LVBranchID": "${line.item_lv_code?json_string!"0"}",
|
|
||||||
<#if (line.line_without_detail?? && line.line_without_detail.priority_date?length != 0) && (line.line_without_detail.priority_date?starts_with("00") == false)>
|
|
||||||
<#assign line_without_detail_priority_date = line.line_without_detail.priority_date?datetime(rfx_date_format_default)?iso_utc />
|
|
||||||
"PriorityDate": "${line_without_detail_priority_date}",
|
|
||||||
<#else>
|
|
||||||
<#if (line.line_detail?? && line.line_detail?size == 1 && line.line_detail[0].priority_date?length != 0) && (line.line_detail[0].priority_date?starts_with("00") == false)>
|
|
||||||
<#assign line_detail_priority_date = line.line_detail[0].priority_date?datetime(rfx_date_format_default)?iso_utc />
|
|
||||||
"PriorityDate": "${line_detail_priority_date}",
|
|
||||||
<#else>
|
|
||||||
"PriorityDate": "1970-01-01T00:00:00Z",
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
<#-- Segmentation Keys inclusion -->
|
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl">
|
|
||||||
},
|
|
||||||
"Quantity" :
|
|
||||||
{
|
|
||||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
|
||||||
"Value": "${line.order_quantity_in_lv!0}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
<#sep>,</#sep>
|
|
||||||
</#list>
|
|
||||||
],
|
|
||||||
</#if>
|
|
||||||
"RequestedMilestones" :
|
|
||||||
{
|
|
||||||
"RequestedDeliveryDateTime" :
|
|
||||||
{
|
|
||||||
"DateTime": "${receipt_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
<#break>
|
|
||||||
</#if>
|
|
||||||
</#list>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
]
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.confirmation_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": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}",
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${receipt_status_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
<#else>
|
|
||||||
<#if receipt.line_list??>
|
|
||||||
<#list receipt.line_list as receipt_line >
|
|
||||||
<#if receipt_line.origin_order_line_reference?? && receipt_line.origin_order_line_reference!="">
|
|
||||||
<#if !refIDHmap_local[receipt_line.origin_order_line_reference]?? >
|
|
||||||
<#if refIDHmap_local?size != 0 >
|
|
||||||
,
|
|
||||||
</#if>
|
|
||||||
<#assign refIDHmap_local +={receipt_line.origin_order_line_reference,receipt_line.origin_order_line_reference}>
|
|
||||||
{
|
|
||||||
"Header": {"ProjectID": "${projectRP}"},
|
|
||||||
"ID": {
|
|
||||||
<#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="">
|
|
||||||
"RefID": "${receipt.origin_order_line_depot?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt_line.origin_order_line_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
"RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt_line.origin_order_line_reference?trim?json_string}",
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${receipt_status_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
{
|
|
||||||
"Header": {"ProjectID": "${projectRP}"},
|
|
||||||
"ID": {
|
|
||||||
"RefID": "R${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year?trim?json_string}${receipt.receipt_number?trim?json_string}",
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${receipt_status_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
<#break>
|
|
||||||
</#if>
|
|
||||||
</#list>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
]
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#assign receipt_status_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": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}",
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${receipt_status_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
<#else>
|
|
||||||
<#if receipt.line_list??>
|
|
||||||
<#list receipt.line_list as receipt_line >
|
|
||||||
<#if receipt_line.origin_order_line_reference?? && receipt_line.origin_order_line_reference!="">
|
|
||||||
<#if !refIDHmap_local[receipt_line.origin_order_line_reference]?? >
|
|
||||||
<#if refIDHmap_local?size != 0 >
|
|
||||||
,
|
|
||||||
</#if>
|
|
||||||
<#assign refIDHmap_local +={receipt_line.origin_order_line_reference,receipt_line.origin_order_line_reference}>
|
|
||||||
{
|
|
||||||
"Header": {"ProjectID": "${projectRP}"},
|
|
||||||
"ID": {
|
|
||||||
<#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="">
|
|
||||||
"RefID": "${receipt.origin_order_line_depot?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt_line.origin_order_line_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
"RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt_line.origin_order_line_reference?trim?json_string}",
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${receipt_status_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
{
|
|
||||||
"Header": {"ProjectID": "${projectRP}"},
|
|
||||||
"ID": {
|
|
||||||
"RefID": "R${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year?trim?json_string}${receipt.receipt_number?trim?json_string}",
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${receipt_status_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
<#break>
|
|
||||||
</#if>
|
|
||||||
</#list>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
]
|
|
||||||
@@ -22,21 +22,22 @@
|
|||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
},
|
},
|
||||||
"TechMessage": {
|
"TechMessage": {
|
||||||
"Code": "${restResponsetMsg.status!"no Code"}",
|
"Code": "${restResponsetMsg.status}",
|
||||||
"Label": ${strJsonBody}
|
"Label": ${strJsonBody}
|
||||||
},
|
},
|
||||||
"UserMessage": {
|
"UserMessage": {
|
||||||
"Code": "${restResponsetMsg.status!"no Code"}",
|
"Code": "${restResponsetMsg.status}",
|
||||||
"Label": ${strJsonBody},
|
"Label": ${strJsonBody},
|
||||||
"Params": []
|
"Params": []
|
||||||
},
|
},
|
||||||
"DetailElements": [],
|
"DetailElements": [],
|
||||||
"CorrelationID": "${id.correlationid!"no Correlationid"}",
|
"CorrelationID": "${id.correlationid}",
|
||||||
"ContextPayload": ${strJsonBody},
|
"ContextPayload": "rfxresponse",
|
||||||
"Type": "RP_EXECUTIONFLOW_EVENT",
|
"Type": "RP_EXECUTIONFLOW_EVENT",
|
||||||
"Task": "${id.apiRestReflexID!"no Task"}",
|
"Task": "${id.apiRestReflexID}",
|
||||||
"OriginalID": "${id.refid!"no OriginalID"?trim?json_string}",
|
"OriginalID": "${id.refid}",
|
||||||
"StackTrace": ""
|
"StackTrace": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${id.refid?json_string}"
|
"RefID": "${id.refid}"
|
||||||
},
|
},
|
||||||
|
|
||||||
"Payload": {
|
"Payload": {
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
"RefID": "${id.refid?json_string}"
|
|
||||||
},
|
|
||||||
"Payload": {}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
15
RFXtoRP_Receipt_ShipToAcked.ftl
Normal file
15
RFXtoRP_Receipt_ShipToAcked.ftl
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
"RefID": "${id.refid}"
|
||||||
|
},
|
||||||
|
|
||||||
|
"Payload": {
|
||||||
|
"ShipToAcked": true
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -1,60 +1,19 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : Response message from HARDIS WMS -->
|
<#-- input : Response message from Reflex -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
|
|
||||||
<#assign restResponsetMsg = JsonUtil.jsonToMap(input)>
|
<#assign restResponsetMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign id = JsonUtil.jsonToMap(restResponsetMsg.id!"{}")>
|
<#assign id = JsonUtil.jsonToMap(restResponsetMsg.id)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
<#assign organisationRP = organisation>
|
<#assign organisationRP = organisation>
|
||||||
|
|
||||||
|
|
||||||
<#assign aDateTime = .now>
|
<#assign aDateTime = .now>
|
||||||
<#assign no_apiRestReflexID = "no apiRestReflexID">
|
|
||||||
<#assign no_status = -99999>
|
|
||||||
|
|
||||||
|
|
||||||
<#switch id.apiRestReflexID!no_apiRestReflexID>
|
|
||||||
<#case no_apiRestReflexID>
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#if restResponsetMsg.body?? >
|
|
||||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
|
||||||
<#else>
|
|
||||||
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
|
|
||||||
</#if>
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
|
<#switch id.apiRestReflexID>
|
||||||
<#case "preparation_orders_post">
|
<#case "preparation_orders_post">
|
||||||
<#switch restResponsetMsg.status!no_status>
|
<#switch restResponsetMsg.status>
|
||||||
<#case no_status>
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#if restResponsetMsg.body?? >
|
|
||||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
|
||||||
<#else>
|
|
||||||
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
|
|
||||||
</#if>
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
|
||||||
},
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
<#case 200>
|
<#case 200>
|
||||||
<#case 201>
|
<#case 201>
|
||||||
<#-- *********************************************** ApiRestID = preparation_orders_post ******************** -->
|
<#-- *********************************************** ApiRestID = preparation_orders_post ******************** -->
|
||||||
@@ -69,16 +28,6 @@
|
|||||||
<#include "RFXtoRP_PrepOrder_ShipFromAcked.ftl">
|
<#include "RFXtoRP_PrepOrder_ShipFromAcked.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#else>
|
|
||||||
<#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "WARN">
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipFromAcked>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_PrepOrder_ShipFromAcked.ftl">
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#else>
|
<#else>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@@ -87,76 +36,37 @@
|
|||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||||
},
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
|
||||||
<#break>
|
<#break>
|
||||||
<#default>
|
<#default>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#if restResponsetMsg.body?? >
|
|
||||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||||
<#else>
|
|
||||||
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}}" />
|
|
||||||
</#if>
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||||
},
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
</#switch>
|
</#switch>
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#case "receipts_post">
|
<#case "receipts_post">
|
||||||
<#switch restResponsetMsg.status!no_status>
|
<#switch restResponsetMsg.status>
|
||||||
<#case no_status>
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#if restResponsetMsg.body?? >
|
|
||||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
|
||||||
<#else>
|
|
||||||
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
|
|
||||||
</#if>
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
|
||||||
},
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
<#case 200>
|
<#case 200>
|
||||||
<#case 201>
|
<#case 201>
|
||||||
<#-- *********************************************** ApiRestID = receipts_post ******************** -->
|
<#-- *********************************************** ApiRestID = preparation_orders_post ******************** -->
|
||||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||||
<#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)>
|
<#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)>
|
||||||
<#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" >
|
<#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" >
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDeleted>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipToAcked>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_Receipt_ExecutionflowDeleted.ftl">
|
<#include "RFXtoRP_Receipt_ShipToAcked.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#else>
|
<#else>
|
||||||
@@ -167,12 +77,6 @@
|
|||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||||
},
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -181,25 +85,16 @@
|
|||||||
<#default>
|
<#default>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#if restResponsetMsg.body?? >
|
|
||||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||||
<#else>
|
|
||||||
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
|
|
||||||
</#if>
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||||
},
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
</#switch>
|
</#switch>
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop>
|
<#stop>
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ReflexUtils.ftl">
|
|
||||||
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
"RefID": "${id.refid!"no RefID"?trim?json_string}",
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${aDateTime?iso_utc}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
"Payload": {}
|
|
||||||
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -4,40 +4,33 @@
|
|||||||
|
|
||||||
<#noparse>
|
<#noparse>
|
||||||
<#-- if LVID is egal to **quantity_in_base_lv** keyword then LVID is egal to base VL of the item -->
|
<#-- if LVID is egal to **quantity_in_base_lv** keyword then LVID is egal to base VL of the item -->
|
||||||
<#assign quantity_in_base_lv_RP_Cst = "**quantity_in_base_lv**" >
|
<#assign quantity_in_base_lv_RP_Cst = "**quantity_in_base_lv**" >
|
||||||
<#assign rfx_date_format_default = "yyyy-MM-dd" >
|
<#assign rfx_date_format_default = "yyyy-MM-dd" >
|
||||||
|
|
||||||
|
|
||||||
<#assign length_unit_KV_rfx = {"MET":"MILLIMETER","CM":"CENTIMETER","MM":"METER","DM":"DECIMETER","KM":"KILOMETER","MIL":"MILE","YAR":"YARD","INC":"INCH","FT":"FOOT"}>
|
<#assign length_unit_KV_rfx = {"MET":"MILLIMETER","CM":"CENTIMETER","MM":"METER","DM":"DECIMETER","KM":"KILOMETER","MIL":"MILE","YAR":"YARD","INC":"INCH","FT":"FOOT"}>
|
||||||
<#assign weight_unit_KV_rfx = {"GR":"GRAMME","DG":"DECIGRAM","KG":"KILOGRAM","TON":"TONNE","OCE":"ONCE","LTO":"LONG_TON","STO":"SHORT_TON","PND":"POUND"}>
|
<#assign weight_unit_KV_rfx = {"GR":"GRAMME","DG":"DECIGRAM","KG":"KILOGRAM","TON":"TONNE","OCE":"ONCE","LTO":"LONG_TON","STO":"SHORT_TON","PND":"POUND"}>
|
||||||
<#assign area_unit_KV_rfx = {"MM²":"SQUARE_MILLIMETER","CM²":"SQUARE_CENTIMETER","DM²":"SQUARE_DECIMETER","M²":"SQUARE_METER","SQI":"SQUARE_INCH","SQF":"SQUARE_FOOT","SQY":"SQUARE_YARD"}>
|
<#assign area_unit_KV_rfx = {"MM²":"SQUARE_MILLIMETER","CM²":"SQUARE_CENTIMETER","DM²":"SQUARE_DECIMETER","M²":"SQUARE_METER","SQI":"SQUARE_INCH","SQF":"SQUARE_FOOT","SQY":"SQUARE_YARD"}>
|
||||||
<#assign volume_unit_KV_rfx = {"MM³":"CUBIC_MILLIMETER","CM³":"CUBIC_CENTIMETER","DM³":"CUBIC_DECIMETER","M³":"CUBIC_METER","CI":"CUBIC_INCH","CF":"CUBIC_FOOT","CY":"CUBIC_YARD","ML":"MILLI_LITER","CL":"CENTI_LITER","DL":"DECI_LITER","LIT":"LITER","HL":"HECTO_LITER","FT":"US_FLUID_OUNCE","USG":"US_GAL","PI":"IMPERIAL_PINT","GL":"IMPERIAL_GAL"}>
|
<#assign volume_unit_KV_rfx = {"MM³":"CUBIC_MILLIMETER","CM³":"CUBIC_CENTIMETER","DM³":"CUBIC_DECIMETER","M³":"CUBIC_METER","CI":"CUBIC_INCH","CF":"CUBIC_FOOT","CY":"CUBIC_YARD","ML":"MILLI_LITER","CL":"CENTI_LITER","DL":"DECI_LITER","LIT":"LITER","HL":"HECTO_LITER","FT":"US_FLUID_OUNCE","USG":"US_GAL","PI":"IMPERIAL_PINT","GL":"IMPERIAL_GAL"}>
|
||||||
|
|
||||||
</#noparse>
|
</#noparse>
|
||||||
|
|
||||||
<#noparse><#assign length_unit_rfx = length_unit_KV_rfx[</#noparse>"${file.measurement_unit.length}"<#noparse>]!"CENTIMETER"></#noparse>
|
<#noparse><#assign length_unit_rfx = length_unit_KV_rfx[</#noparse>"${file.measurement_unit.length}"<#noparse>]!"CENTIMETER"></#noparse>
|
||||||
<#noparse><#assign distance_unit_rfx = length_unit_KV_rfx[</#noparse>"${file.measurement_unit.distance}"<#noparse>]!"CENTIMETER"></#noparse>
|
<#noparse><#assign distance_unit_rfx = length_unit_KV_rfx[</#noparse>"${file.measurement_unit.distance}"<#noparse>]!"CENTIMETER"></#noparse>
|
||||||
<#noparse><#assign transport_distance_unit_rfx = length_unit_KV_rfx[</#noparse>"${file.measurement_unit.transport_distance}"<#noparse>]!"CENTIMETER"></#noparse>
|
<#noparse><#assign transport_distance_unit_rfx = length_unit_KV_rfx[</#noparse>"${file.measurement_unit.transport_distance}"<#noparse>]!"CENTIMETER"></#noparse>
|
||||||
<#noparse><#assign weight_unit_rfx = weight_unit_KV_rfx[</#noparse>"${file.measurement_unit.weight}"<#noparse>]!"KILOGRAM"></#noparse>
|
<#noparse><#assign weight_unit_rfx = weight_unit_KV_rfx[</#noparse>"${file.measurement_unit.weight}"<#noparse>]!"KILOGRAM"></#noparse>
|
||||||
<#noparse><#assign area_unit_rfx = area_unit_KV_rfx[</#noparse>"${file.measurement_unit.area}"<#noparse>]!"SQUARE_METER"></#noparse>
|
<#noparse><#assign area_unit_rfx = area_unit_KV_rfx[</#noparse>"${file.measurement_unit.area}"<#noparse>]!"SQUARE_METER"></#noparse>
|
||||||
<#noparse><#assign volume_unit_rfx = volume_unit_KV_rfx[</#noparse>"${file.measurement_unit.volume}"<#noparse>]!"CUBIC_DECIMETER"></#noparse>
|
<#noparse><#assign volume_unit_rfx = volume_unit_KV_rfx[</#noparse>"${file.measurement_unit.volume}"<#noparse>]!"CUBIC_DECIMETER"></#noparse>
|
||||||
<#noparse><#assign number_of_litres_unit_rfx = volume_unit_KV_rfx[</#noparse>"${file.measurement_unit.litres_number}"<#noparse>]!"CUBIC_DECIMETER"></#noparse>
|
<#noparse><#assign number_of_litres_unit_rfx = volume_unit_KV_rfx[</#noparse>"${file.measurement_unit.litres_number}"<#noparse>]!"CUBIC_DECIMETER"></#noparse>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<#noparse><#assign time_zone_rfx = </#noparse>"${file.author_time_zone!"Europe/Paris"}<#noparse>"></#noparse>
|
<#noparse><#assign time_zone_rfx = </#noparse>"${file.author_time_zone!"UTC"}<#noparse>"></#noparse>
|
||||||
<#noparse><#assign time_zone_offset_rfx = </#noparse>"${file.time_zone_offset!"+01:00"}<#noparse>"></#noparse>
|
<#noparse><#assign time_zone_offset_rfx = </#noparse>"${file.time_zone_offset!"+00:00"}<#noparse>"></#noparse>
|
||||||
|
|
||||||
|
|
||||||
<#list file.reflex_platform_project_list?filter(l -> l.name == projectRP) as reflex_platform_project>
|
<#list file.reflex_platform_project_list?filter(l -> l.name == projectRP) as reflex_platform_project>
|
||||||
<#noparse><#assign text_language_rfx = </#noparse>"${reflex_platform_project.text_language!"en"}<#noparse>"></#noparse>
|
<#noparse><#assign text_language_rfx = </#noparse>"${reflex_platform_project.text_language!"en"}<#noparse>"></#noparse>
|
||||||
</#list>
|
</#list>
|
||||||
|
|
||||||
<#list file.reflex_platform_project_list?filter(j -> j.name == projectRP) as reflex_platform_project_uniqueness>
|
|
||||||
<#if reflex_platform_project_uniqueness.site_code_unicity??>
|
|
||||||
<#noparse><#assign uniqueness = </#noparse>${reflex_platform_project_uniqueness.site_code_unicity?c}<#noparse>></#noparse>
|
|
||||||
<#else>
|
|
||||||
<#noparse><#assign uniqueness = </#noparse>false<#noparse>></#noparse>
|
|
||||||
</#if>
|
|
||||||
</#list>
|
|
||||||
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user