Compare commits

..

106 Commits

Author SHA1 Message Date
f23a11933d Release 1.2.45+4 2025-10-16 15:47:44 +02:00
d77f51fa52 Merge branch 'release-1.2-SCPN1-9437' into 'release/1.2'
SCPN1-9437 to release1.2

See merge request r-d-technique/tiers/reflex-wms-connector!149
2025-10-16 13:39:18 +00:00
c8806baf5c SCPN1-9437
(cherry picked from commit 374ab5499448d8e8b78f2401d1c9fbb7c42cb8a3)
2025-10-16 15:10:27 +02:00
8ca2f62591 SCPN1-9437
(cherry picked from commit 8cafa21aa749f3b2ce43f7a675ad8ff09ff45938)
2025-10-16 15:10:20 +02:00
97dbd248f8 SCPN1-9437
(cherry picked from commit d787148aae3dad6c263a632412642ee0f2ba1dd0)
2025-10-16 15:10:12 +02:00
6bf2ea2329 SCPN1-9437
(cherry picked from commit 7786a93b25c235d7ed2202f63493451d857f38d6)
2025-10-16 15:10:01 +02:00
6bb1d45783 SCPN1-9437
(cherry picked from commit f05096636edcb4ba73d91a745a0d05f5a1e16f9b)
2025-10-16 15:09:41 +02:00
f373cbe734 Release 1.2.45+3 2025-09-26 09:22:26 +02:00
1256e3d68c Merge branch 'SCPN1-9348-1.2' into 'release/1.2'
SCPN1-9348-1.2

See merge request r-d-technique/tiers/reflex-wms-connector!140
2025-09-26 07:12:32 +00:00
983a59b592 SCPN1-9348
(cherry picked from commit cb2f8fe59e2dca1e7666ba4a9e92a1aecae91e0a)
2025-09-25 16:31:53 +02:00
eb6fc3f4a3 Release 1.2.45+2 2025-09-09 15:48:03 +02:00
8cf596e251 Merge branch 'SCPN1-9296-1.2-2' into 'release/1.2'
SCPN1-9296

See merge request r-d-technique/tiers/reflex-wms-connector!136
2025-09-09 13:46:36 +00:00
55070c8ce3 SCPN1-9296 2025-09-09 15:44:56 +02:00
928c05bff4 Release 1.2.45+1 2025-09-09 09:24:36 +02:00
2d8bdeb8a5 Merge branch 'SCPN1-9296-1.2' into 'release/1.2'
SCPN1-9296-1.2

See merge request r-d-technique/tiers/reflex-wms-connector!132
2025-09-09 07:22:34 +00:00
bb2aaae375 Correction list
(cherry picked from commit 7d874d7a687d4b4333117e4c0b169257c27484a5)
2025-09-09 09:00:24 +02:00
f4286949f7 Renotified
(cherry picked from commit 68668789b6dfb4bdc16e6cade450077028b6b2a2)
2025-09-08 18:02:43 +02:00
6d6a56710b Release 1.2.44+2 2025-09-08 10:42:36 +02:00
9b93729ab4 Merge branch 'SCPN1-9288-1.2' into 'release/1.2'
SCPN1-9288-1.2

See merge request r-d-technique/tiers/reflex-wms-connector!128
2025-09-08 08:38:28 +00:00
18c4959a62 Correction 080925
(cherry picked from commit 0ad605af1d252d3b15ac8bb736adc9141fa8b84f)
2025-09-08 10:13:17 +02:00
efe3ac2134 Corrections 250908
(cherry picked from commit 17830c1c6e8a82f68b825882699e7ab1dc5d91e8)
2025-09-08 10:12:23 +02:00
0d162d5de2 Correction 080925
(cherry picked from commit 0ad605af1d252d3b15ac8bb736adc9141fa8b84f)
2025-09-08 10:12:03 +02:00
77421779f3 Release 1.2.44+1 2025-08-26 16:22:14 +02:00
ff59e45573 Merge branch 'v11-connector1.2' into 'release/1.2'
v11-connector1.2

See merge request r-d-technique/tiers/reflex-wms-connector!125
2025-08-26 13:55:41 +00:00
ce32967617 Merge branch 'develop-1.2' into v11-connector-1.2
# Conflicts:
#	README.md
#	RFXtoRP_HsrReceiptList.ftl
2025-08-26 15:33:06 +02:00
df15106ef5 Release 1.2.43+1 2025-08-26 11:01:08 +02:00
127e69db7b Modifs line ref trf hsaipgmove receipt 2025-08-26 10:27:57 +02:00
ff01a944e4 Readme 2025-08-07 16:39:01 +02:00
18ac89f664 Modifs Optional_attributes 2025-08-07 10:58:08 +02:00
499a16796a Modif RPtoRFX_Receipt 2025-08-07 09:46:44 +02:00
8863cd66a7 Controle line_list 2025-08-06 11:13:02 +02:00
27a762caa8 ODP confirmed 2025-08-05 17:06:20 +02:00
649452207d modifs goods received 2025-07-23 15:45:50 +02:00
2d1fefd96f suppression commentaires 2025-07-18 11:31:24 +02:00
06376dd2d7 suppression commentaires 2025-07-18 11:08:12 +02:00
9642b8b8ad revert 2025-07-17 16:30:16 +02:00
7d998634d3 revert 2025-07-17 14:08:14 +02:00
7bf9d3c674 Revert "SCPN1-8865"
This reverts commit 8cd98b86380e36efe8f4e6f216c70fcd657804d9.
2025-07-17 13:59:57 +02:00
632cc2b647 dispute 2025-07-17 10:24:02 +02:00
27f2d525dc SCPN1-9084
(cherry picked from commit 3d2670b9a23d1106773d0881e62c0f5ae1409241)
2025-07-15 16:23:35 +02:00
3d95e5f3a2 Release 1.2.42+1 2025-07-10 11:32:59 +02:00
c370b967e6 Merge branch 'SCPN1-8991-8980-9059-1.2' into 'release/1.2'
SCPN1-8991-8980-9059-1.2

See merge request r-d-technique/tiers/reflex-wms-connector!120
2025-07-10 09:31:57 +00:00
835b8062ee SCPN1-9059 2025-07-10 09:57:26 +02:00
017cd65077 SCPN1-9059 2025-07-10 09:52:33 +02:00
64e863bdfc SCPN1-9059 2025-07-09 18:14:43 +02:00
e50893e8c9 SCPN1-9059 2025-07-09 15:09:39 +02:00
592ccb8905 SCPN1-9059 2025-07-09 15:01:36 +02:00
ddab0673d4 modif date cancelled 2025-07-07 16:15:49 +02:00
42237b2029 modif réception date 2025-07-07 16:11:37 +02:00
8c228dd0eb modif réception 2025-07-07 15:58:10 +02:00
cded3aa0e3 Modifs réception 2025-07-07 15:52:22 +02:00
5c4dc74bb8 modif receipt 2025-07-07 15:42:42 +02:00
9f34588a6a Receipt 2025-07-07 15:41:19 +02:00
16f4e35c02 modif receipt expected 2025-07-04 17:02:52 +02:00
9b8a5ad5c6 modifs recipt canceled 2025-07-04 16:51:30 +02:00
676fab0fea Modif receipt completed 2025-07-04 16:44:58 +02:00
297e3ea4c8 modif réception 2025-07-04 16:10:01 +02:00
58118c394b Correction HsrPrepa_Carrier 2025-07-04 15:05:14 +02:00
83a1f59edf SCPN1-8865 2025-07-03 16:40:53 +02:00
890768f89a SCPN1-8865 2025-07-03 16:33:56 +02:00
0a5ec7329c SCPN1-8863 2025-07-03 16:09:48 +02:00
9999313dfc SCPN1-8865 2025-07-03 15:02:19 +02:00
dd4d31b443 SCPN1-8865 2025-07-03 15:01:26 +02:00
c1704af84d SCPN1-8987
(cherry picked from commit bcd2d995c295ebd2a0d72b3b426936bcf42010c0)
2025-07-02 15:51:31 +02:00
a248dc16ed ajout controle 2025-07-02 15:05:35 +02:00
aec4e6068e SCPN1-8980
(cherry picked from commit 899cdd25086573ce2944685c6f5347dba3761f1d)
2025-07-02 14:37:13 +02:00
dfdfbdeb15 SCPN1-8865 2025-07-02 10:28:24 +02:00
d875085657 SCPN1-8991
(cherry picked from commit 9d7293d92eb9f4b07886ab11f7ed59a2a6f7aaa1)
2025-07-01 15:43:57 +02:00
9d7293d92e SCPN1-8991 2025-07-01 15:42:26 +02:00
899cdd2508 SCPN1-8980 2025-06-30 13:47:50 +02:00
d1f251ba32 modif statut 2025-06-25 17:08:44 +02:00
30337cc003 SCPN1-8863 2025-06-24 17:35:46 +02:00
24f7b8b36a SCPN1-8863 2025-06-24 17:24:32 +02:00
a1b063a9d4 SCPN1-8863 2025-06-24 17:05:41 +02:00
88fa6bd2af SCPN1-8863 2025-06-24 16:50:59 +02:00
01b2706cb5 SCPN1-8865 2025-06-24 16:35:38 +02:00
8cd98b8638 SCPN1-8865 2025-06-24 16:20:04 +02:00
4c8ab232d0 SCPN1-8870 2025-06-24 15:39:30 +02:00
3d816434af SCPN1-8870 2025-06-24 15:28:59 +02:00
9f0bedc583 Modifs 2025-06-24 10:54:23 +02:00
86d0974c2f Release 1.2.41+1 2025-06-20 17:56:35 +02:00
8abf2771ba SCPN1-8865 2025-06-20 16:39:19 +02:00
8229616050 SCPN1-8870 2025-06-16 10:52:41 +02:00
d6a7398af1 Release 1.2.40+1 2025-05-27 09:56:37 +02:00
7a77f373cc Merge branch 'SCPN1-8800-1.2' into 'release/1.2'
SCPN1-8800 into release 1.2

See merge request r-d-technique/tiers/reflex-wms-connector!110
2025-05-27 07:11:07 +00:00
6af5f05491 SCPN1-8800
(cherry picked from commit 5581b8cd299a6c89612c9c26678e1cd72596e054)
2025-05-26 16:58:18 +02:00
5581b8cd29 SCPN1-8800 2025-05-26 10:03:49 +02:00
10def5ca60 Release 1.2.39+2 2025-05-13 14:43:31 +02:00
6db75e83e0 Merge branch 'SCPN1-8728-8696-1.2' into 'release/1.2'
SCPN1-8728-8696-1-2

See merge request r-d-technique/tiers/reflex-wms-connector!107
2025-05-13 12:40:03 +00:00
af9ff73850 SCPN1-8728-8696 2025-05-13 14:26:35 +02:00
cf5ef67c23 SCPN1-8728-8696 2025-05-13 11:36:23 +02:00
09df74f0e0 SCPN1-8729 2025-05-12 14:22:34 +02:00
0ea5a04d6b SCPN1-8696 2025-04-28 14:03:08 +02:00
777197b26b clean README 2025-04-25 13:10:06 +00:00
a23e6654f1 clean README 2025-04-25 09:54:47 +00:00
b7eab6ccfd clean README 2025-04-25 09:53:11 +00:00
c58772f755 clean README 2025-04-25 09:39:58 +00:00
fbaddfe891 clean README 2025-04-25 09:00:02 +00:00
df4377f77d clean README 2025-04-25 08:56:34 +00:00
65795a6077 SCPN1-8583 2025-04-24 15:47:22 +02:00
b3cbfeb1a8 Release 1.2.39+1 2025-04-24 14:28:38 +02:00
29e4acfca4 Release 1.2.38+2 2025-04-15 18:32:12 +02:00
aa68eb52e9 Merge branch 'to-v10-connector1.2' into 'release/1.2'
update FTL

See merge request r-d-technique/tiers/reflex-wms-connector!100
2025-04-15 16:24:24 +00:00
320bd8988b update FTL 2025-04-15 18:15:06 +02:00
9a55811bfc delete ftl not use 2025-04-15 17:52:33 +02:00
1905105118 Release 1.2.38+1 2025-04-11 10:38:27 +02:00
84 changed files with 1059 additions and 2023 deletions

View File

@ -1,10 +1,10 @@
# HARDIS SC NETWORK Core FTLs
# Reflex Platform Core FTLs
## Overview
The **HARDIS WMS Connector** is a set of **FreeMarker templates (FTL)** designed to transform **outgoing JSON flows from HARDIS WMS** into **flows compatible with HARDIS SC NETWORK**.
The **Reflex WMS Connector** is a set of **FreeMarker templates (FTL)** designed to transform **outgoing JSON flows from Reflex WMS** into **flows compatible with Reflex Platform**.
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.
This connector does not contain any standalone executable code: it is intended to be used by **Reflex integration engines** or **data exchange pipelines**, where it applies the mapping rules defined in the `.ftl` files.
## Role of the FTL Files
@ -12,9 +12,9 @@ This connector does not contain any standalone executable code: it is intended t
- 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.
- Generate a **final structured JSON** for Reflex Platform.
## Useful Resources
- [FreeMarker Documentation](https://freemarker.apache.org/docs/index.html)
- [HARDIS SC NETWORK](https://auth.reflex-platform.com/)
- [Reflex Platform](https://auth.reflex-platform.com/)

View File

@ -1,60 +1,60 @@
<#-- **** input parameters ***** -->
<#-- input : message HARDIS WMS -->
<#-- project : projectId in HARDIS SC NETWORK -->
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
<#-- sum_elt : nb element in snapshot (optional parameter) -->
<#include "HfRpConfig.ftl">
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
<#assign organisationRP = organisation>
<#switch cloudEventMsg.action>
<#case "C">
<#case "U">
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign reflexStockPicturesInterface = JsonUtil.jsonToMap(dataRfx)>
<#-- idSnapshot MUST BE UNIQUE regardless of the number of messages in the stock image -->
<#if cloudEventMsg.messageSet??>
<#assign idSnapshot = cloudEventMsg.messageSet />
<#else>
<#assign idSnapshot = cloudEventMsg.id />
</#if>
<#list reflexStockPicturesInterface.detailled_stock_list as stock>
<#if stock.stock_type_code != "200">
<#stop>
<#break>
</#if>
</#list>
[
{
<#if sum_elt??>
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorSnapshotCompleted>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HfDtlStockLs_ActorSnapshotCompleted.ftl">
<#else>
<#assign apiReflexPlatformID = ApiReflexPlatformID.StockSnapshotted>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HfDtlStockLs_StockSnapshotted.ftl">
</#if>
}
]
<#break>
<#case "D">
<#-- *********************************************** Action = DELETE ******************** -->
<#stop >
<#break>
<#default>
<#stop >
</#switch>
<#-- **** input parameters ***** -->
<#-- input : message RFX -->
<#-- project : projectId in ReflexPlatform -->
<#-- organisation : organisationtId in ReflexPlatform -->
<#-- sum_elt : nb element in snapshot (optional parameter) -->
<#include "HfRpConfig.ftl">
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
<#assign organisationRP = organisation>
<#switch cloudEventMsg.action>
<#case "C">
<#case "U">
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign reflexStockPicturesInterface = JsonUtil.jsonToMap(dataRfx)>
<#-- idSnapshot MUST BE UNIQUE regardless of the number of messages in the stock image -->
<#if cloudEventMsg.messageSet??>
<#assign idSnapshot = cloudEventMsg.messageSet />
<#else>
<#assign idSnapshot = cloudEventMsg.id />
</#if>
<#list reflexStockPicturesInterface.detailled_stock_list as stock>
<#if stock.stock_type_code != "200">
<#stop>
<#break>
</#if>
</#list>
[
{
<#if sum_elt??>
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorSnapshotCompleted>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HfDtlStockLs_ActorSnapshotCompleted.ftl">
<#else>
<#assign apiReflexPlatformID = ApiReflexPlatformID.StockSnapshotted>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HfDtlStockLs_StockSnapshotted.ftl">
</#if>
}
]
<#break>
<#case "D">
<#-- *********************************************** Action = DELETE ******************** -->
<#stop >
<#break>
<#default>
<#stop >
</#switch>

View File

@ -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 -->
<#--

View File

@ -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
*** -->

View File

@ -1,7 +1,7 @@
<#-- **** input parameters ***** -->
<#-- input : message HARDIS WMS -->
<#-- project : projectId in HARDIS SC NETWORK -->
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
<#-- input : message RFX -->
<#-- project : projectId in ReflexPlatform -->
<#-- organisation : organisationtId in ReflexPlatform -->
<#include "ReflexUtils.ftl">
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
@ -13,89 +13,17 @@
<#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>
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign preparationOrderLines = JsonUtil.jsonToMap(dataRfx)>
<#stop "no generic FTL file available yet for preparationOrderLines">
<#break>
<#case "D">
<#-- *********************************************** Action = DELETE ******************** -->
<#stop>
<#-- *********************************************** Action = DELETE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign preparationOrderLines = JsonUtil.jsonToMap(dataRfx)>
<#stop "no generic FTL file available yet for preparationOrderLines">
<#break>
<#break>
<#default>

View File

@ -1,7 +1,7 @@
<#-- **** input parameters ***** -->
<#-- input : message HARDIS WMS -->
<#-- project : projectId in HARDIS SC NETWORK -->
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
<#-- input : message RFX -->
<#-- project : projectId in ReflexPlatform -->
<#-- organisation : organisationtId in ReflexPlatform -->
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
@ -11,151 +11,22 @@
<#switch cloudEventMsg.action>
<#case "C">
<#case "U">
<#-- *********************************************** 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">
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign receiptLines = JsonUtil.jsonToMap(dataRfx)>
}
]
<#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>
<#stop "no generic FTL file available yet for receiptLines">
<#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>
<#assign receiptLines = JsonUtil.jsonToMap(dataRfx)>
<#stop "no generic FTL file available yet for receiptLines">
<#break>
<#default>
<#stop >

View File

@ -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>
}
}
]

View File

@ -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>
]

View File

@ -1,7 +1,7 @@
<#-- **** input parameters ***** -->
<#-- input : message HARDIS WMS -->
<#-- project : projectId in HARDIS SC NETWORK -->
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
<#-- input : message RFX -->
<#-- project : projectId in ReflexPlatform -->
<#-- organisation : organisationtId in ReflexPlatform -->
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
@ -12,53 +12,20 @@
<#switch cloudEventMsg.action>
<#case "C">
<#case "U">
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
<#-- *********************************************** 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>
<#assign preparationOrderLines = JsonUtil.jsonToMap(dataRfx)>
<#stop "no generic FTL file available yet for preparationOrderLines">
<#break>
<#case "D">
<#-- *********************************************** Action = DELETE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign 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>
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign preparationOrderLines = JsonUtil.jsonToMap(dataRfx)>
<#stop "no generic FTL file available yet for preparationOrderLines">
<#break>
<#default>
<#stop >
</#switch>

View File

@ -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>
}
}
]

View File

@ -1,10 +1,7 @@
<#-- **** input parameters ***** -->
<#-- input : message HARDIS WMS -->
<#-- project : projectId in HARDIS SC NETWORK -->
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
<#-- input : message RFX -->
<#-- project : projectId in ReflexPlatform -->
<#-- organisation : organisationtId in ReflexPlatform -->
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
@ -20,7 +17,7 @@
<#assign carrier = JsonUtil.jsonToMap(dataRfx)>
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreatedv2>
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaCarrier_ActorCreated.ftl">

View File

@ -1,3 +1,6 @@
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[
{
"Header": {
@ -8,13 +11,17 @@
},
"Payload": {
"Name": "${carrier.carrier_designation?json_string}",
"ManagedStock": false,
"IsCarrier": true,
<#-- ***Partner ID could be added here *** -->
<#-- "PartnerID": "${}", -->
<#include "RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl">,
"Address":
{
<#-- if HARDIS WMS address is structured -->
<#-- if Reflex WMS address is structured -->
<#if carrier.carrier_structured_address?? >
"Name": "${carrier.carrier_structured_address.name_or_company?json_string}",
@ -30,7 +37,8 @@
</#if>
"ProvinceCode": "${carrier.carrier_structured_address.territorial_div_code?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>
<#if carrier.address??>
"Name": "${carrier.address.company_name?json_string}",

View File

@ -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": [ ]

View File

@ -1,3 +1,6 @@
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[
{
"Header": {

View File

@ -1,10 +1,7 @@
<#-- **** input parameters ***** -->
<#-- input : message HARDIS WMS -->
<#-- project : projectId in HARDIS SC NETWORK -->
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
<#-- input : message RFX -->
<#-- project : projectId in ReflexPlatform -->
<#-- organisation : organisationtId in ReflexPlatform -->
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
@ -18,15 +15,14 @@
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
[
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreatedv2>
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaCons_ActorCreated.ftl">
}
]
<#break>
<#case "D">

View File

@ -1,3 +1,6 @@
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[
{
"Header": {
@ -8,13 +11,19 @@
},
"Payload": {
"Name": "${actor.designation?json_string}",
"ManagedStock": false,
"IsCarrier": false,
<#-- ***Partner ID could be added here *** -->
<#-- "PartnerID": "${}", -->
<#include "RFXtoRP_HsaCons_ActorCreated_Metadata.ftl">,
"Address":
{
<#-- if HARDIS WMS is structured -->
<#-- if Reflex WMS is structured -->
<#if actor.consignee_structured_address??>
"Name": "${actor.consignee_structured_address.name_or_company?json_string}",
@ -31,7 +40,7 @@
"ProvinceCode": "${actor.consignee_structured_address.territorial_div_code?json_string}",
"State": "${actor.consignee_structured_address.country_designation?json_string}"
<#-- if HARDIS WMS is not structured -->
<#-- if Reflex WMS is not structured -->
<#else>
<#if actor.address?? >

View File

@ -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": [ ]

View File

@ -1,3 +1,6 @@
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[
{
"Header": {

View File

@ -1,7 +1,7 @@
<#-- **** input parameters ***** -->
<#-- input : message HARDIS WMS -->
<#-- project : projectId in HARDIS SC NETWORK -->
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
<#-- input : message RFX -->
<#-- project : projectId in ReflexPlatform -->
<#-- organisation : organisationtId in ReflexPlatform -->
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
@ -16,14 +16,15 @@
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign dispute = JsonUtil.jsonToMap(dataRfx)>
[
<#if dispute.dispute_closed == true >
<#if dispute.dispute_closed == true >
<#if ((dispute.dispute_type_code=="030" || dispute.dispute_type_code=="070") && dispute.dispute_reception?? && dispute.dispute_reception.reception_reference!="") || (dispute.dispute_type_code=="050" && dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string!="")>
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimCreated>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaDispute_Created.ftl">
}
<#if TableReasonCode[dispute.dispute_reason_code]??>
<#if TableReasonCode[dispute.dispute_reason_code]??>
,
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimMessageSent>
@ -31,9 +32,13 @@
"datas" :
<#include "RFXtoRP_HsaDispute_MessageSent.ftl">
}
<#else>
<#else>
<#stop>
</#if>
<#else>
<#-- "Reference is empty"-->
<#stop>
</#if>
</#if>
]
<#break>

View File

@ -8,7 +8,7 @@
},
"ID": {
<#if dispute.dispute_preparation??>
<#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0>
<#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" >
@ -21,7 +21,7 @@
},
"Payload": {
<#if dispute.dispute_reference?? && dispute.dispute_reference!="">
"Title":"${dispute.dispute_reference?json_string}",
"Title":"${dispute.dispute_reference?trim?json_string}",
<#else>
"Title":"",
</#if>
@ -43,44 +43,22 @@
<#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>
<#if dispute.dispute_type_code=="050" >
"EntityID":"${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string}",
"DisplayID":"${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string}",
<#else>
<#if dispute.dispute_type_code=="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 dispute.dispute_type_code=="070" || dispute.dispute_type_code=="030" >
"EntityID":"${dispute.dispute_reception.reception_reference?trim?json_string}",
"DisplayID":"${dispute.dispute_reception.reception_reference?trim?json_string}",
<#else>
<#stop "WMS type code not supported">
</#if>
</#if>
<#if TableReasonCode[dispute.dispute_reason_code]??>
"ClaimTypeID":"CLAIMTYPE_${projectRP}_EXECUTIONFLOW_${TableReasonCode[dispute.dispute_reason_code]}"
"ClaimTypeID":"CLAIMTYPE_${projectRP}_ORDER_${TableReasonCode[dispute.dispute_reason_code]}"
<#else>
<#stop "Claim reason code not supported" >
<#stop "Reason code not supported">
</#if>
}
}
@ -88,4 +66,3 @@

View File

@ -21,7 +21,7 @@
"Goods": {
"ItemID": "${reflexMvtStockInterface.item_code?trim?json_string}",
"LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}",
<#if (priority_date!="") && (priority_date?starts_with("00")== false) >
<#if (reflexMvtStockInterface.ipg_priority_date!="") && (reflexMvtStockInterface.ipg_priority_date?starts_with("00")== false) >
"PriorityDate": "${priority_date}",
<#else>
"PriorityDate": "1970-01-01T00:00:00Z",
@ -31,24 +31,24 @@
},
<#if reflexMvtStockInterface.ipg_move_type?? & reflexMvtStockInterface.ipg_move_type=="120"> <#-- if it is a transfer-type movement -->
<#if reflexMvtStockInterface.origin_order_line_reference?? && reflexMvtStockInterface.origin_order_line_reference!="">
"ExecutionflowID": "${reflexMvtStockInterface.original_receipt_physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.origin_order_line_reference?trim?json_string}",
"ExecutionflowID": "${reflexMvtStockInterface.origin_order_line_reference?trim?json_string}",
"OrderID": "${reflexMvtStockInterface.origin_order_line_reference?trim?json_string}",
<#else>
<#if reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!="">
"ExecutionflowID": "${reflexMvtStockInterface.original_receipt_physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_reference?trim?json_string}",
"ExecutionflowID": "${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}",
"ExecutionflowID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_year_number}${reflexMvtStockInterface.receipt_number}",
"OrderID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_year_number}${reflexMvtStockInterface.receipt_number}",
</#if>
</#if>
<#else>
<#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}",
"ExecutionflowID": "${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}",
"ExecutionflowID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_year_number}${reflexMvtStockInterface.receipt_number}",
"OrderID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_year_number}${reflexMvtStockInterface.receipt_number}",
</#if>
</#if>
<#if reflexMvtStockInterface.origin_order_line_number_reference?? && reflexMvtStockInterface.origin_order_line_number_reference!=0>
@ -66,4 +66,4 @@
}
}
]
]

View File

@ -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": [
{

View File

@ -1,7 +1,7 @@
<#-- **** input parameters ***** -->
<#-- input : message HARDIS WMS -->
<#-- project : projectId in HARDIS SC NETWORK -->
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
<#-- input : message RFX -->
<#-- project : projectId in ReflexPlatform -->
<#-- organisation : organisationtId in ReflexPlatform -->
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>

View File

@ -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": [ ]

View File

@ -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": [ ]

View File

@ -1,40 +1,40 @@
<#-- **** 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 >
<#-- **** input parameters ***** -->
<#-- input : message RFX -->
<#-- project : projectId in ReflexPlatform -->
<#-- organisation : organisationtId in ReflexPlatform -->
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
<#assign organisationRP = organisation>
<#assign aDateTime = .now>
<#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>

View File

@ -1,7 +1,7 @@
<#-- **** input parameters ***** -->
<#-- input : message HARDIS WMS -->
<#-- project : projectId in HARDIS SC NETWORK -->
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
<#-- input : message RFX -->
<#-- project : projectId in ReflexPlatform -->
<#-- organisation : organisationtId in ReflexPlatform -->
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
@ -17,52 +17,57 @@
<#assign preparationStatusInterface = JsonUtil.jsonToMap(dataRfx) />
[
<#--**Pick batch runned (200) **-->
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "200" >
<#if preparationStatusInterface.preparation_order_originator_reference?? && preparationStatusInterface.preparation_order_originator_reference!="">
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "200" >
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationExpected>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaProStatus_PreparationExpected.ftl">
}
<#else>
<#-- ** Collection started (300) and Preparation in progress (400)** -->
<#if preparationStatusInterface.preparation_status_type == "100" && (preparationStatusInterface.preparation_status_code == "300" || preparationStatusInterface.preparation_status_code == "400") >
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationExpected>
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationStarted>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaProStatus_PreparationExpected.ftl">
<#include "RFXtoRP_HsaProStatus_PreparationStarted.ftl">
}
<#else>
<#-- ** Collection started (300) and Preparation in progress (400)** -->
<#if preparationStatusInterface.preparation_status_type == "100" && (preparationStatusInterface.preparation_status_code == "300" || preparationStatusInterface.preparation_status_code == "400") >
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationStarted>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaProStatus_PreparationStarted.ftl">
}
<#else>
<#-- ****Preparation dispatched (600)** -->
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "600" >
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationCompleted>
<#-- ****Preparation dispatched (600)** -->
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "600" >
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationCompleted>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaProStatus_PreparationCompleted.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowTransportStarted>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaProStatus_PreparationCompleted.ftl">
},
<#include "RFXtoRP_HsaProStatus_TransportStarted.ftl">
}
<#else>
<#-- ****Preparation cancelled (650)**** -->
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "650" >
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowTransportStarted>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaProStatus_TransportStarted.ftl">
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaProStatus_ExecutionflowCancelled.ftl">
}
<#else>
<#-- ****Preparation cancelled (650)**** -->
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "650" >
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaProStatus_ExecutionflowCancelled.ftl">
}
<#else>
<#stop>
</#if>
<#stop>
</#if>
</#if>
</#if>
</#if>
<#else>
<#--PRO reference is empty-->
<#stop >
</#if>
]
<#break>

View File

@ -8,11 +8,7 @@
"ProjectID": "${projectRP}"
},
"ID": {
<#if preparationStatusInterface.preparation_order_originator_reference?? && preparationStatusInterface.preparation_order_originator_reference!="">
"RefID": "${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
<#else>
"RefID": "O${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_year}${preparationStatusInterface.preparation_order_number}",
</#if>
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
"RefDate": {
"DateTime": "${preparation_status_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"

View File

@ -7,11 +7,7 @@
"ProjectID": "${projectRP}"
},
"ID": {
<#if preparationStatusInterface.preparation_order_originator_reference?? && preparationStatusInterface.preparation_order_originator_reference!="">
"RefID": "${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
<#else>
"RefID": "O${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_year}${preparationStatusInterface.preparation_order_number}",
</#if>
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
"RefDate": {
"DateTime": "${preparation_status_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"

View File

@ -7,14 +7,10 @@
"ProjectID": "${projectRP}"
},
"ID": {
<#if preparationStatusInterface.preparation_order_originator_reference?? && preparationStatusInterface.preparation_order_originator_reference!="">
"RefID": "${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
<#else>
"RefID": "O${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_year}${preparationStatusInterface.preparation_order_number}",
</#if>
"RefDate": {
"DateTime": "${preparation_status_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
"RefDate": {
"DateTime": "${preparation_status_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"
}
},

View File

@ -7,14 +7,10 @@
"ProjectID": "${projectRP}"
},
"ID": {
<#if preparationStatusInterface.preparation_order_originator_reference?? && preparationStatusInterface.preparation_order_originator_reference!="">
"RefID": "${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
<#else>
"RefID": "O${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_year}${preparationStatusInterface.preparation_order_number}",
</#if>
"RefDate": {
"DateTime": "${preparation_status_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
"RefDate": {
"DateTime": "${preparation_status_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"
}
},

View File

@ -7,14 +7,10 @@
"ProjectID": "${projectRP}"
},
"ID": {
<#if preparationStatusInterface.preparation_order_originator_reference?? && preparationStatusInterface.preparation_order_originator_reference!="">
"RefID": "${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
<#else>
"RefID": "O${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_year}${preparationStatusInterface.preparation_order_number}",
</#if>
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
"RefDate": {
"DateTime": "${preparation_status_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"
"DateTime": "${preparation_status_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"
}
},

View File

@ -2,9 +2,6 @@
<#-- input : message RFX -->
<#-- project : projectId in ReflexPlatform -->
<#-- organisation : organisationtId in ReflexPlatform -->
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
@ -20,7 +17,7 @@
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreatedv2>
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaSup_ActorCreated.ftl">

View File

@ -1,3 +1,6 @@
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[
{
"Header": {
@ -8,14 +11,18 @@
},
"Payload": {
"Name": "${actor.designation?json_string}",
"ManagedStock": false,
"IsCarrier": false,
<#-- ***Partner ID could be added here *** -->
<#-- "PartnerID": "${}", -->
<#include "RFXtoRP_HsaSup_ActorCreated_Metadata.ftl">,
"Address":
{
<#-- if HARDIS WMS address is structured -->
<#-- if Reflex WMS address is structured -->
<#if actor.supplier_structured_address?? >
"Name": "${actor.supplier_structured_address.name_or_company?json_string}",
"StreetAddressOne" : "${actor.supplier_structured_address.street_and_PO?json_string}",
"StreetAddressTwo" : "${actor.supplier_structured_address.additionnal_data?json_string}",
@ -29,7 +36,8 @@
</#if>
"ProvinceCode": "${actor.supplier_structured_address.territorial_div_code?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>
<#if actor.optional_attributes?? >
"Name": "${actor.optional_attributes.company_name?json_string}",
@ -39,6 +47,7 @@
"CountryCode" : ""
</#if>
</#if>
},
<#if actor.optional_attributes?? >
"Phones": ["${actor.optional_attributes.telephone?json_string}",

View File

@ -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": [ ]

View File

@ -1,3 +1,6 @@
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[
{
"Header": {

View File

@ -1,40 +1,40 @@
<#-- **** 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 >
<#-- **** input parameters ***** -->
<#-- input : message RFX -->
<#-- project : projectId in ReflexPlatform -->
<#-- organisation : organisationtId in ReflexPlatform -->
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
<#assign organisationRP = organisation>
<#assign aDateTime = .now>
<#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>

View File

@ -1,7 +1,7 @@
<#-- **** input parameters ***** -->
<#-- input : message HARDIS WMS -->
<#-- project : projectId in HARDIS SC NETWORK -->
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
<#-- input : message RFX -->
<#-- project : projectId in ReflexPlatform -->
<#-- organisation : organisationtId in ReflexPlatform -->
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
@ -17,7 +17,7 @@
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreatedv2>
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrDepot_ActorCreated.ftl">

View File

@ -11,12 +11,20 @@
},
"Payload": {
"Name": "${depot.physical_depot_designation?json_string}",
"ManagedStock": true,
"IsCarrier": false,
<#-- ***Partner ID could be added here *** -->
<#-- "PartnerID": "${}", -->
<#include "RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl">,
"Address":
{
<#-- if HARDIS WMS address is structured -->
<#-- if Reflex WMS address is structured -->
<#if depot.physical_depot_structured_address?? >
"Name": "${depot.physical_depot_structured_address.name_or_company?json_string}",
"StreetAddressOne" : "${depot.physical_depot_structured_address.street_and_PO?json_string}",
"StreetAddressTwo" : "${depot.physical_depot_structured_address.additionnal_data?json_string}",
@ -30,7 +38,8 @@
</#if>
"ProvinceCode": "${depot.physical_depot_structured_address.territorial_div_code?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>
<#if depot.physical_depot_address??>
"Name": "${depot.physical_depot_address.company_name?json_string}",

View File

@ -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": [ ]

View File

@ -1,40 +1,40 @@
<#-- **** 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 >
<#-- **** input parameters ***** -->
<#-- input : message RFX -->
<#-- project : projectId in ReflexPlatform -->
<#-- organisation : organisationtId in ReflexPlatform -->
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
<#assign organisationRP = organisation>
<#assign aDateTime = .now>
<#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>

View File

@ -1,7 +1,7 @@
<#-- **** input parameters ***** -->
<#-- input : message HARDIS WMS -->
<#-- project : projectId in HARDIS SC NETWORK -->
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
<#-- input : message RFX -->
<#-- project : projectId in ReflexPlatform -->
<#-- organisation : organisationtId in ReflexPlatform -->
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>

View File

@ -1,7 +1,7 @@
<#-- **** input parameters ***** -->
<#-- input : message HARDIS WMS -->
<#-- project : projectId in HARDIS SC NETWORK -->
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
<#-- input : message RFX -->
<#-- project : projectId in ReflexPlatform -->
<#-- organisation : organisationtId in ReflexPlatform -->
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>

View File

@ -1,7 +1,7 @@
<#-- **** input parameters ***** -->
<#-- input : message HARDIS WMS -->
<#-- project : projectId in HARDIS SC NETWORK -->
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
<#-- input : message RFX -->
<#-- project : projectId in ReflexPlatform -->
<#-- organisation : organisationtId in ReflexPlatform -->
<#include "ReflexUtils.ftl">
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
@ -17,64 +17,69 @@
<#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??>
[
<#if preparationOrder.total_lv_validated !=0>
<#if preparationOrder.preparation_line_lst??>
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsPrepared>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl">
}
<#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="">
,
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsPrepared>
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCarrierUpdated>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl">
<#include "RFXtoRP_HsrPrepa_CarrierUpdated.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.OrderCarrierUpdated>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl">
}
</#if>
<#assign refIDHmap ={}>
<#assign hd_numberHmap ={}>
<#assign hd_numberHmapHUadded ={}>
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") as preparation_line>
<#list preparation_line.despatched_ipg_list as despatched_ipg>
<#assign HUadded_packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) />
<#if (!hd_numberHmap[despatched_ipg.hd_number]?? || !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_HandlingUnitDispatched.ftl">
<#include "RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl">
}
<#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="">
,
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCarrierUpdated>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_CarrierUpdated.ftl">
}
</#if>
<#assign refIDHmap ={}>
<#assign hd_numberHmap ={}>
<#assign hd_numberHmapHUadded ={}>
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? ) as preparation_line>
<#list preparation_line.despatched_ipg_list as despatched_ipg>
<#assign HUadded_packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) />
<#if (!hd_numberHmap[despatched_ipg.hd_number]?? || !hd_numberHmap[despatched_ipg.carton_number]??) && (trackingNumberSource==2 || trackingNumberSource==3 || (despatched_ipg.consignment_unit_id!="" && trackingNumberSource==1))>
,
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl">
}
</#if>
<#if despatched_ipg.carton_number != "000000000000000000" && despatched_ipg.carton_number!=despatched_ipg.hd_number >
,
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitHUsAdded>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_HandlingunitHUsAdded.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl">
}
<#if !hd_numberHmapHUadded[despatched_ipg.hd_number]?? && (trackingNumberSource==2 || trackingNumberSource==3 )>
<#if !hd_numberHmapHUadded[despatched_ipg.hd_number]?? && (trackingNumberSource==2 || trackingNumberSource==3 )>
<#assign hd_numberHmapHUadded += {despatched_ipg.hd_number,despatched_ipg.hd_number}>
,
{
@ -85,22 +90,18 @@
}
</#if>
</#if>
</#list>
</#if>
</#list>
<#assign refIDHmap ={}>
]
<#else>
<#-- No line-->
<#stop>
</#if>
</#list>
<#assign refIDHmap ={}>
]
<#else>
<#-- Preparation Type not supported-->
<#stop>
<#-- No line-->
<#stop >
</#if>
<#else>
<#-- no confirmed quantity for the preparation - preparation closed-->
<#stop>
<#stop >
</#if>

View File

@ -3,35 +3,31 @@
<#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>
<#list preparationOrder.preparation_line_lst?filter(l ->l.preparation_order_originator_reference!="") as preparation_line>
<#assign OrderOriginReference = preparation_line.preparation_order_originator_reference?trim?json_string>
<#if !refIDHmap_local[OrderOriginReference]?? >
<#if refIDHmap_local?size != 0 >
,
</#if>
<#assign refIDHmap_local +={OrderOriginReference,OrderOriginReference}>
{
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID":{
"RefID": "${OrderOriginReference}"
"RefID": "${OrderOriginReference}"
},
"Payload":{
"Carrier": {
"ActorID": "${RFXtoRPprefixCarrier(preparationOrder.load_data.carrier_code?trim?json_string)}"
"Payload":{
"Carrier": {
"ActorID": "${RFXtoRPprefixCarrier(preparationOrder.load_data.carrier_code?trim?json_string)}"
}
<#-- Add transport grade code
<#if preparationOrder.transport_grade_code!="">
,
"CarrierService":"${preparationOrder.transport_grade_code?trim?json_string}"
</#if> -->
}
<#-- Add transport grade code
<#if preparationOrder.transport_grade_code!="">
,
"CarrierService":"${preparationOrder.transport_grade_code?trim?json_string}"
</#if> -->
}
}
}
</#if>
</#list>
<#assign refIDHmap_local ={}>

View File

@ -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 -->
<#--
"MetaData" :[

View File

@ -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": [
{

View File

@ -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 -->
<#--
"MetaData" :[

View File

@ -3,7 +3,7 @@
[
<#assign dispatched_datetime = RfxDateTimetoUTCWithTimezone(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_rfx) />
<#assign refIDHmap_local ={}>
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.despatched_ipg_list?size != 0) as preparation_line>
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.despatched_ipg_list?size != 0 && l.preparation_order_originator_reference!="") as preparation_line>
<#list preparation_line.despatched_ipg_list as despatched_ipg>
<#if !refIDHmap_local[despatched_ipg.hd_number]?? >
<#if refIDHmap_local?size != 0 >

View File

@ -2,7 +2,7 @@
<#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.despatched_ipg_list?size != 0 ) as preparation_line>
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.despatched_ipg_list?size != 0 && l.preparation_order_originator_reference!="") as preparation_line>
<#list preparation_line.despatched_ipg_list as despatched_ipg>
<#assign packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) />
{
@ -77,19 +77,19 @@
"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 />
<#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_manufacture_date?length != 0) && (despatched_ipg.ipg_manufacture_date?starts_with("00") == false)>
<#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>
@ -111,15 +111,9 @@
<#-- 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>
"ExecutionflowID": "${preparation_line.preparation_order_originator_reference?trim?json_string}",
<#if (preparation_line.pro_originator_reference_line_number!0) != 0>
"LineID": "${preparation_line.pro_originator_reference_line_number}",
<#else>

View File

@ -0,0 +1,29 @@
<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
<#include "ActorPrefix.ftl">
[
<#assign refIDHmap_local ={}>
<#list preparationOrder.preparation_line_lst?filter(l ->l.preparation_order_originator_reference!="") as preparation_line>
<#assign OrderOriginReference = preparation_line.preparation_order_originator_reference?trim?json_string>
<#if !refIDHmap_local[OrderOriginReference]?? >
<#if refIDHmap_local?size != 0 >
,
</#if>
<#assign refIDHmap_local +={OrderOriginReference,OrderOriginReference}>
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID":{
"RefID": "${OrderOriginReference}"
},
"Payload":{
"Carrier": {
"ActorID": "${RFXtoRPprefixCarrier(preparationOrder.load_data.carrier_code?trim?json_string)}"
}
}
}
</#if>
</#list>
<#assign refIDHmap_local ={}>
]

View File

@ -34,15 +34,15 @@
</#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>
<#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": {

View File

@ -1,7 +1,7 @@
<#-- **** input parameters ***** -->
<#-- input : message HARDIS WMS -->
<#-- project : projectId in HARDIS SC NETWORK -->
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
<#-- input : message RFX -->
<#-- project : projectId in ReflexPlatform -->
<#-- organisation : organisationtId in ReflexPlatform -->
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
@ -16,23 +16,28 @@
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
[
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
<#-- check preparation type code (internal order and reservation are ignored) -->
<#if preparation_order.preparation_type_code == "010" || preparation_order.preparation_type_code == "030">
<#if preparation_order.preparation_type_code?? && (preparation_order.preparation_type_code == "010" || preparation_order.preparation_type_code == "030")>
<#if preparation_order.line_list??>
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl">
}
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl">
}
<#else>
<#-- No line -->
<#stop>
</#if>
<#else>
<#-- Preparation order type not supported -->
<#-- preparation order type not supported -->
<#stop>
</#if>
<#else>
<#-- PRO reference is empty -->
<#stop>
</#if>
]
<#break>
@ -41,7 +46,7 @@
<#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.originator_reference?? && preparation_order.originator_reference!="">
<#if preparation_order.line_list??>
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
@ -54,11 +59,13 @@
<#stop>
</#if>
<#else>
<#-- Preparation order type not supported -->
<#-- PRO reference is empty -->
<#stop>
</#if>
]
<#break>
<#default>
<#stop >
</#switch>

View File

@ -7,11 +7,7 @@
"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>
"RefID": "${preparation_order.originator_reference?trim?json_string}",
"RefDate": {
"DateTime": "${preparation_status_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"

View File

@ -9,11 +9,7 @@
"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>
"RefID": "${preparation_order.originator_reference?trim?json_string}",
"RefDate": {
"DateTime": "${pro_creation_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"
@ -35,51 +31,54 @@
},
"ShipFromAcked": true,
"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">
"ActorID": "${RFXtoRPprefixDepot(preparation_order.optional_attributes.intermediate_consignee_transfer_physical_depot?json_string)}"
<#if
<#-- preparation_order.address.type_code == "" &&
preparation_order.address.title_code == "" &&
preparation_order.address.first_name == "" &&
preparation_order.address.last_name == "" &&
preparation_order.address.mail_address == "" &&
preparation_order.address.contact_type_code == "" &&
preparation_order.address.mobile_phone_number == "" &&
preparation_order.address.land_line_phone_number == "" &&
preparation_order.address.fax_number == "" && -->
preparation_order.address.address_type_code == "" &&
preparation_order.address.name_or_company_name == "" &&
preparation_order.address.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>
<#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>
"Actor":
"Actor":
{
"Name" : "${(preparation_order.address.name_or_company_name!"")?json_string}",
"Address" :
{
"Name" : "${(preparation_order.address.name_or_company_name!"")?json_string}",
"Address" :
{
"City" : "${(preparation_order.address.post_code_area_name!"")?json_string}",
"CountryCode" : "${preparation_order.address.iso_country_code!""}",
"PostalCode" : "${preparation_order.address.postal_code!""}",
"StreetAddressOne" : "${(preparation_order.address.street_and_number_and_po_box!"")?json_string}",
"StreetAddressTwo" : "${(preparation_order.address.additional_address_data_1!"")?json_string}",
"StreetAddressThree" : "${(preparation_order.address.additional_address_data_2!"")?json_string}"
}
},
"Contact" :
{
"FirstName" : "${(preparation_order.address.first_name!"")?json_string}",
"LastName" : "${(preparation_order.address.last_name!"")?json_string}",
"Emails" : ${splitEmailsIntoArray((preparation_order.address.mail_address!"")?json_string)},
"Phones" : ["${(preparation_order.address.mobile_phone_number!"")?json_string}","${(preparation_order.address.land_line_phone_number!"")?json_string}", "${(preparation_order.address.fax_number!"")?json_string}" ]
}
</#if>
</#if>
"City" : "${(preparation_order.address.post_code_area_name!"")?json_string}",
<#assign isCountryCode = JsonUtil.isCountryCode(preparation_order.address.iso_country_code?upper_case) />
<#if isCountryCode>
"CountryCode" : "${(preparation_order.address.iso_country_code!"")?json_string}",
<#else>
"CountryCode" : "",
</#if>
"PostalCode" : "${(preparation_order.address.postal_code!"")?json_string}",
"StreetAddressOne" : "${(preparation_order.address.street_and_number_and_po_box!"")?json_string}",
"StreetAddressTwo" : "${(preparation_order.address.additional_address_data_1!"")?json_string}",
"StreetAddressThree" : "${(preparation_order.address.additional_address_data_2!"")?json_string}"
}
},
"Contact" :
{
"FirstName" : "${(preparation_order.address.first_name!"")?json_string}",
"LastName" : "${(preparation_order.address.last_name!"")?json_string}",
"Emails" : ${splitEmailsIntoArray((preparation_order.address.mail_address!"")?json_string)},
"Phones" : ["${(preparation_order.address.mobile_phone_number!"")?json_string}","${(preparation_order.address.land_line_phone_number!"")?json_string}", "${(preparation_order.address.fax_number!"")?json_string}" ]
}
</#if>
},
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
"OrderID": "${preparation_order.originator_reference?trim?json_string}",
<#else>
"OrderID": "O${preparation_order.physical_depot_code?trim?json_string}${preparation_order.activity_code?trim?json_string}${preparation_order.originator_code?trim?json_string}${preparation_order.preparation_order_year}${preparation_order.preparation_order_number}",
</#if>
},
"OrderID": "${preparation_order.originator_reference?trim?json_string}",
<#if preparation_order.line_list??>
"Lines" : [
<#list preparation_order.line_list as preparation_order_line >
@ -118,14 +117,8 @@
{
"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}",
"AuthorTimeZone": "${time_zone_rfx}"
</#if>
"AuthorTimeZone": "${time_zone_rfx}"
}
}
}

View File

@ -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 -->
<#--

View File

@ -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": [ ]

View File

@ -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 -->
<#--
"SegmentationKeys": [

View File

@ -1,7 +1,7 @@
<#-- **** input parameters ***** -->
<#-- input : message HARDIS WMS -->
<#-- project : projectId in HARDIS SC NETWORK -->
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
<#-- input : message RFX -->
<#-- project : projectId in ReflexPlatform -->
<#-- organisation : organisationtId in ReflexPlatform -->
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
@ -15,42 +15,28 @@
<#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.ExecutionflowDetected>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_TransfertReceiptExpected.ftl">
}
]
<#if receipt.receipt_type == "030">
<#stop "ignored message because receipt type = transfert">
<#else>
<#if receipt.line_list ??>
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl">
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
}
}
]
<#else>
<#-- No line-->
<#stop>
</#if>
</#if>
@ -60,77 +46,41 @@
<#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" >
<#if receipt.receipt_confirmed == "true" && receipt.confirmation_total_level_1==0 && receipt.confirmation_total_level_2==0 && receipt.confirmation_total_level_3==0>
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted>
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl">
<#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl">
}
<#else>
<#if receipt.receipt_confirmed == "true" >
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl">
}
<#else>
<#if receipt.receipt_type == "030">
<#stop "ignored message because receipt type = transfert">
<#else>
<#if receipt.line_list ??>
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
}
<#else>
<#if receipt.receipt_type?? && receipt.receipt_type == "030" && receipt.receipt_confirmed == "false" && receipt.line_list??>
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_TransfertReceiptExpected.ftl">
}
]
<#else>
<#stop> <#-- Receipt reference for transfer is empty-->
</#if>
<#else>
<#if receipt.line_list ??>
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
}
<#else>
<#stop>
</#if>
</#if>
<#-- No line-->
<#stop>
</#if>
</#if>
</#if>
@ -142,19 +92,20 @@
<#-- *********************************************** Action = DELETE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
<#if receipt.line_list ??>
[
{
<#if receipt.line_list ??>
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl">
}
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl">
}
<#else>
<#-- No line-->
<#stop>
</#if>
]
<#else>
<#stop> <#-- No line-->
</#if>
<#break>

View File

@ -1,20 +1,48 @@
<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.modification_datetime,time_zone_rfx) />
<#assign refIDHmap_local ={}>
[
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "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": {
}
}
<#if receipt.line_list??>
<#list receipt.line_list as receipt_line >
<#if receipt_line.origin_order_line_reference?? && receipt_line.origin_order_line_reference!="">
<#if !refIDHmap_local[receipt_line.origin_order_line_reference]?? >
<#if refIDHmap_local?size != 0 >
,
</#if>
<#assign refIDHmap_local +={receipt_line.origin_order_line_reference,receipt_line.origin_order_line_reference}>
{
"Header": {"ProjectID": "${projectRP}"},
"ID": {
"RefID": "${receipt_line.origin_order_line_reference?trim?json_string}",
"RefDate": {
"DateTime": "${receipt_status_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"
}
},
"Payload": {
}
}
</#if>
<#else>
{
"Header": {"ProjectID": "${projectRP}"},
"ID": {
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
"RefID": "${receipt.receipt_reference?trim?json_string}",
<#else>
"RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}",
</#if>
"RefDate": {
"DateTime": "${receipt_status_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"
}
},
"Payload": {
}
}
<#break>
</#if>
</#list>
</#if>
]

View File

@ -9,7 +9,11 @@
"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}",
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
"RefID": "${receipt.receipt_reference?trim?json_string}",
<#else>
"RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}",
</#if>
"RefDate": {
"DateTime": "${receipt_creation_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"
@ -37,18 +41,18 @@
"ActorID": "${RFXtoRPprefixDepot(receipt.physical_depot_code?trim?json_string)}"
},
"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 != "">
"Carrier":
{
"ActorID":"${RFXtoRPprefixCarrier(receipt.carrier_informations.carrier_code?trim?json_string)}"
},
</#if>
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
"OrderID": "${receipt.receipt_reference?trim?json_string}",
<#else>
"OrderID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}",
</#if>
<#if receipt.line_list??>
"Lines" : [
<#list receipt.line_list as line>

View File

@ -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 -->
<#--

View File

@ -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": [ ]

View File

@ -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": [

View File

@ -1,19 +1,48 @@
<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.confirmation_datetime,time_zone_rfx) />
<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.modification_datetime,time_zone_rfx) />
<#assign refIDHmap_local ={}>
[
{
"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": {
}
}
<#if receipt.line_list??>
<#list receipt.line_list as receipt_line >
<#if receipt_line.origin_order_line_reference?? && receipt_line.origin_order_line_reference!="">
<#if !refIDHmap_local[receipt_line.origin_order_line_reference]?? >
<#if refIDHmap_local?size != 0 >
,
</#if>
<#assign refIDHmap_local +={receipt_line.origin_order_line_reference,receipt_line.origin_order_line_reference}>
{
"Header": {"ProjectID": "${projectRP}"},
"ID": {
"RefID": "${receipt_line.origin_order_line_reference?trim?json_string}",
"RefDate": {
"DateTime": "${receipt_status_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"
}
},
"Payload": {
}
}
</#if>
<#else>
{
"Header": {"ProjectID": "${projectRP}"},
"ID": {
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
"RefID": "${receipt.receipt_reference?trim?json_string}",
<#else>
"RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}",
</#if>
"RefDate": {
"DateTime": "${receipt_status_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"
}
},
"Payload": {
}
}
<#break>
</#if>
</#list>
</#if>
]

View File

@ -1,21 +1,48 @@
<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.creation_datetime,time_zone_rfx) />
<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.modification_datetime,time_zone_rfx) />
<#assign refIDHmap_local ={}>
[
{
"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": {}
}
<#if receipt.line_list??>
<#list receipt.line_list as receipt_line >
<#if receipt_line.origin_order_line_reference?? && receipt_line.origin_order_line_reference!="">
<#if !refIDHmap_local[receipt_line.origin_order_line_reference]?? >
<#if refIDHmap_local?size != 0 >
,
</#if>
<#assign refIDHmap_local +={receipt_line.origin_order_line_reference,receipt_line.origin_order_line_reference}>
{
"Header": {"ProjectID": "${projectRP}"},
"ID": {
"RefID": "${receipt_line.origin_order_line_reference?trim?json_string}",
"RefDate": {
"DateTime": "${receipt_status_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"
}
},
"Payload": {
}
}
</#if>
<#else>
{
"Header": {"ProjectID": "${projectRP}"},
"ID": {
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
"RefID": "${receipt.receipt_reference?trim?json_string}",
<#else>
"RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}",
</#if>
"RefDate": {
"DateTime": "${receipt_status_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"
}
},
"Payload": {
}
}
<#break>
</#if>
</#list>
</#if>
]

View File

@ -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>
]

View File

@ -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>
]

View File

@ -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>
]

View File

@ -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>
]

View File

@ -1,11 +0,0 @@
[
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${id.refid?json_string}"
},
"Payload": {}
}
]

View File

@ -0,0 +1,15 @@
[
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${id.refid?json_string}"
},
"Payload": {
"ShipToAcked": true
}
}
]

View File

@ -1,206 +1,206 @@
<#-- **** input parameters ***** -->
<#-- input : Response message from HARDIS WMS -->
<#-- project : projectId in HARDIS SC NETWORK -->
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
<#assign restResponsetMsg = JsonUtil.jsonToMap(input)>
<#assign id = JsonUtil.jsonToMap(restResponsetMsg.id!"{}")>
<#assign projectRP = project>
<#assign organisationRP = organisation>
<#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>
<#case "preparation_orders_post">
<#switch restResponsetMsg.status!no_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 201>
<#-- *********************************************** ApiRestID = preparation_orders_post ******************** -->
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)>
<#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" >
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipFromAcked>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#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>
[
{
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_PlatformLogCreate.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_RestResponseAllocationError.ftl">
}
]
</#if>
</#if>
<#break>
<#default>
[
{
<#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">
}
]
</#switch>
<#break>
<#case "receipts_post">
<#switch restResponsetMsg.status!no_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 201>
<#-- *********************************************** ApiRestID = receipts_post ******************** -->
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)>
<#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" >
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDeleted>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_Receipt_ExecutionflowDeleted.ftl">
}
]
<#else>
[
{
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_PlatformLogCreate.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_RestResponseAllocationError.ftl">
}
]
</#if>
<#break>
<#default>
[
{
<#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">
}
]
</#switch>
<#break>
<#default>
<#stop>
</#switch>
<#-- **** input parameters ***** -->
<#-- input : Response message from Reflex -->
<#-- project : projectId in ReflexPlatform -->
<#-- organisation : organisationtId in ReflexPlatform -->
<#assign restResponsetMsg = JsonUtil.jsonToMap(input)>
<#assign id = JsonUtil.jsonToMap(restResponsetMsg.id!"{}")>
<#assign projectRP = project>
<#assign organisationRP = organisation>
<#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>
<#case "preparation_orders_post">
<#switch restResponsetMsg.status!no_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 201>
<#-- *********************************************** ApiRestID = preparation_orders_post ******************** -->
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)>
<#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" >
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipFromAcked>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#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>
[
{
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_PlatformLogCreate.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_RestResponseAllocationError.ftl">
}
]
</#if>
</#if>
<#break>
<#default>
[
{
<#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">
}
]
</#switch>
<#break>
<#case "receipts_post">
<#switch restResponsetMsg.status!no_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 201>
<#-- *********************************************** ApiRestID = receipts_post ******************** -->
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)>
<#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" >
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipToAcked>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_Receipt_ShipToAcked.ftl">
}
]
<#else>
[
{
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_PlatformLogCreate.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_RestResponseAllocationError.ftl">
}
]
</#if>
<#break>
<#default>
[
{
<#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">
}
]
</#switch>
<#break>
<#default>
<#stop>
</#switch>

View File

@ -14,9 +14,9 @@ those parameters are stored in FTL file Conf-connector.ftl for later use in some
<#noparse><#-- Possible values for SupplyOfTheTrackingNumber parameter : --></#noparse>
<#noparse><#-- 0 : Always empty --></#noparse>
<#noparse><#-- 1 : Always use HARDIS WMS tracking --></#noparse>
<#noparse><#-- 1 : Always use Reflex WMS tracking --></#noparse>
<#noparse><#-- 2 : Always use the HU number --></#noparse>
<#noparse><#-- 3 : Use HARDIS WMS tracking if it exists, the HU number otherwise --></#noparse>
<#noparse><#-- 3 : Use Reflex tracking if it exists, the HU number otherwise --></#noparse>
<#list file.parameters as parameter>
<#switch parameter.type>

View File

@ -1,7 +1,7 @@
<#-- **** input parameters ***** -->
<#-- input : message HARDIS WMS -->
<#-- project : projectId in HARDIS SC NETWORK -->
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
<#-- input : message RFX -->
<#-- project : projectId in ReflexPlatform -->
<#-- organisation : organisationtId in ReflexPlatform -->
<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
@ -17,7 +17,7 @@
<#switch eventRP.event>
<#case "Created">
<#case "Renotified">
<#case "Renotified">
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
<#assign executionflow = eventRP.data />

View File

@ -7,8 +7,8 @@
<#assign titlecode ="1">
<#assign contacttypecode ="010">
<#assign adresstypecode ="010">
<#-- Si vous utilisez des acteurs non référencés, il faudra créer un destinataire "VIZ" dans HARDIS WMS pour utiliser cette fonctionnalité -->
<#-- If you are using unreferenced actors, you will need to create a "VIZ" consignee in HARDIS WMS to use this feature -->
<#-- Si vous utilisez des acteurs non référencés, il faudra créer un destinataire "VIZ" dans Reflex WMS pour utiliser cette fonctionnalité -->
<#-- If you are using unreferenced actors, you will need to create a "VIZ" consignee in Reflex WMS to use this feature -->
<#assign defaultactor ="VIZ">
<#if executionflow.ShipTo.ActorID?? && executionflow.ShipTo.ActorID!="">
<#assign actorID = "${RPtoRFXprefixConsignee(executionflow.ShipTo.ActorID)}" >
@ -17,7 +17,7 @@
</#if>
{
"id" : {"refid" : "${eventRP.refid?json_string}"},
"id" : {"refid" : "${executionflow.OrderID?json_string}"},
"route" : "rest/public/v1/activities/{activity_code}/physical_depots/{physical_depot_code}/originators/{originator_code}/preparation_orders",
"method" : "POST",
"uri_substitutions": {
@ -96,7 +96,7 @@
{
<#include "RPtoRFX_PrepOrder_LineMetadata.ftl">
"originator_reference_line_number": ${line.LineID?number},
"item_code": "${line.RequestedContent.Goods.ItemID?json_string!""}",
"item_code": "${line.RequestedContent.Goods.ItemID!""}",
"item_lv_code": "${line.RequestedContent.Goods.LVBranchID!""}",
"base_lv_quantity_to_prepare": ${line.RequestedMetrics.QuantityInBaseLV.Value!0},
"owner_code_to_prepare" :"${owner_code_to_prepare}",

View File

@ -1,5 +1,5 @@
<#-- Vous pouvez mapper les métadonnées avec des informations complémentaires, des commentaires... -->
<#-- You can map metadata with additional information,comments... -->
<#-- Il est possible de mapper les métadonnées avec des informations complémentaires, des commentaires... -->
<#-- It is possible to map metadata with additional information,comments... -->
<#--
<#if Header_MetaData_Map["Color"]??>

View File

@ -1,5 +1,5 @@
<#-- Vous pouvez mapper les métadonnées avec des informations complémentaires, des commentaires... -->
<#-- You can map metadata with additional information,comments... -->
<#-- Il est possible de mapper les métadonnées avec des informations complémentaires, des commentaires... -->
<#-- It is possible to map metadata with additional information,comments... -->
<#--
<#if Header_MetaData_Map["Color"]??>

View File

@ -3,7 +3,7 @@
<#include "HfRpConfig.ftl">
{
"id" : {"refid" : "${eventRP.refid?json_string}"},
"id" : {"refid" : "${executionflow.OrderID?json_string}"},
"route" : "rest/public/v1/activities/{activity_code}/physical_depots/{physical_depot_code}/originators/{originator_code}/receipts",
"method" : "POST",
"uri_substitutions": {
@ -50,16 +50,16 @@
{
<#include "RPtoRFX_Receipt_LineMetadata.ftl">
"receipt_reference_line_no": ${line.LineID?number},
"item_code": "${line.RequestedContent.Goods.ItemID?json_string!""}",
"item_code": "${line.RequestedContent.Goods.ItemID!""}",
"item_lv_code": "${line.RequestedContent.Goods.LVBranchID!""}",
"level_1_quantity": ${line.RequestedMetrics.QuantityInBaseLV.Value!0},
"owner_code": "${owner_code}",
"grade_code": "${grade_code}",
"batch_1": "${batch_1?json_string!""}",
"optional_attributes": {
<#include "RPtoRFX_Receipt_OptionalAttributes.ftl">
"hold_for_specific_code": "false"
}
<#include "RPtoRFX_Receipt_OptionalAttributes.ftl">
"hold_for_specific_code": "false"
}
}<#sep>,</#sep>
</#list>
]

View File

@ -1,5 +1,5 @@
<#-- Vous pouvez mapper les métadonnées avec des informations complémentaires, des commentaires... -->
<#-- You can map metadata with additional information,comments... -->
<#-- Il est possible de mapper les métadonnées avec des informations complémentaires, des commentaires... -->
<#-- It is possible to map metadata with additional information,comments... -->
<#--
<#if Header_MetaData_Map["Color"]??>

View File

@ -1,5 +1,5 @@
<#-- Vous pouvez mapper les métadonnées avec des informations complémentaires, des commentaires... -->
<#-- You can map metadata with additional information,comments... -->
<#-- Il est possible de mapper les métadonnées avec des informations complémentaires, des commentaires... -->
<#-- It is possible to map metadata with additional information,comments... -->
<#--
<#if Header_MetaData_Map["Color"]??>
@ -14,4 +14,4 @@
}
]
</#if>,
-->
-->

View File

@ -1,5 +1,5 @@
<#-- Here are the fields that can be added
"batch_2": "string",
"batch_2": "string",
"batch_3": "string",
"anticipated_receipt_line_activity_code": "str",
"anticipated_receipt_line_physical_depot_code": "str",

View File

@ -1,5 +1,5 @@
<#-- --------------------------------------------------------------------------------------- -->
<#-- Concat HARDIS WMS timestamp with HARDIS WMS time zone and format this date in ISO UTC format -->
<#-- Concat reflex timestamp with reflex time zone and format this date in ISO UTC format -->
<#-- --------------------------------------------------------------------------------------- -->
<#function RfxDateTimetoUTC rfxdatetime offset >
<#return ((rfxdatetime + offset)?datetime.iso?iso_utc)>
@ -10,21 +10,21 @@
</#function>
<#-- --------------------------------------------------------------------------------------- -->
<#-- Split email HARDIS WMS into json array string -->
<#-- Split email reflex into json array string -->
<#-- Example : splitemail "john.doe@hardis-group.com,; name@hardis-group.com" -->
<#-- return "["john.doe@hardis-group.com","name@hardis-group.com"]" -->
<#-- --------------------------------------------------------------------------------------- -->
<#function splitEmailsIntoArray emails >
<#local str = "[">
<#list emails?split(";|,| |à|/","r")?filter(l -> l != "") as email>
<#if email?matches("^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$")>
<#if str != "[">
<#local str += ",">
</#if>
<#local str += "\"">
<#local str += email>
<#local str += "\"">
</#if>
<#if email?matches("^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$")>
<#if str != "[">
<#local str += ",">
</#if>
<#local str += "\"">
<#local str += email>
<#local str += "\"">
</#if>
</#list>
<#local str += "]">
<#return (str)>

View File

@ -1 +1 @@
2.0.13+1
1.2.45+4