Compare commits
138 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ae07548499 | |||
| 0ee0108a9d | |||
| 42fbefc365 | |||
| 4fe7471545 | |||
| dfdf51657b | |||
| 3d4c41b6d3 | |||
| 2b779cf8aa | |||
| b812177bf5 | |||
| 3ec2f8f9bf | |||
| 175f0169ea | |||
| 639bbdbff5 | |||
| 22d9f48b09 | |||
| f0933a5c6a | |||
| 4b090088db | |||
| d3fa6876e7 | |||
| 05c3d17a03 | |||
| bdd17502d7 | |||
| 1ed84f6c19 | |||
| 5bc723540c | |||
| 374aef32fd | |||
| 3304d944e5 | |||
| f23a11933d | |||
| d77f51fa52 | |||
| c8806baf5c | |||
| 8ca2f62591 | |||
| 97dbd248f8 | |||
| 6bf2ea2329 | |||
| 6bb1d45783 | |||
| a880fff33b | |||
| d63a3d7a50 | |||
| f373cbe734 | |||
| 1256e3d68c | |||
| 983a59b592 | |||
| c779d5305c | |||
| eb6fc3f4a3 | |||
| 8cf596e251 | |||
| 55070c8ce3 | |||
| 0f7990b20e | |||
| 928c05bff4 | |||
| 2d8bdeb8a5 | |||
| bb2aaae375 | |||
| f4286949f7 | |||
| 1df16adb0a | |||
| 6d6a56710b | |||
| 9b93729ab4 | |||
| 18c4959a62 | |||
| efe3ac2134 | |||
| 0d162d5de2 | |||
| a939e6067e | |||
| 77421779f3 | |||
| ff59e45573 | |||
| ce32967617 | |||
| df15106ef5 | |||
| 127e69db7b | |||
| ff01a944e4 | |||
| 18ac89f664 | |||
| 499a16796a | |||
| 8863cd66a7 | |||
| 27a762caa8 | |||
| 649452207d | |||
| 2d1fefd96f | |||
| 06376dd2d7 | |||
| 9642b8b8ad | |||
| 7d998634d3 | |||
| 7bf9d3c674 | |||
| 632cc2b647 | |||
| 27f2d525dc | |||
| b66ec8c589 | |||
| 3d95e5f3a2 | |||
| c370b967e6 | |||
| 835b8062ee | |||
| 017cd65077 | |||
| 64e863bdfc | |||
| e50893e8c9 | |||
| 592ccb8905 | |||
| ddab0673d4 | |||
| 42237b2029 | |||
| 8c228dd0eb | |||
| cded3aa0e3 | |||
| 5c4dc74bb8 | |||
| 9f34588a6a | |||
| 16f4e35c02 | |||
| 9b8a5ad5c6 | |||
| 676fab0fea | |||
| 297e3ea4c8 | |||
| 58118c394b | |||
| 83a1f59edf | |||
| 890768f89a | |||
| 0a5ec7329c | |||
| 9999313dfc | |||
| dd4d31b443 | |||
| c1704af84d | |||
| a248dc16ed | |||
| aec4e6068e | |||
| dfdfbdeb15 | |||
| d875085657 | |||
| 9d7293d92e | |||
| 899cdd2508 | |||
| d1f251ba32 | |||
| 30337cc003 | |||
| 24f7b8b36a | |||
| a1b063a9d4 | |||
| 88fa6bd2af | |||
| 01b2706cb5 | |||
| 8cd98b8638 | |||
| 4c8ab232d0 | |||
| 3d816434af | |||
| 9f0bedc583 | |||
| 42c5b2943d | |||
| 86d0974c2f | |||
| 8abf2771ba | |||
| 8229616050 | |||
| ac5f5d1b88 | |||
| d6a7398af1 | |||
| 7a77f373cc | |||
| 6af5f05491 | |||
| 5581b8cd29 | |||
| cd1cc00f78 | |||
| 10def5ca60 | |||
| 6db75e83e0 | |||
| af9ff73850 | |||
| cf5ef67c23 | |||
| 09df74f0e0 | |||
| 0ea5a04d6b | |||
| 777197b26b | |||
| a23e6654f1 | |||
| b7eab6ccfd | |||
| c58772f755 | |||
| fbaddfe891 | |||
| df4377f77d | |||
| 703ad28c19 | |||
| 65795a6077 | |||
| b3cbfeb1a8 | |||
| 29e4acfca4 | |||
| aa68eb52e9 | |||
| 320bd8988b | |||
| 9a55811bfc | |||
| 1905105118 |
@ -1,10 +1,9 @@
|
|||||||
# HARDIS SC NETWORK Core FTLs
|
# HARDIS SC NETWORK Core FTLs
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
The **HARDIS WMS Connector** is a set of **FreeMarker templates (FTL)** designed to transform **outgoing JSON flows from HARDIS WMS** into **flows compatible with HARDIS SC NETWORK**.
|
The **HARDIS WMS Connector** is a set of **FreeMarker templates (FTL)** designed to transform **outgoing JSON flows from HARDIS WMS** into **flows compatible with HARDIS SC NETWORK**.
|
||||||
|
|
||||||
This connector does not contain any standalone executable code: it is intended to be used by **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
|
## Role of the FTL Files
|
||||||
|
|
||||||
@ -18,3 +17,4 @@ This connector does not contain any standalone executable code: it is intended t
|
|||||||
|
|
||||||
- [FreeMarker Documentation](https://freemarker.apache.org/docs/index.html)
|
- [FreeMarker Documentation](https://freemarker.apache.org/docs/index.html)
|
||||||
- [HARDIS SC NETWORK](https://auth.reflex-platform.com/)
|
- [HARDIS SC NETWORK](https://auth.reflex-platform.com/)
|
||||||
|
|
||||||
|
|||||||
@ -1,60 +1,60 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message HARDIS WMS -->
|
<#-- input : message HARDIS WMS -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in HARDIS SC NETWORK -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
||||||
<#-- sum_elt : nb element in snapshot (optional parameter) -->
|
<#-- sum_elt : nb element in snapshot (optional parameter) -->
|
||||||
|
|
||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
<#assign organisationRP = organisation>
|
<#assign organisationRP = organisation>
|
||||||
|
|
||||||
<#switch cloudEventMsg.action>
|
<#switch cloudEventMsg.action>
|
||||||
<#case "C">
|
<#case "C">
|
||||||
<#case "U">
|
<#case "U">
|
||||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign reflexStockPicturesInterface = JsonUtil.jsonToMap(dataRfx)>
|
<#assign reflexStockPicturesInterface = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
|
||||||
<#-- idSnapshot MUST BE UNIQUE regardless of the number of messages in the stock image -->
|
<#-- idSnapshot MUST BE UNIQUE regardless of the number of messages in the stock image -->
|
||||||
<#if cloudEventMsg.messageSet??>
|
<#if cloudEventMsg.messageSet??>
|
||||||
<#assign idSnapshot = cloudEventMsg.messageSet />
|
<#assign idSnapshot = cloudEventMsg.messageSet />
|
||||||
<#else>
|
<#else>
|
||||||
<#assign idSnapshot = cloudEventMsg.id />
|
<#assign idSnapshot = cloudEventMsg.id />
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
<#list reflexStockPicturesInterface.detailled_stock_list as stock>
|
<#list reflexStockPicturesInterface.detailled_stock_list as stock>
|
||||||
<#if stock.stock_type_code != "200">
|
<#if stock.stock_type_code != "200">
|
||||||
<#stop>
|
<#stop>
|
||||||
<#break>
|
<#break>
|
||||||
</#if>
|
</#if>
|
||||||
</#list>
|
</#list>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#if sum_elt??>
|
<#if sum_elt??>
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorSnapshotCompleted>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorSnapshotCompleted>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HfDtlStockLs_ActorSnapshotCompleted.ftl">
|
<#include "RFXtoRP_HfDtlStockLs_ActorSnapshotCompleted.ftl">
|
||||||
<#else>
|
<#else>
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.StockSnapshotted>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.StockSnapshotted>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HfDtlStockLs_StockSnapshotted.ftl">
|
<#include "RFXtoRP_HfDtlStockLs_StockSnapshotted.ftl">
|
||||||
</#if>
|
</#if>
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#case "D">
|
<#case "D">
|
||||||
<#-- *********************************************** Action = DELETE ******************** -->
|
<#-- *********************************************** Action = DELETE ******************** -->
|
||||||
<#stop >
|
<#stop >
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop >
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@ -1,8 +1,9 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message HARDIS WMS -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
|
<#include "HfRpConfig.ftl">
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
<#assign organisationRP = organisation>
|
<#assign organisationRP = organisation>
|
||||||
@ -17,78 +18,75 @@
|
|||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign preparationOrder = JsonUtil.jsonToMap(dataRfx)>
|
<#assign preparationOrder = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
|
||||||
<#if preparationOrder.total_lv_validated?? && preparationOrder.total_lv_validated !=0>
|
<#if preparationOrder.total_lv_validated !=0>
|
||||||
<#if preparationOrder.preparation_type_code=="010" || preparationOrder.preparation_type_code=="030">
|
<#if preparationOrder.preparation_line_lst??>
|
||||||
<#if preparationOrder.preparation_line_lst??>
|
[
|
||||||
[
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsPrepared>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl">
|
||||||
|
}
|
||||||
|
|
||||||
|
<#assign refIDHmap ={}>
|
||||||
|
<#assign hd_numberHmap ={}>
|
||||||
|
<#assign hd_numberHmapHUadded ={}>
|
||||||
|
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") as preparation_line>
|
||||||
|
<#list preparation_line.despatched_ipg_list as despatched_ipg>
|
||||||
|
<#assign HUadded_packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) />
|
||||||
|
<#if (!hd_numberHmap[despatched_ipg.hd_number]?? || !hd_numberHmap[despatched_ipg.carton_number]??) && (trackingNumberSource==2 || trackingNumberSource==3 || (despatched_ipg.consignment_unit_id!="" && trackingNumberSource==1))>
|
||||||
|
,
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsPrepared>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl">
|
<#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>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl">
|
<#include "RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl">
|
||||||
}
|
}
|
||||||
<#assign refIDHmap ={}>
|
<#if !hd_numberHmapHUadded[despatched_ipg.hd_number]?? && (trackingNumberSource==2 || trackingNumberSource==3 )>
|
||||||
<#assign hd_numberHmap ={}>
|
<#assign hd_numberHmapHUadded += {despatched_ipg.hd_number,despatched_ipg.hd_number}>
|
||||||
<#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>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl">
|
<#include "RFXtoRP_HsrPrepa_HUsAdded_TrackingHuLabelled.ftl">
|
||||||
}
|
}
|
||||||
</#if>
|
</#if>
|
||||||
<#if despatched_ipg.carton_number != "000000000000000000" && despatched_ipg.carton_number!=despatched_ipg.hd_number >
|
|
||||||
,
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitHUsAdded>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrPrepa_HandlingunitHUsAdded.ftl">
|
|
||||||
},
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl">
|
|
||||||
}
|
|
||||||
<#if !hd_numberHmapHUadded[despatched_ipg.hd_number]?? && (trackingNumberSource==2 || trackingNumberSource==3 )>
|
|
||||||
<#assign hd_numberHmapHUadded += {despatched_ipg.hd_number,despatched_ipg.hd_number}>
|
|
||||||
,
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrPrepa_HUsAdded_TrackingHuLabelled.ftl">
|
|
||||||
}
|
|
||||||
</#if>
|
|
||||||
|
|
||||||
</#if>
|
</#if>
|
||||||
</#list>
|
</#list>
|
||||||
</#list>
|
</#list>
|
||||||
<#assign refIDHmap ={}>
|
<#assign refIDHmap ={}>
|
||||||
]
|
]
|
||||||
<#else>
|
|
||||||
<#-- No line-->
|
|
||||||
<#stop>
|
|
||||||
</#if>
|
|
||||||
<#else>
|
<#else>
|
||||||
<#-- Preparation Type not supported-->
|
<#-- No line-->
|
||||||
<#stop>
|
<#stop >
|
||||||
</#if>
|
</#if>
|
||||||
<#else>
|
<#else>
|
||||||
<#-- no confirmed quantity for the preparation - preparation closed-->
|
<#-- no confirmed quantity for the preparation - preparation closed-->
|
||||||
<#stop>
|
<#stop >
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -15,125 +15,81 @@
|
|||||||
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
||||||
<#if receipt.receipt_type?? && receipt.receipt_type = "030" && receipt.line_list??> <#-- if reception is a transfer type -->
|
<#if receipt.receipt_type == "030">
|
||||||
[
|
<#stop "ignored message because receipt type = transfert">
|
||||||
{
|
|
||||||
<#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>
|
<#else>
|
||||||
<#if receipt.line_list ??>
|
<#if receipt.line_list ??>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowLinesAdded>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowLinesAdded>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HliReceiptLr_ExecutionflowLinesAdded.ftl">
|
<#include "RFXtoRP_HliReceiptLr_ExecutionflowLinesAdded.ftl">
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
|
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
|
||||||
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#else>
|
<#else>
|
||||||
|
<#-- No line-->
|
||||||
<#stop>
|
<#stop>
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
<#break>
|
<#break>
|
||||||
<#case "U">
|
<#case "U">
|
||||||
<#-- *********************************************** Action = UPDATE ******************** -->
|
<#-- *********************************************** Action = UPDATE ******************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
<#if receipt.receipt_type?? && receipt.receipt_type == "030" && receipt.receipt_confirmed == "true" && receipt.confirmation_total_level_1==0 && receipt.confirmation_total_level_2==0 && receipt.confirmation_total_level_3==0>
|
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
||||||
{
|
<#if receipt.receipt_confirmed == "true" && receipt.confirmation_total_level_1==0 && receipt.confirmation_total_level_2==0 && receipt.confirmation_total_level_3==0>
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrReceiptList_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>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"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.ExecutionflowLinesAdded>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HliReceiptLr_ExecutionflowLinesAdded.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
|
||||||
}
|
}
|
||||||
<#else>
|
<#else>
|
||||||
<#if receipt.receipt_type?? && receipt.receipt_type == "030" && receipt.receipt_confirmed == "false" && receipt.line_list??>
|
<#-- No line-->
|
||||||
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
<#stop>
|
||||||
[
|
|
||||||
{
|
|
||||||
<#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>
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#-- Receipt reference is empty-->
|
||||||
|
<#stop >
|
||||||
|
</#if>
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
@ -141,19 +97,25 @@
|
|||||||
<#-- *********************************************** Action = DELETE ******************** -->
|
<#-- *********************************************** Action = DELETE ******************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
||||||
<#if receipt.line_list ??>
|
|
||||||
[
|
[
|
||||||
{
|
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
||||||
|
<#if receipt.line_list ??>
|
||||||
|
{
|
||||||
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl">
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl">
|
||||||
}
|
}
|
||||||
|
<#else>
|
||||||
|
<#-- No line-->
|
||||||
|
<#stop>
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#-- Receipt reference is empty-->
|
||||||
|
<#stop >
|
||||||
|
</#if>
|
||||||
]
|
]
|
||||||
<#else>
|
|
||||||
<#stop> <#-- No line-->
|
|
||||||
</#if>
|
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -9,7 +9,11 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "R${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}",
|
<#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": {
|
"RefDate": {
|
||||||
"DateTime": "${receipt_creation_datetime}",
|
"DateTime": "${receipt_creation_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
|||||||
@ -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>
|
|
||||||
]
|
|
||||||
@ -16,23 +16,28 @@
|
|||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
|
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
|
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
|
||||||
<#-- check preparation type code (internal order and reservation are ignored) -->
|
<#-- check preparation type code (internal order and reservation are ignored) -->
|
||||||
<#if preparation_order.preparation_type_code == "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??>
|
<#if preparation_order.line_list??>
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowLinesAdded>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowLinesAdded>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HlrProL_ExecutionflowLinesAdded.ftl">
|
<#include "RFXtoRP_HlrProL_ExecutionflowLinesAdded.ftl">
|
||||||
}
|
}
|
||||||
<#else>
|
<#else>
|
||||||
<#-- No line -->
|
<#-- No line -->
|
||||||
<#stop>
|
<#stop>
|
||||||
</#if>
|
</#if>
|
||||||
<#else>
|
<#else>
|
||||||
<#-- Preparation order type not supported -->
|
<#-- preparation order type not supported -->
|
||||||
<#stop>
|
<#stop>
|
||||||
</#if>
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#-- PRO reference is empty -->
|
||||||
|
<#stop>
|
||||||
|
</#if>
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
@ -41,7 +46,7 @@
|
|||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
|
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
<#if preparation_order.preparation_type_code == "010" || preparation_order.preparation_type_code == "030" >
|
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
|
||||||
<#if preparation_order.line_list??>
|
<#if preparation_order.line_list??>
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||||
@ -54,11 +59,13 @@
|
|||||||
<#stop>
|
<#stop>
|
||||||
</#if>
|
</#if>
|
||||||
<#else>
|
<#else>
|
||||||
<#-- Preparation order type not supported -->
|
<#-- PRO reference is empty -->
|
||||||
<#stop>
|
<#stop>
|
||||||
</#if>
|
</#if>
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop >
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|||||||
@ -9,18 +9,14 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
|
"RefID": "${preparation_order.originator_reference?trim?json_string}",
|
||||||
"RefID": "${preparation_order.physical_depot_code?trim?json_string}${preparation_order.activity_code?trim?json_string}${preparation_order.originator_code?trim?json_string}${preparation_order.originator_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
"RefID": "O${preparation_order.physical_depot_code?trim?json_string}${preparation_order.activity_code?trim?json_string}${preparation_order.originator_code?trim?json_string}${preparation_order.preparation_order_year}${preparation_order.preparation_order_number}",
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${pro_creation_datetime}",
|
"DateTime": "${pro_creation_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Payload": {
|
"Payload": {
|
||||||
<#if preparation_order.line_list??>
|
<#if preparation_order.line_list??>
|
||||||
"Lines" : [
|
"Lines" : [
|
||||||
<#list preparation_order.line_list as preparation_order_line >
|
<#list preparation_order.line_list as preparation_order_line >
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,10 +1,7 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message HARDIS WMS -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
@ -20,7 +17,7 @@
|
|||||||
<#assign carrier = JsonUtil.jsonToMap(dataRfx)>
|
<#assign carrier = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreatedv2>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaCarrier_ActorCreated.ftl">
|
<#include "RFXtoRP_HsaCarrier_ActorCreated.ftl">
|
||||||
|
|||||||
@ -1,3 +1,6 @@
|
|||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ActorPrefix.ftl">
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
@ -8,7 +11,11 @@
|
|||||||
},
|
},
|
||||||
"Payload": {
|
"Payload": {
|
||||||
"Name": "${carrier.carrier_designation?json_string}",
|
"Name": "${carrier.carrier_designation?json_string}",
|
||||||
|
"ManagedStock": false,
|
||||||
"IsCarrier": true,
|
"IsCarrier": true,
|
||||||
|
<#-- ***Partner ID could be added here *** -->
|
||||||
|
<#-- "PartnerID": "${}", -->
|
||||||
|
|
||||||
|
|
||||||
<#include "RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl">,
|
<#include "RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl">,
|
||||||
|
|
||||||
@ -30,6 +37,7 @@
|
|||||||
</#if>
|
</#if>
|
||||||
"ProvinceCode": "${carrier.carrier_structured_address.territorial_div_code?json_string}",
|
"ProvinceCode": "${carrier.carrier_structured_address.territorial_div_code?json_string}",
|
||||||
"State": "${carrier.carrier_structured_address.country_designation?json_string}"
|
"State": "${carrier.carrier_structured_address.country_designation?json_string}"
|
||||||
|
|
||||||
<#-- if HARDIS WMS address is not structured -->
|
<#-- if HARDIS WMS address is not structured -->
|
||||||
<#else>
|
<#else>
|
||||||
<#if carrier.address??>
|
<#if carrier.address??>
|
||||||
|
|||||||
@ -1,3 +1,6 @@
|
|||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ActorPrefix.ftl">
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
|
|||||||
@ -2,9 +2,6 @@
|
|||||||
<#-- input : message HARDIS WMS -->
|
<#-- input : message HARDIS WMS -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in HARDIS SC NETWORK -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
@ -18,15 +15,14 @@
|
|||||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
|
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreatedv2>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaCons_ActorCreated.ftl">
|
<#include "RFXtoRP_HsaCons_ActorCreated.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#case "D">
|
<#case "D">
|
||||||
|
|||||||
@ -1,3 +1,6 @@
|
|||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ActorPrefix.ftl">
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
@ -8,12 +11,18 @@
|
|||||||
},
|
},
|
||||||
"Payload": {
|
"Payload": {
|
||||||
"Name": "${actor.designation?json_string}",
|
"Name": "${actor.designation?json_string}",
|
||||||
|
"ManagedStock": false,
|
||||||
"IsCarrier": false,
|
"IsCarrier": false,
|
||||||
|
<#-- ***Partner ID could be added here *** -->
|
||||||
|
<#-- "PartnerID": "${}", -->
|
||||||
|
|
||||||
|
|
||||||
<#include "RFXtoRP_HsaCons_ActorCreated_Metadata.ftl">,
|
<#include "RFXtoRP_HsaCons_ActorCreated_Metadata.ftl">,
|
||||||
|
|
||||||
|
|
||||||
"Address":
|
"Address":
|
||||||
{
|
{
|
||||||
|
|
||||||
<#-- if HARDIS WMS is structured -->
|
<#-- if HARDIS WMS is structured -->
|
||||||
<#if actor.consignee_structured_address??>
|
<#if actor.consignee_structured_address??>
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,6 @@
|
|||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ActorPrefix.ftl">
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
|
|||||||
@ -16,14 +16,15 @@
|
|||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign dispute = JsonUtil.jsonToMap(dataRfx)>
|
<#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>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimCreated>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaDispute_Created.ftl">
|
<#include "RFXtoRP_HsaDispute_Created.ftl">
|
||||||
}
|
}
|
||||||
<#if TableReasonCode[dispute.dispute_reason_code]??>
|
<#if TableReasonCode[dispute.dispute_reason_code]??>
|
||||||
,
|
,
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimMessageSent>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimMessageSent>
|
||||||
@ -31,9 +32,13 @@
|
|||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaDispute_MessageSent.ftl">
|
<#include "RFXtoRP_HsaDispute_MessageSent.ftl">
|
||||||
}
|
}
|
||||||
<#else>
|
<#else>
|
||||||
<#stop>
|
<#stop>
|
||||||
</#if>
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#-- "Reference is empty"-->
|
||||||
|
<#stop>
|
||||||
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<#-- use protobuf of class HsaDispute to find Reflex Wms fields names -->
|
<#-- use protobuf of class HsaDispute to find HARDIS WMS fields names -->
|
||||||
|
|
||||||
|
|
||||||
"MetaData": [ ]
|
"MetaData": [ ]
|
||||||
@ -8,7 +8,7 @@
|
|||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
<#if dispute.dispute_preparation??>
|
<#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}"
|
"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>
|
<#else>
|
||||||
<#stop "preparation order list is empty" >
|
<#stop "preparation order list is empty" >
|
||||||
@ -21,7 +21,7 @@
|
|||||||
},
|
},
|
||||||
"Payload": {
|
"Payload": {
|
||||||
<#if dispute.dispute_reference?? && dispute.dispute_reference!="">
|
<#if dispute.dispute_reference?? && dispute.dispute_reference!="">
|
||||||
"Title":"${dispute.dispute_reference?json_string}",
|
"Title":"${dispute.dispute_reference?trim?json_string}",
|
||||||
<#else>
|
<#else>
|
||||||
"Title":"",
|
"Title":"",
|
||||||
</#if>
|
</#if>
|
||||||
@ -43,44 +43,22 @@
|
|||||||
<#include "RFXtoRP_HsaDispute_ClaimMetadata.ftl">,
|
<#include "RFXtoRP_HsaDispute_ClaimMetadata.ftl">,
|
||||||
<#-- To configure -->
|
<#-- To configure -->
|
||||||
<#include "RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl">
|
<#include "RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl">
|
||||||
<#if dispute.dispute_type_code=="050" > <#-- Preparation -->
|
<#if dispute.dispute_type_code=="050" >
|
||||||
<#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_contractor_reference?trim?json_string}",
|
||||||
"EntityID":"${dispute.dispute_preparation.preparation_order_list[0].preparation_order_physical_depot_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_activity_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string}",
|
"DisplayID":"${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string}",
|
||||||
"DisplayID":"${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
"EntityID":"O${dispute.dispute_preparation.preparation_order_list[0].preparation_order_physical_depot_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_activity_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_year_number?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_number?trim?json_string}",
|
|
||||||
"DisplayID":"O${dispute.dispute_preparation.preparation_order_list[0].preparation_order_physical_depot_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_activity_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_year_number?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_number?trim?json_string}",
|
|
||||||
</#if>
|
|
||||||
<#else>
|
<#else>
|
||||||
<#if dispute.dispute_type_code=="030" || dispute.dispute_type_code=="070" >
|
<#if dispute.dispute_type_code=="070" || dispute.dispute_type_code=="030" >
|
||||||
<#if dispute.dispute_reception.reception_type_code=="030"> <#-- Receipt transfer type -->
|
"EntityID":"${dispute.dispute_reception.reception_reference?trim?json_string}",
|
||||||
<#if dispute.dispute_reception.reception_supplier.supplier_transfer_physical_depot?? && dispute.dispute_reception.reception_supplier.supplier_transfer_physical_depot!="" >
|
"DisplayID":"${dispute.dispute_reception.reception_reference?trim?json_string}",
|
||||||
"EntityID":"${dispute.dispute_reception.reception_supplier.supplier_transfer_physical_depot?json_string}${dispute.dispute_reception.reception_supplier.supplier_activity_code?json_string}${dispute.dispute_reception.reception_contractor_code?json_string}${dispute.dispute_reception.reception_reference?json_string}",
|
<#else>
|
||||||
"DisplayID":"${dispute.dispute_reception.reception_reference?json_string}",
|
<#stop "WMS type code not supported">
|
||||||
<#else>
|
|
||||||
<#if dispute.dispute_reception.reception_reference?? && dispute.dispute_reception.reception_reference!="">
|
|
||||||
"EntityID":"R${dispute.dispute_reception.reception_physical_depot_code?json_string}${dispute.dispute_reception.reception_activity_code?json_string}${dispute.dispute_reception.reception_contractor_code?json_string}${dispute.dispute_reception.reception_year_number?json_string}${dispute.dispute_reception.reception_number?json_string}",
|
|
||||||
"DisplayID":"${dispute.dispute_reception.reception_reference?json_string}",
|
|
||||||
<#else>
|
|
||||||
"EntityID":"R${dispute.dispute_reception.reception_physical_depot_code?json_string}${dispute.dispute_reception.reception_activity_code?json_string}${dispute.dispute_reception.reception_contractor_code?json_string}${dispute.dispute_reception.reception_year_number?json_string}${dispute.dispute_reception.reception_number?json_string}",
|
|
||||||
"DisplayID":"R${dispute.dispute_reception.reception_physical_depot_code?json_string}${dispute.dispute_reception.reception_activity_code?json_string}${dispute.dispute_reception.reception_contractor_code?json_string}${dispute.dispute_reception.reception_year_number?json_string}${dispute.dispute_reception.reception_number?json_string}",
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#if dispute.dispute_reception.reception_type_code=="010" || dispute.dispute_reception.reception_type_code=="020" >
|
|
||||||
"EntityID":"R${dispute.dispute_reception.reception_physical_depot_code?json_string}${dispute.dispute_reception.reception_activity_code?json_string}${dispute.dispute_reception.reception_contractor_code?json_string}${dispute.dispute_reception.reception_year_number?json_string}${dispute.dispute_reception.reception_number?json_string}",
|
|
||||||
"DisplayID":"${dispute.dispute_reception.reception_reference?json_string}",
|
|
||||||
<#else>
|
|
||||||
<#stop "WMS type code not supported">
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
<#if TableReasonCode[dispute.dispute_reason_code]??>
|
<#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>
|
<#else>
|
||||||
<#stop "Claim reason code not supported" >
|
<#stop "Reason code not supported">
|
||||||
</#if>
|
</#if>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -88,4 +66,3 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
"Goods": {
|
"Goods": {
|
||||||
"ItemID": "${reflexMvtStockInterface.item_code?trim?json_string}",
|
"ItemID": "${reflexMvtStockInterface.item_code?trim?json_string}",
|
||||||
"LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}",
|
"LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}",
|
||||||
<#if (priority_date!="") && (priority_date?starts_with("00")== false) >
|
<#if (reflexMvtStockInterface.ipg_priority_date!="") && (reflexMvtStockInterface.ipg_priority_date?starts_with("00")== false) >
|
||||||
"PriorityDate": "${priority_date}",
|
"PriorityDate": "${priority_date}",
|
||||||
<#else>
|
<#else>
|
||||||
"PriorityDate": "1970-01-01T00:00:00Z",
|
"PriorityDate": "1970-01-01T00:00:00Z",
|
||||||
@ -31,24 +31,24 @@
|
|||||||
},
|
},
|
||||||
<#if reflexMvtStockInterface.ipg_move_type?? & reflexMvtStockInterface.ipg_move_type=="120"> <#-- if it is a transfer-type movement -->
|
<#if reflexMvtStockInterface.ipg_move_type?? & reflexMvtStockInterface.ipg_move_type=="120"> <#-- if it is a transfer-type movement -->
|
||||||
<#if reflexMvtStockInterface.origin_order_line_reference?? && reflexMvtStockInterface.origin_order_line_reference!="">
|
<#if reflexMvtStockInterface.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}",
|
"OrderID": "${reflexMvtStockInterface.origin_order_line_reference?trim?json_string}",
|
||||||
<#else>
|
<#else>
|
||||||
<#if reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!="">
|
<#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}",
|
"OrderID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}",
|
||||||
<#else>
|
<#else>
|
||||||
"ExecutionflowID": "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": "R${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>
|
</#if>
|
||||||
<#else>
|
<#else>
|
||||||
<#if reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!="">
|
<#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}",
|
"OrderID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}",
|
||||||
<#else>
|
<#else>
|
||||||
"ExecutionflowID": "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": "R${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>
|
</#if>
|
||||||
<#if reflexMvtStockInterface.origin_order_line_number_reference?? && reflexMvtStockInterface.origin_order_line_number_reference!=0>
|
<#if reflexMvtStockInterface.origin_order_line_number_reference?? && reflexMvtStockInterface.origin_order_line_number_reference!=0>
|
||||||
@ -66,4 +66,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
@ -1,4 +1,4 @@
|
|||||||
<#-- use protobuf of class HsaIpgMove to find Reflex WMS fields names -->
|
<#-- use protobuf of class HsaIpgMove to find HARDIS WMS fields names -->
|
||||||
|
|
||||||
<#--
|
<#--
|
||||||
|
|
||||||
|
|||||||
@ -15,22 +15,22 @@
|
|||||||
"Value": { "String" : "no batch"}
|
"Value": { "String" : "no batch"}
|
||||||
<#else>
|
<#else>
|
||||||
"Value": { "String" : "${reflexMvtStockInterface.batch_1}"}
|
"Value": { "String" : "${reflexMvtStockInterface.batch_1}"}
|
||||||
</#if>
|
</#if>
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Key": "HeldForSpecificCode",
|
"Key": "HeldForSpecificCode",
|
||||||
"Value": { "Bool" : "${reflexMvtStockInterface.ipg_specific_code_held}"}
|
"Value": { "Bool" : "${reflexMvtStockInterface.ipg_specific_code_held}"}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
<#assign manufacturing_date = reflexMvtStockInterface.manufacture_date?datetime(rfx_date_format_default)?iso_utc />
|
<#assign manufacturing_date = reflexMvtStockInterface.manufacture_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
"Key": "ManufacturingDate",
|
"Key": "ManufacturingDate",
|
||||||
"Value": "Timestamp": {
|
"Value": "Timestamp": {
|
||||||
"AuthorTimeZone": "${time_zone_rfx}",
|
"AuthorTimeZone": "${time_zone_rfx}",
|
||||||
"DateTime": "${manufacturing_date}"
|
"DateTime": "${manufacturing_date}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
-->
|
-->
|
||||||
"SegmentationKeys": [ ]
|
"SegmentationKeys": [ ]
|
||||||
@ -1,45 +1,45 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message RFX -->
|
<#-- input : message HARDIS WMS -->
|
||||||
<#-- project : projectId in ReflexPlatform -->
|
<#-- project : projectId in HARDIS SC NETWORK -->
|
||||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
<#assign organisationRP = organisation>
|
<#assign organisationRP = organisation>
|
||||||
|
|
||||||
|
|
||||||
<#assign aDateTime = .now>
|
<#assign aDateTime = .now>
|
||||||
|
|
||||||
<#switch cloudEventMsg.action>
|
<#switch cloudEventMsg.action>
|
||||||
<#case "C">
|
<#case "C">
|
||||||
<#case "U">
|
<#case "U">
|
||||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign lv = JsonUtil.jsonToMap(dataRfx)>
|
<#assign lv = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ItemLogisticVariantUpdated>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ItemLogisticVariantUpdated>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaItmLv_LogisticVariantUpdated.ftl">
|
<#include "RFXtoRP_HsaItmLv_LogisticVariantUpdated.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#case "D">
|
<#case "D">
|
||||||
<#-- *********************************************** Action = DELETE ******************** -->
|
<#-- *********************************************** Action = DELETE ******************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign lv = JsonUtil.jsonToMap(dataRfx)>
|
<#assign lv = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ItemLogisticVariantRemoved>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ItemLogisticVariantRemoved>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaItmLv_LogisticVariantRemoved.ftl">
|
<#include "RFXtoRP_HsaItmLv_LogisticVariantRemoved.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop >
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<#-- use protobuf of class HsaItm to find Reflex Wms fields names -->
|
<#-- use protobuf of class HsaItm to find HARDIS WMS fields names -->
|
||||||
|
|
||||||
|
|
||||||
"MetaData": [ ]
|
"MetaData": [ ]
|
||||||
@ -1,40 +1,40 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message HARDIS WMS -->
|
<#-- input : message HARDIS WMS -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in HARDIS SC NETWORK -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
<#assign organisationRP = organisation>
|
<#assign organisationRP = organisation>
|
||||||
|
|
||||||
<#assign aDateTime = .now>
|
<#assign aDateTime = .now>
|
||||||
|
|
||||||
<#stop>
|
<#stop>
|
||||||
|
|
||||||
<#switch cloudEventMsg.action>
|
<#switch cloudEventMsg.action>
|
||||||
<#case "C">
|
<#case "C">
|
||||||
<#case "U">
|
<#case "U">
|
||||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#case "D">
|
<#case "D">
|
||||||
<#-- *********************************************** Action = DELETE *************************** -->
|
<#-- *********************************************** Action = DELETE *************************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop >
|
||||||
</#switch>
|
</#switch>
|
||||||
@ -17,52 +17,57 @@
|
|||||||
<#assign preparationStatusInterface = JsonUtil.jsonToMap(dataRfx) />
|
<#assign preparationStatusInterface = JsonUtil.jsonToMap(dataRfx) />
|
||||||
[
|
[
|
||||||
<#--**Pick batch runned (200) **-->
|
<#--**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}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaProStatus_PreparationExpected.ftl">
|
<#include "RFXtoRP_HsaProStatus_PreparationStarted.ftl">
|
||||||
}
|
}
|
||||||
<#else>
|
<#else>
|
||||||
<#-- ** Collection started (300) and Preparation in progress (400)** -->
|
<#-- ****Preparation dispatched (600)** -->
|
||||||
<#if preparationStatusInterface.preparation_status_type == "100" && (preparationStatusInterface.preparation_status_code == "300" || preparationStatusInterface.preparation_status_code == "400") >
|
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "600" >
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationStarted>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationCompleted>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaProStatus_PreparationStarted.ftl">
|
<#include "RFXtoRP_HsaProStatus_PreparationCompleted.ftl">
|
||||||
}
|
},
|
||||||
<#else>
|
{
|
||||||
<#-- ****Preparation dispatched (600)** -->
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowTransportStarted>
|
||||||
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "600" >
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationCompleted>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"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>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaProStatus_TransportStarted.ftl">
|
<#include "RFXtoRP_HsaProStatus_ExecutionflowCancelled.ftl">
|
||||||
}
|
}
|
||||||
<#else>
|
<#else>
|
||||||
<#-- ****Preparation cancelled (650)**** -->
|
<#stop>
|
||||||
<#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>
|
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#--PRO reference is empty-->
|
||||||
|
<#stop >
|
||||||
|
</#if>
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
|
|||||||
@ -8,11 +8,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
<#if preparationStatusInterface.preparation_order_originator_reference?? && preparationStatusInterface.preparation_order_originator_reference!="">
|
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
||||||
"RefID": "${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
"RefID": "O${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_year}${preparationStatusInterface.preparation_order_number}",
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${preparation_status_datetime}",
|
"DateTime": "${preparation_status_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
|||||||
@ -7,11 +7,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
<#if preparationStatusInterface.preparation_order_originator_reference?? && preparationStatusInterface.preparation_order_originator_reference!="">
|
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
||||||
"RefID": "${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
"RefID": "O${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_year}${preparationStatusInterface.preparation_order_number}",
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${preparation_status_datetime}",
|
"DateTime": "${preparation_status_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
|||||||
@ -7,14 +7,10 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
<#if preparationStatusInterface.preparation_order_originator_reference?? && preparationStatusInterface.preparation_order_originator_reference!="">
|
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
||||||
"RefID": "${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
"RefDate": {
|
||||||
<#else>
|
"DateTime": "${preparation_status_datetime}",
|
||||||
"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}",
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${preparation_status_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@ -7,14 +7,10 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
<#if preparationStatusInterface.preparation_order_originator_reference?? && preparationStatusInterface.preparation_order_originator_reference!="">
|
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
||||||
"RefID": "${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
"RefDate": {
|
||||||
<#else>
|
"DateTime": "${preparation_status_datetime}",
|
||||||
"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}",
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${preparation_status_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@ -7,14 +7,10 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
<#if preparationStatusInterface.preparation_order_originator_reference?? && preparationStatusInterface.preparation_order_originator_reference!="">
|
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
||||||
"RefID": "${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
"RefID": "O${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_year}${preparationStatusInterface.preparation_order_number}",
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${preparation_status_datetime}",
|
"DateTime": "${preparation_status_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@ -1,10 +1,7 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message RFX -->
|
<#-- input : message HARDIS WMS -->
|
||||||
<#-- project : projectId in ReflexPlatform -->
|
<#-- project : projectId in HARDIS SC NETWORK -->
|
||||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
@ -20,7 +17,7 @@
|
|||||||
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
|
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreatedv2>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaSup_ActorCreated.ftl">
|
<#include "RFXtoRP_HsaSup_ActorCreated.ftl">
|
||||||
|
|||||||
@ -1,3 +1,6 @@
|
|||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ActorPrefix.ftl">
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
@ -8,7 +11,10 @@
|
|||||||
},
|
},
|
||||||
"Payload": {
|
"Payload": {
|
||||||
"Name": "${actor.designation?json_string}",
|
"Name": "${actor.designation?json_string}",
|
||||||
|
"ManagedStock": false,
|
||||||
"IsCarrier": false,
|
"IsCarrier": false,
|
||||||
|
<#-- ***Partner ID could be added here *** -->
|
||||||
|
<#-- "PartnerID": "${}", -->
|
||||||
|
|
||||||
<#include "RFXtoRP_HsaSup_ActorCreated_Metadata.ftl">,
|
<#include "RFXtoRP_HsaSup_ActorCreated_Metadata.ftl">,
|
||||||
|
|
||||||
@ -16,6 +22,7 @@
|
|||||||
{
|
{
|
||||||
<#-- if HARDIS WMS address is structured -->
|
<#-- if HARDIS WMS address is structured -->
|
||||||
<#if actor.supplier_structured_address?? >
|
<#if actor.supplier_structured_address?? >
|
||||||
|
|
||||||
"Name": "${actor.supplier_structured_address.name_or_company?json_string}",
|
"Name": "${actor.supplier_structured_address.name_or_company?json_string}",
|
||||||
"StreetAddressOne" : "${actor.supplier_structured_address.street_and_PO?json_string}",
|
"StreetAddressOne" : "${actor.supplier_structured_address.street_and_PO?json_string}",
|
||||||
"StreetAddressTwo" : "${actor.supplier_structured_address.additionnal_data?json_string}",
|
"StreetAddressTwo" : "${actor.supplier_structured_address.additionnal_data?json_string}",
|
||||||
@ -29,6 +36,7 @@
|
|||||||
</#if>
|
</#if>
|
||||||
"ProvinceCode": "${actor.supplier_structured_address.territorial_div_code?json_string}",
|
"ProvinceCode": "${actor.supplier_structured_address.territorial_div_code?json_string}",
|
||||||
"State": "${actor.supplier_structured_address.country_designation?json_string}"
|
"State": "${actor.supplier_structured_address.country_designation?json_string}"
|
||||||
|
|
||||||
<#-- if HARDIS WMS address is not structured -->
|
<#-- if HARDIS WMS address is not structured -->
|
||||||
<#else>
|
<#else>
|
||||||
<#if actor.optional_attributes?? >
|
<#if actor.optional_attributes?? >
|
||||||
@ -39,6 +47,7 @@
|
|||||||
"CountryCode" : ""
|
"CountryCode" : ""
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
},
|
},
|
||||||
<#if actor.optional_attributes?? >
|
<#if actor.optional_attributes?? >
|
||||||
"Phones": ["${actor.optional_attributes.telephone?json_string}",
|
"Phones": ["${actor.optional_attributes.telephone?json_string}",
|
||||||
|
|||||||
@ -1,3 +1,6 @@
|
|||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ActorPrefix.ftl">
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
|
|||||||
@ -1,40 +1,40 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message HARDIS WMS -->
|
<#-- input : message HARDIS WMS -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in HARDIS SC NETWORK -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
<#assign organisationRP = organisation>
|
<#assign organisationRP = organisation>
|
||||||
|
|
||||||
<#assign aDateTime = .now>
|
<#assign aDateTime = .now>
|
||||||
|
|
||||||
<#stop>
|
<#stop>
|
||||||
|
|
||||||
<#switch cloudEventMsg.action>
|
<#switch cloudEventMsg.action>
|
||||||
<#case "C">
|
<#case "C">
|
||||||
<#case "U">
|
<#case "U">
|
||||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#case "D">
|
<#case "D">
|
||||||
<#-- *********************************************** Action = DELETE *************************** -->
|
<#-- *********************************************** Action = DELETE *************************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop >
|
||||||
</#switch>
|
</#switch>
|
||||||
@ -17,7 +17,7 @@
|
|||||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreatedv2>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrDepot_ActorCreated.ftl">
|
<#include "RFXtoRP_HsrDepot_ActorCreated.ftl">
|
||||||
|
|||||||
@ -11,12 +11,20 @@
|
|||||||
},
|
},
|
||||||
"Payload": {
|
"Payload": {
|
||||||
"Name": "${depot.physical_depot_designation?json_string}",
|
"Name": "${depot.physical_depot_designation?json_string}",
|
||||||
|
"ManagedStock": true,
|
||||||
"IsCarrier": false,
|
"IsCarrier": false,
|
||||||
|
<#-- ***Partner ID could be added here *** -->
|
||||||
|
<#-- "PartnerID": "${}", -->
|
||||||
|
|
||||||
|
|
||||||
<#include "RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl">,
|
<#include "RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl">,
|
||||||
|
|
||||||
|
|
||||||
"Address":
|
"Address":
|
||||||
{
|
{
|
||||||
<#-- if HARDIS WMS address is structured -->
|
<#-- if HARDIS WMS address is structured -->
|
||||||
<#if depot.physical_depot_structured_address?? >
|
<#if depot.physical_depot_structured_address?? >
|
||||||
|
|
||||||
"Name": "${depot.physical_depot_structured_address.name_or_company?json_string}",
|
"Name": "${depot.physical_depot_structured_address.name_or_company?json_string}",
|
||||||
"StreetAddressOne" : "${depot.physical_depot_structured_address.street_and_PO?json_string}",
|
"StreetAddressOne" : "${depot.physical_depot_structured_address.street_and_PO?json_string}",
|
||||||
"StreetAddressTwo" : "${depot.physical_depot_structured_address.additionnal_data?json_string}",
|
"StreetAddressTwo" : "${depot.physical_depot_structured_address.additionnal_data?json_string}",
|
||||||
@ -30,6 +38,7 @@
|
|||||||
</#if>
|
</#if>
|
||||||
"ProvinceCode": "${depot.physical_depot_structured_address.territorial_div_code?json_string}",
|
"ProvinceCode": "${depot.physical_depot_structured_address.territorial_div_code?json_string}",
|
||||||
"State": "${depot.physical_depot_structured_address.country_designation?json_string}"
|
"State": "${depot.physical_depot_structured_address.country_designation?json_string}"
|
||||||
|
|
||||||
<#-- if HARDIS WMS address is not structured -->
|
<#-- if HARDIS WMS address is not structured -->
|
||||||
<#else>
|
<#else>
|
||||||
<#if depot.physical_depot_address??>
|
<#if depot.physical_depot_address??>
|
||||||
|
|||||||
@ -1,40 +1,40 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message HARDIS WMS -->
|
<#-- input : message HARDIS WMS -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in HARDIS SC NETWORK -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
<#assign organisationRP = organisation>
|
<#assign organisationRP = organisation>
|
||||||
|
|
||||||
<#assign aDateTime = .now>
|
<#assign aDateTime = .now>
|
||||||
|
|
||||||
<#stop>
|
<#stop>
|
||||||
|
|
||||||
<#switch cloudEventMsg.action>
|
<#switch cloudEventMsg.action>
|
||||||
<#case "C">
|
<#case "C">
|
||||||
<#case "U">
|
<#case "U">
|
||||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#case "D">
|
<#case "D">
|
||||||
<#-- *********************************************** Action = DELETE *************************** -->
|
<#-- *********************************************** Action = DELETE *************************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop >
|
||||||
</#switch>
|
</#switch>
|
||||||
@ -17,64 +17,69 @@
|
|||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign preparationOrder = JsonUtil.jsonToMap(dataRfx)>
|
<#assign preparationOrder = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
|
||||||
<#if preparationOrder.total_lv_validated?? && preparationOrder.total_lv_validated !=0>
|
<#if preparationOrder.total_lv_validated !=0>
|
||||||
<#if preparationOrder.preparation_type_code=="010" || preparationOrder.preparation_type_code=="030">
|
<#if preparationOrder.preparation_line_lst??>
|
||||||
<#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}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"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>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl">
|
<#include "RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl">
|
||||||
}
|
}
|
||||||
|
<#if !hd_numberHmapHUadded[despatched_ipg.hd_number]?? && (trackingNumberSource==2 || trackingNumberSource==3 )>
|
||||||
<#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="">
|
|
||||||
,
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCarrierUpdated>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrPrepa_CarrierUpdated.ftl">
|
|
||||||
}
|
|
||||||
</#if>
|
|
||||||
|
|
||||||
<#assign refIDHmap ={}>
|
|
||||||
<#assign hd_numberHmap ={}>
|
|
||||||
<#assign hd_numberHmapHUadded ={}>
|
|
||||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? ) as preparation_line>
|
|
||||||
<#list preparation_line.despatched_ipg_list as despatched_ipg>
|
|
||||||
<#assign HUadded_packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) />
|
|
||||||
<#if (!hd_numberHmap[despatched_ipg.hd_number]?? || !hd_numberHmap[despatched_ipg.carton_number]??) && (trackingNumberSource==2 || trackingNumberSource==3 || (despatched_ipg.consignment_unit_id!="" && trackingNumberSource==1))>
|
|
||||||
,
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl">
|
|
||||||
}
|
|
||||||
</#if>
|
|
||||||
<#if despatched_ipg.carton_number != "000000000000000000" && despatched_ipg.carton_number!=despatched_ipg.hd_number >
|
|
||||||
,
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitHUsAdded>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrPrepa_HandlingunitHUsAdded.ftl">
|
|
||||||
},
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl">
|
|
||||||
}
|
|
||||||
<#if !hd_numberHmapHUadded[despatched_ipg.hd_number]?? && (trackingNumberSource==2 || trackingNumberSource==3 )>
|
|
||||||
<#assign hd_numberHmapHUadded += {despatched_ipg.hd_number,despatched_ipg.hd_number}>
|
<#assign hd_numberHmapHUadded += {despatched_ipg.hd_number,despatched_ipg.hd_number}>
|
||||||
,
|
,
|
||||||
{
|
{
|
||||||
@ -85,22 +90,18 @@
|
|||||||
}
|
}
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
</#if>
|
</#if>
|
||||||
</#list>
|
|
||||||
</#list>
|
</#list>
|
||||||
<#assign refIDHmap ={}>
|
</#list>
|
||||||
]
|
<#assign refIDHmap ={}>
|
||||||
<#else>
|
]
|
||||||
<#-- No line-->
|
|
||||||
<#stop>
|
|
||||||
</#if>
|
|
||||||
<#else>
|
<#else>
|
||||||
<#-- Preparation Type not supported-->
|
<#-- No line-->
|
||||||
<#stop>
|
<#stop >
|
||||||
</#if>
|
</#if>
|
||||||
<#else>
|
<#else>
|
||||||
<#-- no confirmed quantity for the preparation - preparation closed-->
|
<#-- no confirmed quantity for the preparation - preparation closed-->
|
||||||
<#stop>
|
<#stop >
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -3,35 +3,31 @@
|
|||||||
<#include "ActorPrefix.ftl">
|
<#include "ActorPrefix.ftl">
|
||||||
[
|
[
|
||||||
<#assign refIDHmap_local ={}>
|
<#assign refIDHmap_local ={}>
|
||||||
<#list preparationOrder.preparation_line_lst as preparation_line>
|
<#list preparationOrder.preparation_line_lst?filter(l ->l.preparation_order_originator_reference!="") as preparation_line>
|
||||||
<#if preparation_line.preparation_order_originator_reference?? && preparation_line.preparation_order_originator_reference!="">
|
<#assign OrderOriginReference = preparation_line.preparation_order_originator_reference?trim?json_string>
|
||||||
<#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}">
|
<#if !refIDHmap_local[OrderOriginReference]?? >
|
||||||
<#else>
|
<#if refIDHmap_local?size != 0 >
|
||||||
<#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>
|
||||||
<#if !refIDHmap_local[OrderOriginReference]?? >
|
|
||||||
<#if refIDHmap_local?size != 0 >
|
|
||||||
,
|
|
||||||
</#if>
|
|
||||||
<#assign refIDHmap_local +={OrderOriginReference,OrderOriginReference}>
|
<#assign refIDHmap_local +={OrderOriginReference,OrderOriginReference}>
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID":{
|
"ID":{
|
||||||
"RefID": "${OrderOriginReference}"
|
"RefID": "${OrderOriginReference}"
|
||||||
},
|
},
|
||||||
"Payload":{
|
"Payload":{
|
||||||
"Carrier": {
|
"Carrier": {
|
||||||
"ActorID": "${RFXtoRPprefixCarrier(preparationOrder.load_data.carrier_code?trim?json_string)}"
|
"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>
|
</#if>
|
||||||
</#list>
|
</#list>
|
||||||
<#assign refIDHmap_local ={}>
|
<#assign refIDHmap_local ={}>
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
[
|
[
|
||||||
<#assign dispatched_datetime = RfxDateTimetoUTCWithTimezone(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_rfx) />
|
<#assign dispatched_datetime = RfxDateTimetoUTCWithTimezone(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_rfx) />
|
||||||
<#assign refIDHmap_local ={}>
|
<#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>
|
<#list preparation_line.despatched_ipg_list as despatched_ipg>
|
||||||
<#if !refIDHmap_local[despatched_ipg.hd_number]?? >
|
<#if !refIDHmap_local[despatched_ipg.hd_number]?? >
|
||||||
<#if refIDHmap_local?size != 0 >
|
<#if refIDHmap_local?size != 0 >
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ActorPrefix.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>
|
<#list preparation_line.despatched_ipg_list as despatched_ipg>
|
||||||
<#assign packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) />
|
<#assign packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) />
|
||||||
{
|
{
|
||||||
@ -77,19 +77,19 @@
|
|||||||
"ItemID": "${preparation_line.item_code?trim?json_string}",
|
"ItemID": "${preparation_line.item_code?trim?json_string}",
|
||||||
"LVBranchID": "${preparation_line.item_lv_code?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)>
|
<#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 />
|
<#assign priority_date = despatched_ipg.ipg_use_by_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
"PriorityDate": "${priority_date}",
|
"PriorityDate": "${priority_date}",
|
||||||
<#else>
|
<#else>
|
||||||
<#if (despatched_ipg.ipg_best_before_date?length != 0) && (despatched_ipg.ipg_best_before_date?starts_with("00")== false)>
|
<#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 />
|
<#assign priority_date = despatched_ipg.ipg_best_before_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
"PriorityDate": "${priority_date}",
|
|
||||||
<#else>
|
|
||||||
<#if (despatched_ipg.ipg_sell_by_date?length != 0) && (despatched_ipg.ipg_sell_by_date?starts_with("00")== false)>
|
|
||||||
<#assign priority_date = despatched_ipg.ipg_sell_by_date?datetime(rfx_date_format_default)?iso_utc />
|
|
||||||
"PriorityDate": "${priority_date}",
|
"PriorityDate": "${priority_date}",
|
||||||
<#else>
|
<#else>
|
||||||
<#if (despatched_ipg.ipg_manufacture_date?length != 0) && (despatched_ipg.ipg_manufacture_date?starts_with("00") == false)>
|
<#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 />
|
<#assign priority_date = despatched_ipg.ipg_manufacture_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
"PriorityDate": "${priority_date}",
|
"PriorityDate": "${priority_date}",
|
||||||
<#else>
|
<#else>
|
||||||
@ -111,15 +111,9 @@
|
|||||||
|
|
||||||
<#-- Segmentation Keys inclusion -->
|
<#-- Segmentation Keys inclusion -->
|
||||||
<#include "RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl">
|
<#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}",
|
"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}",
|
"ExecutionflowID": "${preparation_line.preparation_order_originator_reference?trim?json_string}",
|
||||||
<#else>
|
|
||||||
"OrderID": "O${preparation_line.pro_physical_depot_code?trim?json_string}${preparationOrder.activity_code?trim?json_string}${preparation_line.pro_originator_code?trim?json_string}${preparation_line.pro_year}${preparation_line.pro_number}",
|
|
||||||
"ExecutionflowID": "O${preparation_line.pro_physical_depot_code?trim?json_string}${preparationOrder.activity_code?trim?json_string}${preparation_line.pro_originator_code?trim?json_string}${preparation_line.pro_year}${preparation_line.pro_number}",
|
|
||||||
</#if>
|
|
||||||
|
|
||||||
<#if (preparation_line.pro_originator_reference_line_number!0) != 0>
|
<#if (preparation_line.pro_originator_reference_line_number!0) != 0>
|
||||||
"LineID": "${preparation_line.pro_originator_reference_line_number}",
|
"LineID": "${preparation_line.pro_originator_reference_line_number}",
|
||||||
<#else>
|
<#else>
|
||||||
|
|||||||
29
RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl
Normal file
29
RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl
Normal 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 ={}>
|
||||||
|
]
|
||||||
@ -34,15 +34,15 @@
|
|||||||
</#if>
|
</#if>
|
||||||
<#break>
|
<#break>
|
||||||
<#default>
|
<#default>
|
||||||
<#if despatched_ipg.consignment_unit_id!="">
|
<#if despatched_ipg.consignment_unit_id!="">
|
||||||
"RefID": "${despatched_ipg.consignment_unit_id?trim?json_string}",
|
"RefID": "${despatched_ipg.consignment_unit_id?trim?json_string}",
|
||||||
<#else>
|
<#else>
|
||||||
<#if despatched_ipg.carton_number != "000000000000000000">
|
<#if despatched_ipg.carton_number != "000000000000000000">
|
||||||
"RefID":"${despatched_ipg.carton_number}",
|
"RefID":"${despatched_ipg.carton_number}",
|
||||||
<#else>
|
<#else>
|
||||||
"RefID":"${despatched_ipg.hd_number}",
|
"RefID":"${despatched_ipg.hd_number}",
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
|
|||||||
@ -16,23 +16,28 @@
|
|||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
|
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
|
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
|
||||||
<#-- check preparation type code (internal order and reservation are ignored) -->
|
<#-- check preparation type code (internal order and reservation are ignored) -->
|
||||||
<#if preparation_order.preparation_type_code == "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??>
|
<#if preparation_order.line_list??>
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl">
|
<#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl">
|
||||||
}
|
}
|
||||||
<#else>
|
<#else>
|
||||||
<#-- No line -->
|
<#-- No line -->
|
||||||
<#stop>
|
<#stop>
|
||||||
</#if>
|
</#if>
|
||||||
<#else>
|
<#else>
|
||||||
<#-- Preparation order type not supported -->
|
<#-- preparation order type not supported -->
|
||||||
<#stop>
|
<#stop>
|
||||||
</#if>
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#-- PRO reference is empty -->
|
||||||
|
<#stop>
|
||||||
|
</#if>
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
@ -41,7 +46,7 @@
|
|||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
|
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
<#if preparation_order.preparation_type_code == "010" || preparation_order.preparation_type_code == "030" >
|
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
|
||||||
<#if preparation_order.line_list??>
|
<#if preparation_order.line_list??>
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||||
@ -54,11 +59,13 @@
|
|||||||
<#stop>
|
<#stop>
|
||||||
</#if>
|
</#if>
|
||||||
<#else>
|
<#else>
|
||||||
<#-- Preparation order type not supported -->
|
<#-- PRO reference is empty -->
|
||||||
<#stop>
|
<#stop>
|
||||||
</#if>
|
</#if>
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop >
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|||||||
@ -7,11 +7,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
|
"RefID": "${preparation_order.originator_reference?trim?json_string}",
|
||||||
"RefID": "${preparation_order.physical_depot_code?trim?json_string}${preparation_order.activity_code?trim?json_string}${preparation_order.originator_code?trim?json_string}${preparation_order.originator_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
"RefID": "O${preparation_order.physical_depot_code?trim?json_string}${preparation_order.activity_code?trim?json_string}${preparation_order.originator_code?trim?json_string}${preparation_order.preparation_order_year}${preparation_order.preparation_order_number}",
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${preparation_status_datetime}",
|
"DateTime": "${preparation_status_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
|||||||
@ -9,11 +9,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
|
"RefID": "${preparation_order.originator_reference?trim?json_string}",
|
||||||
"RefID": "${preparation_order.physical_depot_code?trim?json_string}${preparation_order.activity_code?trim?json_string}${preparation_order.originator_code?trim?json_string}${preparation_order.originator_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
"RefID": "O${preparation_order.physical_depot_code?trim?json_string}${preparation_order.activity_code?trim?json_string}${preparation_order.originator_code?trim?json_string}${preparation_order.preparation_order_year}${preparation_order.preparation_order_number}",
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${pro_creation_datetime}",
|
"DateTime": "${pro_creation_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
@ -35,51 +31,54 @@
|
|||||||
},
|
},
|
||||||
"ShipFromAcked": true,
|
"ShipFromAcked": true,
|
||||||
"ShipTo": {
|
"ShipTo": {
|
||||||
<#if preparation_order.preparation_type_code == "030" && preparation_order.optional_attributes.intermediate_consignee_transfer_physical_depot?? && preparation_order.optional_attributes.intermediate_consignee_transfer_physical_depot!="" && preparation_order.optional_attributes.transfer_intermediate_consignee=="true">
|
<#if
|
||||||
"ActorID": "${RFXtoRPprefixDepot(preparation_order.optional_attributes.intermediate_consignee_transfer_physical_depot?json_string)}"
|
<#-- 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>
|
<#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!="">
|
"Actor":
|
||||||
"ActorID": "${RFXtoRPprefixDepot(preparation_order.transfer_physical_depot_code?json_string)}"
|
{
|
||||||
<#else>
|
"Name" : "${(preparation_order.address.name_or_company_name!"")?json_string}",
|
||||||
<#if preparation_order.address.address_type_code == "" &&
|
"Address" :
|
||||||
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":
|
|
||||||
{
|
{
|
||||||
"Name" : "${(preparation_order.address.name_or_company_name!"")?json_string}",
|
"City" : "${(preparation_order.address.post_code_area_name!"")?json_string}",
|
||||||
"Address" :
|
<#assign isCountryCode = JsonUtil.isCountryCode(preparation_order.address.iso_country_code?upper_case) />
|
||||||
{
|
<#if isCountryCode>
|
||||||
"City" : "${(preparation_order.address.post_code_area_name!"")?json_string}",
|
"CountryCode" : "${(preparation_order.address.iso_country_code!"")?json_string}",
|
||||||
"CountryCode" : "${preparation_order.address.iso_country_code!""}",
|
<#else>
|
||||||
"PostalCode" : "${preparation_order.address.postal_code!""}",
|
"CountryCode" : "",
|
||||||
"StreetAddressOne" : "${(preparation_order.address.street_and_number_and_po_box!"")?json_string}",
|
</#if>
|
||||||
"StreetAddressTwo" : "${(preparation_order.address.additional_address_data_1!"")?json_string}",
|
"PostalCode" : "${(preparation_order.address.postal_code!"")?json_string}",
|
||||||
"StreetAddressThree" : "${(preparation_order.address.additional_address_data_2!"")?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}",
|
"Contact" :
|
||||||
"LastName" : "${(preparation_order.address.last_name!"")?json_string}",
|
{
|
||||||
"Emails" : ${splitEmailsIntoArray((preparation_order.address.mail_address!"")?json_string)},
|
"FirstName" : "${(preparation_order.address.first_name!"")?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}" ]
|
"LastName" : "${(preparation_order.address.last_name!"")?json_string}",
|
||||||
}
|
"Emails" : ${splitEmailsIntoArray((preparation_order.address.mail_address!"")?json_string)},
|
||||||
</#if>
|
"Phones" : ["${(preparation_order.address.mobile_phone_number!"")?json_string}","${(preparation_order.address.land_line_phone_number!"")?json_string}", "${(preparation_order.address.fax_number!"")?json_string}" ]
|
||||||
</#if>
|
}
|
||||||
</#if>
|
</#if>
|
||||||
},
|
},
|
||||||
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
|
"OrderID": "${preparation_order.originator_reference?trim?json_string}",
|
||||||
"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>
|
|
||||||
<#if preparation_order.line_list??>
|
<#if preparation_order.line_list??>
|
||||||
"Lines" : [
|
"Lines" : [
|
||||||
<#list preparation_order.line_list as preparation_order_line >
|
<#list preparation_order.line_list as preparation_order_line >
|
||||||
@ -118,14 +117,8 @@
|
|||||||
{
|
{
|
||||||
"RequestedDeliveryDateTime" :
|
"RequestedDeliveryDateTime" :
|
||||||
{
|
{
|
||||||
<#if preparation_order.intermediate_consignee_code?? && preparation_order.intermediate_consignee_code!="" && preparation_order.intermediate_delivery_start_datetime?? && preparation_order.intermediate_delivery_start_datetime!="0000-00-00T00:00:00">
|
|
||||||
<#assign intermediate_delivery_start_datetime = RfxDateTimetoUTCWithTimezone(preparation_order.intermediate_delivery_start_datetime,time_zone_rfx) />
|
|
||||||
"DateTime": "${intermediate_delivery_start_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
<#else>
|
|
||||||
"DateTime": "${planned_final_delivery_start_datetime}",
|
"DateTime": "${planned_final_delivery_start_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
</#if>
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<#-- use protobuf of class HsrPro to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsrPro to find HARDIS WMS fields names -->
|
||||||
|
|
||||||
<#--
|
<#--
|
||||||
|
|
||||||
"MetaData": [
|
"MetaData": [
|
||||||
{
|
{
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
"Value": { "String" : "no batch"}
|
"Value": { "String" : "no batch"}
|
||||||
<#else>
|
<#else>
|
||||||
"Value": { "String" : "${preparation_order_line.batch_1}"}
|
"Value": { "String" : "${preparation_order_line.batch_1}"}
|
||||||
</#if>
|
</#if>
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
-->
|
-->
|
||||||
|
|||||||
@ -15,42 +15,28 @@
|
|||||||
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
||||||
<#if receipt.receipt_type?? && receipt.receipt_type = "030" && receipt.line_list??> <#-- if reception is a transfer type -->
|
<#if receipt.receipt_type == "030">
|
||||||
[
|
<#stop "ignored message because receipt type = transfert">
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl">
|
|
||||||
|
|
||||||
},
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrReceiptList_TransfertReceiptExpected.ftl">
|
|
||||||
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#else>
|
<#else>
|
||||||
<#if receipt.line_list ??>
|
<#if receipt.line_list ??>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl">
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl">
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
|
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
|
||||||
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#else>
|
<#else>
|
||||||
|
<#-- No line-->
|
||||||
<#stop>
|
<#stop>
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
@ -60,77 +46,41 @@
|
|||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
<#if receipt.receipt_type?? && receipt.receipt_type == "030" && receipt.receipt_confirmed == "true" && receipt.confirmation_total_level_1==0 && receipt.confirmation_total_level_2==0 && receipt.confirmation_total_level_3==0>
|
<#if receipt.receipt_confirmed == "true" && 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>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"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>
|
<#else>
|
||||||
<#if receipt.receipt_type?? && receipt.receipt_type == "030" && receipt.receipt_confirmed == "false" && receipt.line_list??>
|
<#-- No line-->
|
||||||
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
<#stop>
|
||||||
[
|
|
||||||
{
|
|
||||||
<#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>
|
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
@ -142,19 +92,20 @@
|
|||||||
<#-- *********************************************** Action = DELETE ******************** -->
|
<#-- *********************************************** Action = DELETE ******************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
||||||
<#if receipt.line_list ??>
|
|
||||||
[
|
[
|
||||||
{
|
<#if receipt.line_list ??>
|
||||||
|
{
|
||||||
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl">
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl">
|
||||||
}
|
}
|
||||||
|
<#else>
|
||||||
|
<#-- No line-->
|
||||||
|
<#stop>
|
||||||
|
</#if>
|
||||||
]
|
]
|
||||||
<#else>
|
|
||||||
<#stop> <#-- No line-->
|
|
||||||
</#if>
|
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,20 +1,48 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.modification_datetime,time_zone_rfx) />
|
<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.modification_datetime,time_zone_rfx) />
|
||||||
|
<#assign refIDHmap_local ={}>
|
||||||
[
|
[
|
||||||
{
|
<#if receipt.line_list??>
|
||||||
"Header": {
|
<#list receipt.line_list as receipt_line >
|
||||||
"ProjectID": "${projectRP}"
|
<#if receipt_line.origin_order_line_reference?? && receipt_line.origin_order_line_reference!="">
|
||||||
},
|
<#if !refIDHmap_local[receipt_line.origin_order_line_reference]?? >
|
||||||
"ID": {
|
<#if refIDHmap_local?size != 0 >
|
||||||
"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": {
|
</#if>
|
||||||
"DateTime": "${receipt_status_datetime}",
|
<#assign refIDHmap_local +={receipt_line.origin_order_line_reference,receipt_line.origin_order_line_reference}>
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
{
|
||||||
}
|
"Header": {"ProjectID": "${projectRP}"},
|
||||||
},
|
"ID": {
|
||||||
"Payload": {
|
"RefID": "${receipt_line.origin_order_line_reference?trim?json_string}",
|
||||||
}
|
"RefDate": {
|
||||||
}
|
"DateTime": "${receipt_status_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload": {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
{
|
||||||
|
"Header": {"ProjectID": "${projectRP}"},
|
||||||
|
"ID": {
|
||||||
|
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
||||||
|
"RefID": "${receipt.receipt_reference?trim?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}",
|
||||||
|
</#if>
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${receipt_status_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload": {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
<#break>
|
||||||
|
</#if>
|
||||||
|
</#list>
|
||||||
|
</#if>
|
||||||
]
|
]
|
||||||
|
|||||||
@ -9,7 +9,11 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "R${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}",
|
<#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": {
|
"RefDate": {
|
||||||
"DateTime": "${receipt_creation_datetime}",
|
"DateTime": "${receipt_creation_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
@ -37,18 +41,18 @@
|
|||||||
"ActorID": "${RFXtoRPprefixDepot(receipt.physical_depot_code?trim?json_string)}"
|
"ActorID": "${RFXtoRPprefixDepot(receipt.physical_depot_code?trim?json_string)}"
|
||||||
},
|
},
|
||||||
"ShipToAcked": true,
|
"ShipToAcked": true,
|
||||||
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
|
||||||
"OrderID":"${receipt.receipt_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
"OrderID":"R${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}",
|
|
||||||
</#if>
|
|
||||||
<#if receipt.carrier_informations.carrier_code != "">
|
<#if receipt.carrier_informations.carrier_code != "">
|
||||||
"Carrier":
|
"Carrier":
|
||||||
{
|
{
|
||||||
"ActorID":"${RFXtoRPprefixCarrier(receipt.carrier_informations.carrier_code?trim?json_string)}"
|
"ActorID":"${RFXtoRPprefixCarrier(receipt.carrier_informations.carrier_code?trim?json_string)}"
|
||||||
},
|
},
|
||||||
</#if>
|
</#if>
|
||||||
|
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
||||||
|
"OrderID": "${receipt.receipt_reference?trim?json_string}",
|
||||||
|
<#else>
|
||||||
|
"OrderID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}",
|
||||||
|
</#if>
|
||||||
<#if receipt.line_list??>
|
<#if receipt.line_list??>
|
||||||
"Lines" : [
|
"Lines" : [
|
||||||
<#list receipt.line_list as line>
|
<#list receipt.line_list as line>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<#-- use protobuf of class HsrReceiptList to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsrReceiptList to find HARDIS WMS fields names -->
|
||||||
|
|
||||||
<#--
|
<#--
|
||||||
|
|
||||||
"MetaData": [
|
"MetaData": [
|
||||||
{
|
{
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
"Value": { "String" : "no batch"}
|
"Value": { "String" : "no batch"}
|
||||||
<#else>
|
<#else>
|
||||||
"Value": { "String" : "${line_without_detail.batch_1}"}
|
"Value": { "String" : "${line_without_detail.batch_1}"}
|
||||||
</#if>
|
</#if>
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Key": "HeldForSpecificCode",
|
"Key": "HeldForSpecificCode",
|
||||||
@ -25,15 +25,15 @@
|
|||||||
<#else>
|
<#else>
|
||||||
"Value": { "Bool" : "False"}
|
"Value": { "Bool" : "False"}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
<#assign manufacturing_date = line_without_detail.ipg_date_of_manufacture_date?datetime(rfx_date_format_default)?iso_utc />
|
<#assign manufacturing_date = line_without_detail.ipg_date_of_manufacture_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
"Key": "ManufacturingDate",
|
"Key": "ManufacturingDate",
|
||||||
"Value": "Timestamp": {
|
"Value": "Timestamp": {
|
||||||
"AuthorTimeZone": "${time_zone_rfx}",
|
"AuthorTimeZone": "${time_zone_rfx}",
|
||||||
"DateTime": "${manufacturing_date}"
|
"DateTime": "${manufacturing_date}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@ -1,19 +1,48 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.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 ={}>
|
||||||
[
|
[
|
||||||
{
|
<#if receipt.line_list??>
|
||||||
"Header": {
|
<#list receipt.line_list as receipt_line >
|
||||||
"ProjectID": "${projectRP}"
|
<#if receipt_line.origin_order_line_reference?? && receipt_line.origin_order_line_reference!="">
|
||||||
},
|
<#if !refIDHmap_local[receipt_line.origin_order_line_reference]?? >
|
||||||
"ID": {
|
<#if refIDHmap_local?size != 0 >
|
||||||
"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": {
|
</#if>
|
||||||
"DateTime": "${receipt_status_datetime}",
|
<#assign refIDHmap_local +={receipt_line.origin_order_line_reference,receipt_line.origin_order_line_reference}>
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
{
|
||||||
}
|
"Header": {"ProjectID": "${projectRP}"},
|
||||||
},
|
"ID": {
|
||||||
"Payload": {
|
"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>
|
||||||
]
|
]
|
||||||
|
|||||||
@ -1,21 +1,48 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.creation_datetime,time_zone_rfx) />
|
<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.modification_datetime,time_zone_rfx) />
|
||||||
|
<#assign refIDHmap_local ={}>
|
||||||
[
|
[
|
||||||
{
|
<#if receipt.line_list??>
|
||||||
"Header": {
|
<#list receipt.line_list as receipt_line >
|
||||||
"ProjectID": "${projectRP}"
|
<#if receipt_line.origin_order_line_reference?? && receipt_line.origin_order_line_reference!="">
|
||||||
},
|
<#if !refIDHmap_local[receipt_line.origin_order_line_reference]?? >
|
||||||
"ID": {
|
<#if refIDHmap_local?size != 0 >
|
||||||
"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": {
|
</#if>
|
||||||
"DateTime": "${receipt_status_datetime}",
|
<#assign refIDHmap_local +={receipt_line.origin_order_line_reference,receipt_line.origin_order_line_reference}>
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
{
|
||||||
}
|
"Header": {"ProjectID": "${projectRP}"},
|
||||||
},
|
"ID": {
|
||||||
|
"RefID": "${receipt_line.origin_order_line_reference?trim?json_string}",
|
||||||
"Payload": {}
|
"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>
|
||||||
]
|
]
|
||||||
|
|||||||
@ -1,67 +0,0 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.modification_datetime,time_zone_rfx) />
|
|
||||||
<#assign refIDHmap_local ={}>
|
|
||||||
[
|
|
||||||
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
|
||||||
{
|
|
||||||
"Header": {"ProjectID": "${projectRP}"},
|
|
||||||
"ID": {
|
|
||||||
<#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="">
|
|
||||||
"RefID": "${receipt.origin_order_line_depot?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
"RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}",
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${receipt_status_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
<#else>
|
|
||||||
<#if receipt.line_list??>
|
|
||||||
<#list receipt.line_list as receipt_line >
|
|
||||||
<#if receipt_line.origin_order_line_reference?? && receipt_line.origin_order_line_reference!="">
|
|
||||||
<#if !refIDHmap_local[receipt_line.origin_order_line_reference]?? >
|
|
||||||
<#if refIDHmap_local?size != 0 >
|
|
||||||
,
|
|
||||||
</#if>
|
|
||||||
<#assign refIDHmap_local +={receipt_line.origin_order_line_reference,receipt_line.origin_order_line_reference}>
|
|
||||||
{
|
|
||||||
"Header": {"ProjectID": "${projectRP}"},
|
|
||||||
"ID": {
|
|
||||||
<#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="">
|
|
||||||
"RefID": "${receipt.origin_order_line_depot?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt_line.origin_order_line_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
"RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt_line.origin_order_line_reference?trim?json_string}",
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${receipt_status_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
{
|
|
||||||
"Header": {"ProjectID": "${projectRP}"},
|
|
||||||
"ID": {
|
|
||||||
"RefID": "R${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year?trim?json_string}${receipt.receipt_number?trim?json_string}",
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${receipt_status_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
<#break>
|
|
||||||
</#if>
|
|
||||||
</#list>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
]
|
|
||||||
@ -1,277 +0,0 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
<#assign receipt_datetime = RfxDateTimetoUTCWithTimezone(receipt.receipt_datetime,time_zone_rfx) />
|
|
||||||
<#assign receipt_creation_datetime = RfxDateTimetoUTCWithTimezone(receipt.creation_datetime,time_zone_rfx) />
|
|
||||||
<#assign refIDHmap_local ={}>
|
|
||||||
[
|
|
||||||
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
|
||||||
{
|
|
||||||
"Header": {"ProjectID": "${projectRP}"},
|
|
||||||
"ID": {
|
|
||||||
<#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="">
|
|
||||||
"RefID": "${receipt.origin_order_line_depot?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
"RefID": "R${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}",
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${receipt_creation_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
"CreationDateTime": {
|
|
||||||
"DateTime": "${receipt_creation_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
},
|
|
||||||
<#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="">
|
|
||||||
"OrderID": "${receipt.receipt_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
"OrderID": "R${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}",
|
|
||||||
</#if>
|
|
||||||
<#-- Header Metadata inclusion -->
|
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl">,
|
|
||||||
"ShipFrom":
|
|
||||||
{
|
|
||||||
"ActorID": "${RFXtoRPprefixSupplier(receipt.original_code?trim?json_string)}"
|
|
||||||
},
|
|
||||||
"ShipTo" :
|
|
||||||
{
|
|
||||||
"ActorID": "${RFXtoRPprefixDepot(receipt.physical_depot_code?trim?json_string)}"
|
|
||||||
},
|
|
||||||
"ShipToAcked": true,
|
|
||||||
<#if receipt.carrier_informations.carrier_code != "">
|
|
||||||
"Carrier":
|
|
||||||
{
|
|
||||||
"ActorID":"${RFXtoRPprefixCarrier(receipt.carrier_informations.carrier_code?trim?json_string)}"
|
|
||||||
},
|
|
||||||
</#if>
|
|
||||||
<#if receipt.line_list??>
|
|
||||||
"Lines" : [
|
|
||||||
<#list receipt.line_list as line>
|
|
||||||
{
|
|
||||||
"LineID": "${line.receipt_line_number}",
|
|
||||||
<#-- Line Metadata inclusion -->
|
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl">,
|
|
||||||
"RequestedContent":
|
|
||||||
{
|
|
||||||
"Goods":
|
|
||||||
{
|
|
||||||
"ItemID": "${line.item_code?trim?json_string!"0"}",
|
|
||||||
"LVBranchID": "${line.item_lv_code?json_string!"0"}",
|
|
||||||
<#if (line.line_without_detail?? && line.line_without_detail.priority_date?length != 0) && (line.line_without_detail.priority_date?starts_with("00") == false)>
|
|
||||||
<#assign line_without_detail_priority_date = line.line_without_detail.priority_date?datetime(rfx_date_format_default)?iso_utc />
|
|
||||||
"PriorityDate": "${line_without_detail_priority_date}",
|
|
||||||
<#else>
|
|
||||||
<#if (line.line_detail?? && line.line_detail?size == 1 && line.line_detail[0].priority_date?length != 0) && (line.line_detail[0].priority_date?starts_with("00") == false)>
|
|
||||||
<#assign line_detail_priority_date = line.line_detail[0].priority_date?datetime(rfx_date_format_default)?iso_utc />
|
|
||||||
"PriorityDate": "${line_detail_priority_date}",
|
|
||||||
<#else>
|
|
||||||
"PriorityDate": "1970-01-01T00:00:00Z",
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
<#-- Segmentation Keys inclusion -->
|
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl">
|
|
||||||
},
|
|
||||||
"Quantity" :
|
|
||||||
{
|
|
||||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
|
||||||
"Value": "${line.order_quantity_in_lv!0}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
<#sep>,</#sep>
|
|
||||||
</#list>
|
|
||||||
],
|
|
||||||
</#if>
|
|
||||||
"RequestedMilestones" :
|
|
||||||
{
|
|
||||||
"RequestedDeliveryDateTime" :
|
|
||||||
{
|
|
||||||
"DateTime": "${receipt_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
<#else>
|
|
||||||
<#if receipt.line_list??>
|
|
||||||
<#list receipt.line_list as receipt_line >
|
|
||||||
<#if receipt_line.origin_order_line_reference!="">
|
|
||||||
<#if !refIDHmap_local[receipt_line.origin_order_line_reference]?? >
|
|
||||||
<#if refIDHmap_local?size != 0 >
|
|
||||||
,
|
|
||||||
</#if>
|
|
||||||
<#assign refIDHmap_local +={receipt_line.origin_order_line_reference,receipt_line.origin_order_line_reference}>
|
|
||||||
{
|
|
||||||
"Header": {"ProjectID": "${projectRP}"},
|
|
||||||
"ID": {
|
|
||||||
<#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="">
|
|
||||||
"RefID": "${receipt.origin_order_line_depot?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt_line.origin_order_line_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
"RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt_line.origin_order_line_reference?trim?json_string}",
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${receipt_creation_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
"CreationDateTime": {
|
|
||||||
"DateTime": "${receipt_creation_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
},
|
|
||||||
"OrderID":"${receipt_line.origin_order_line_reference?trim?json_string}",
|
|
||||||
<#-- Header Metadata inclusion -->
|
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl">,
|
|
||||||
"ShipFrom":
|
|
||||||
{
|
|
||||||
"ActorID": "${RFXtoRPprefixSupplier(receipt.original_code?trim?json_string)}"
|
|
||||||
},
|
|
||||||
"ShipTo" :
|
|
||||||
{
|
|
||||||
"ActorID": "${RFXtoRPprefixDepot(receipt.physical_depot_code?trim?json_string)}"
|
|
||||||
},
|
|
||||||
"ShipToAcked": true,
|
|
||||||
<#if receipt.carrier_informations.carrier_code != "">
|
|
||||||
"Carrier":
|
|
||||||
{
|
|
||||||
"ActorID":"${RFXtoRPprefixCarrier(receipt.carrier_informations.carrier_code?trim?json_string)}"
|
|
||||||
},
|
|
||||||
</#if>
|
|
||||||
<#if receipt.line_list??>
|
|
||||||
"Lines" : [
|
|
||||||
<#list receipt.line_list as line>
|
|
||||||
{
|
|
||||||
"LineID": "${line.receipt_line_number}",
|
|
||||||
<#-- Line Metadata inclusion -->
|
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl">,
|
|
||||||
"RequestedContent":
|
|
||||||
{
|
|
||||||
"Goods":
|
|
||||||
{
|
|
||||||
"ItemID": "${line.item_code?trim?json_string!"0"}",
|
|
||||||
"LVBranchID": "${line.item_lv_code?json_string!"0"}",
|
|
||||||
<#if (line.line_without_detail?? && line.line_without_detail.priority_date?length != 0) && (line.line_without_detail.priority_date?starts_with("00") == false)>
|
|
||||||
<#assign line_without_detail_priority_date = line.line_without_detail.priority_date?datetime(rfx_date_format_default)?iso_utc />
|
|
||||||
"PriorityDate": "${line_without_detail_priority_date}",
|
|
||||||
<#else>
|
|
||||||
<#if (line.line_detail?? && line.line_detail?size == 1 && line.line_detail[0].priority_date?length != 0) && (line.line_detail[0].priority_date?starts_with("00") == false)>
|
|
||||||
<#assign line_detail_priority_date = line.line_detail[0].priority_date?datetime(rfx_date_format_default)?iso_utc />
|
|
||||||
"PriorityDate": "${line_detail_priority_date}",
|
|
||||||
<#else>
|
|
||||||
"PriorityDate": "1970-01-01T00:00:00Z",
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
<#-- Segmentation Keys inclusion -->
|
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl">
|
|
||||||
},
|
|
||||||
"Quantity" :
|
|
||||||
{
|
|
||||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
|
||||||
"Value": "${line.order_quantity_in_lv!0}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
<#sep>,</#sep>
|
|
||||||
</#list>
|
|
||||||
],
|
|
||||||
</#if>
|
|
||||||
"RequestedMilestones" :
|
|
||||||
{
|
|
||||||
"RequestedDeliveryDateTime" :
|
|
||||||
{
|
|
||||||
"DateTime": "${receipt_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
{
|
|
||||||
"Header": {"ProjectID": "${projectRP}"},
|
|
||||||
"ID": {
|
|
||||||
"RefID": "R${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year?trim?json_string}${receipt.receipt_number?trim?json_string}",
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${receipt_creation_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
"CreationDateTime": {
|
|
||||||
"DateTime": "${receipt_creation_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
},
|
|
||||||
"OrderID":"${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year?trim?json_string}${receipt.receipt_number?trim?json_string}",
|
|
||||||
<#-- Header Metadata inclusion -->
|
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl">,
|
|
||||||
"ShipFrom":
|
|
||||||
{
|
|
||||||
"ActorID": "${RFXtoRPprefixSupplier(receipt.original_code?trim?json_string)}"
|
|
||||||
},
|
|
||||||
"ShipTo" :
|
|
||||||
{
|
|
||||||
"ActorID": "${RFXtoRPprefixDepot(receipt.physical_depot_code?trim?json_string)}"
|
|
||||||
},
|
|
||||||
"ShipToAcked": true,
|
|
||||||
<#if receipt.carrier_informations.carrier_code != "">
|
|
||||||
"Carrier":
|
|
||||||
{
|
|
||||||
"ActorID":"${RFXtoRPprefixCarrier(receipt.carrier_informations.carrier_code?trim?json_string)}"
|
|
||||||
},
|
|
||||||
</#if>
|
|
||||||
<#if receipt.line_list??>
|
|
||||||
"Lines" : [
|
|
||||||
<#list receipt.line_list as line>
|
|
||||||
{
|
|
||||||
"LineID": "${line.receipt_line_number}",
|
|
||||||
<#-- Line Metadata inclusion -->
|
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl">,
|
|
||||||
"RequestedContent":
|
|
||||||
{
|
|
||||||
"Goods":
|
|
||||||
{
|
|
||||||
"ItemID": "${line.item_code?trim?json_string!"0"}",
|
|
||||||
"LVBranchID": "${line.item_lv_code?json_string!"0"}",
|
|
||||||
<#if (line.line_without_detail?? && line.line_without_detail.priority_date?length != 0) && (line.line_without_detail.priority_date?starts_with("00") == false)>
|
|
||||||
<#assign line_without_detail_priority_date = line.line_without_detail.priority_date?datetime(rfx_date_format_default)?iso_utc />
|
|
||||||
"PriorityDate": "${line_without_detail_priority_date}",
|
|
||||||
<#else>
|
|
||||||
<#if (line.line_detail?? && line.line_detail?size == 1 && line.line_detail[0].priority_date?length != 0) && (line.line_detail[0].priority_date?starts_with("00") == false)>
|
|
||||||
<#assign line_detail_priority_date = line.line_detail[0].priority_date?datetime(rfx_date_format_default)?iso_utc />
|
|
||||||
"PriorityDate": "${line_detail_priority_date}",
|
|
||||||
<#else>
|
|
||||||
"PriorityDate": "1970-01-01T00:00:00Z",
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
<#-- Segmentation Keys inclusion -->
|
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl">
|
|
||||||
},
|
|
||||||
"Quantity" :
|
|
||||||
{
|
|
||||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
|
||||||
"Value": "${line.order_quantity_in_lv!0}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
<#sep>,</#sep>
|
|
||||||
</#list>
|
|
||||||
],
|
|
||||||
</#if>
|
|
||||||
"RequestedMilestones" :
|
|
||||||
{
|
|
||||||
"RequestedDeliveryDateTime" :
|
|
||||||
{
|
|
||||||
"DateTime": "${receipt_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
<#break>
|
|
||||||
</#if>
|
|
||||||
</#list>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
]
|
|
||||||
@ -1,67 +0,0 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.confirmation_datetime,time_zone_rfx) />
|
|
||||||
<#assign refIDHmap_local ={}>
|
|
||||||
[
|
|
||||||
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
|
||||||
{
|
|
||||||
"Header": {"ProjectID": "${projectRP}"},
|
|
||||||
"ID": {
|
|
||||||
<#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="">
|
|
||||||
"RefID": "${receipt.origin_order_line_depot?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
"RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}",
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${receipt_status_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
<#else>
|
|
||||||
<#if receipt.line_list??>
|
|
||||||
<#list receipt.line_list as receipt_line >
|
|
||||||
<#if receipt_line.origin_order_line_reference?? && receipt_line.origin_order_line_reference!="">
|
|
||||||
<#if !refIDHmap_local[receipt_line.origin_order_line_reference]?? >
|
|
||||||
<#if refIDHmap_local?size != 0 >
|
|
||||||
,
|
|
||||||
</#if>
|
|
||||||
<#assign refIDHmap_local +={receipt_line.origin_order_line_reference,receipt_line.origin_order_line_reference}>
|
|
||||||
{
|
|
||||||
"Header": {"ProjectID": "${projectRP}"},
|
|
||||||
"ID": {
|
|
||||||
<#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="">
|
|
||||||
"RefID": "${receipt.origin_order_line_depot?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt_line.origin_order_line_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
"RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt_line.origin_order_line_reference?trim?json_string}",
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${receipt_status_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
{
|
|
||||||
"Header": {"ProjectID": "${projectRP}"},
|
|
||||||
"ID": {
|
|
||||||
"RefID": "R${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year?trim?json_string}${receipt.receipt_number?trim?json_string}",
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${receipt_status_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
<#break>
|
|
||||||
</#if>
|
|
||||||
</#list>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
]
|
|
||||||
@ -1,67 +0,0 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.creation_datetime,time_zone_rfx) />
|
|
||||||
<#assign refIDHmap_local ={}>
|
|
||||||
[
|
|
||||||
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
|
||||||
{
|
|
||||||
"Header": {"ProjectID": "${projectRP}"},
|
|
||||||
"ID": {
|
|
||||||
<#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="">
|
|
||||||
"RefID": "${receipt.origin_order_line_depot?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
"RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}",
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${receipt_status_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
<#else>
|
|
||||||
<#if receipt.line_list??>
|
|
||||||
<#list receipt.line_list as receipt_line >
|
|
||||||
<#if receipt_line.origin_order_line_reference?? && receipt_line.origin_order_line_reference!="">
|
|
||||||
<#if !refIDHmap_local[receipt_line.origin_order_line_reference]?? >
|
|
||||||
<#if refIDHmap_local?size != 0 >
|
|
||||||
,
|
|
||||||
</#if>
|
|
||||||
<#assign refIDHmap_local +={receipt_line.origin_order_line_reference,receipt_line.origin_order_line_reference}>
|
|
||||||
{
|
|
||||||
"Header": {"ProjectID": "${projectRP}"},
|
|
||||||
"ID": {
|
|
||||||
<#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="">
|
|
||||||
"RefID": "${receipt.origin_order_line_depot?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt_line.origin_order_line_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
"RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt_line.origin_order_line_reference?trim?json_string}",
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${receipt_status_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
{
|
|
||||||
"Header": {"ProjectID": "${projectRP}"},
|
|
||||||
"ID": {
|
|
||||||
"RefID": "R${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year?trim?json_string}${receipt.receipt_number?trim?json_string}",
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${receipt_status_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
<#break>
|
|
||||||
</#if>
|
|
||||||
</#list>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
]
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
"RefID": "${id.refid?json_string}"
|
|
||||||
},
|
|
||||||
"Payload": {}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
15
RFXtoRP_Receipt_ShipToAcked.ftl
Normal file
15
RFXtoRP_Receipt_ShipToAcked.ftl
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
"RefID": "${id.refid?json_string}"
|
||||||
|
},
|
||||||
|
|
||||||
|
"Payload": {
|
||||||
|
"ShipToAcked": true
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
]
|
||||||
@ -1,206 +1,206 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : Response message from HARDIS WMS -->
|
<#-- input : Response message from HARDIS WMS -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in HARDIS SC NETWORK -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
||||||
|
|
||||||
<#assign restResponsetMsg = JsonUtil.jsonToMap(input)>
|
<#assign restResponsetMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign id = JsonUtil.jsonToMap(restResponsetMsg.id!"{}")>
|
<#assign id = JsonUtil.jsonToMap(restResponsetMsg.id!"{}")>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
<#assign organisationRP = organisation>
|
<#assign organisationRP = organisation>
|
||||||
|
|
||||||
|
|
||||||
<#assign aDateTime = .now>
|
<#assign aDateTime = .now>
|
||||||
<#assign no_apiRestReflexID = "no apiRestReflexID">
|
<#assign no_apiRestReflexID = "no apiRestReflexID">
|
||||||
<#assign no_status = -99999>
|
<#assign no_status = -99999>
|
||||||
|
|
||||||
|
|
||||||
<#switch id.apiRestReflexID!no_apiRestReflexID>
|
<#switch id.apiRestReflexID!no_apiRestReflexID>
|
||||||
<#case no_apiRestReflexID>
|
<#case no_apiRestReflexID>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#if restResponsetMsg.body?? >
|
<#if restResponsetMsg.body?? >
|
||||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||||
<#else>
|
<#else>
|
||||||
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
|
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
|
||||||
</#if>
|
</#if>
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#case "preparation_orders_post">
|
<#case "preparation_orders_post">
|
||||||
<#switch restResponsetMsg.status!no_status>
|
<#switch restResponsetMsg.status!no_status>
|
||||||
<#case no_status>
|
<#case no_status>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#if restResponsetMsg.body?? >
|
<#if restResponsetMsg.body?? >
|
||||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||||
<#else>
|
<#else>
|
||||||
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
|
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
|
||||||
</#if>
|
</#if>
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#case 200>
|
<#case 200>
|
||||||
<#case 201>
|
<#case 201>
|
||||||
<#-- *********************************************** ApiRestID = preparation_orders_post ******************** -->
|
<#-- *********************************************** ApiRestID = preparation_orders_post ******************** -->
|
||||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||||
<#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)>
|
<#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)>
|
||||||
<#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" >
|
<#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" >
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipFromAcked>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipFromAcked>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_PrepOrder_ShipFromAcked.ftl">
|
<#include "RFXtoRP_PrepOrder_ShipFromAcked.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#else>
|
<#else>
|
||||||
<#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "WARN">
|
<#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "WARN">
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipFromAcked>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipFromAcked>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_PrepOrder_ShipFromAcked.ftl">
|
<#include "RFXtoRP_PrepOrder_ShipFromAcked.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#else>
|
<#else>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
<#break>
|
<#break>
|
||||||
<#default>
|
<#default>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#if restResponsetMsg.body?? >
|
<#if restResponsetMsg.body?? >
|
||||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||||
<#else>
|
<#else>
|
||||||
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}}" />
|
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}}" />
|
||||||
</#if>
|
</#if>
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
</#switch>
|
</#switch>
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#case "receipts_post">
|
<#case "receipts_post">
|
||||||
<#switch restResponsetMsg.status!no_status>
|
<#switch restResponsetMsg.status!no_status>
|
||||||
<#case no_status>
|
<#case no_status>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#if restResponsetMsg.body?? >
|
<#if restResponsetMsg.body?? >
|
||||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||||
<#else>
|
<#else>
|
||||||
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
|
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
|
||||||
</#if>
|
</#if>
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#case 200>
|
<#case 200>
|
||||||
<#case 201>
|
<#case 201>
|
||||||
<#-- *********************************************** ApiRestID = receipts_post ******************** -->
|
<#-- *********************************************** ApiRestID = receipts_post ******************** -->
|
||||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||||
<#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)>
|
<#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)>
|
||||||
<#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" >
|
<#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" >
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDeleted>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipToAcked>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_Receipt_ExecutionflowDeleted.ftl">
|
<#include "RFXtoRP_Receipt_ShipToAcked.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#else>
|
<#else>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
</#if>
|
</#if>
|
||||||
<#break>
|
<#break>
|
||||||
<#default>
|
<#default>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#if restResponsetMsg.body?? >
|
<#if restResponsetMsg.body?? >
|
||||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||||
<#else>
|
<#else>
|
||||||
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
|
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
|
||||||
</#if>
|
</#if>
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
</#switch>
|
</#switch>
|
||||||
<#break>
|
<#break>
|
||||||
<#default>
|
<#default>
|
||||||
<#stop>
|
<#stop>
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@ -16,7 +16,7 @@ those parameters are stored in FTL file Conf-connector.ftl for later use in some
|
|||||||
<#noparse><#-- 0 : Always empty --></#noparse>
|
<#noparse><#-- 0 : Always empty --></#noparse>
|
||||||
<#noparse><#-- 1 : Always use HARDIS WMS tracking --></#noparse>
|
<#noparse><#-- 1 : Always use HARDIS WMS tracking --></#noparse>
|
||||||
<#noparse><#-- 2 : Always use the HU number --></#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>
|
<#list file.parameters as parameter>
|
||||||
<#switch parameter.type>
|
<#switch parameter.type>
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
<#switch eventRP.event>
|
<#switch eventRP.event>
|
||||||
<#case "Created">
|
<#case "Created">
|
||||||
<#case "Renotified">
|
<#case "Renotified">
|
||||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||||
<#assign executionflow = eventRP.data />
|
<#assign executionflow = eventRP.data />
|
||||||
|
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
</#if>
|
</#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",
|
"route" : "rest/public/v1/activities/{activity_code}/physical_depots/{physical_depot_code}/originators/{originator_code}/preparation_orders",
|
||||||
"method" : "POST",
|
"method" : "POST",
|
||||||
"uri_substitutions": {
|
"uri_substitutions": {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<#-- Vous pouvez mapper les métadonnées avec des informations complémentaires, des commentaires... -->
|
<#-- Il est possible de mapper les métadonnées avec des informations complémentaires, des commentaires... -->
|
||||||
<#-- You can map metadata with additional information,comments... -->
|
<#-- It is possible to map metadata with additional information,comments... -->
|
||||||
|
|
||||||
<#--
|
<#--
|
||||||
<#if Header_MetaData_Map["Color"]??>
|
<#if Header_MetaData_Map["Color"]??>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<#-- Vous pouvez mapper les métadonnées avec des informations complémentaires, des commentaires... -->
|
<#-- Il est possible de mapper les métadonnées avec des informations complémentaires, des commentaires... -->
|
||||||
<#-- You can map metadata with additional information,comments... -->
|
<#-- It is possible to map metadata with additional information,comments... -->
|
||||||
|
|
||||||
<#--
|
<#--
|
||||||
<#if Header_MetaData_Map["Color"]??>
|
<#if Header_MetaData_Map["Color"]??>
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#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",
|
"route" : "rest/public/v1/activities/{activity_code}/physical_depots/{physical_depot_code}/originators/{originator_code}/receipts",
|
||||||
"method" : "POST",
|
"method" : "POST",
|
||||||
"uri_substitutions": {
|
"uri_substitutions": {
|
||||||
@ -57,9 +57,9 @@
|
|||||||
"grade_code": "${grade_code}",
|
"grade_code": "${grade_code}",
|
||||||
"batch_1": "${batch_1?json_string!""}",
|
"batch_1": "${batch_1?json_string!""}",
|
||||||
"optional_attributes": {
|
"optional_attributes": {
|
||||||
<#include "RPtoRFX_Receipt_OptionalAttributes.ftl">
|
<#include "RPtoRFX_Receipt_OptionalAttributes.ftl">
|
||||||
"hold_for_specific_code": "false"
|
"hold_for_specific_code": "false"
|
||||||
}
|
}
|
||||||
}<#sep>,</#sep>
|
}<#sep>,</#sep>
|
||||||
</#list>
|
</#list>
|
||||||
]
|
]
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<#-- Vous pouvez mapper les métadonnées avec des informations complémentaires, des commentaires... -->
|
<#-- Il est possible de mapper les métadonnées avec des informations complémentaires, des commentaires... -->
|
||||||
<#-- You can map metadata with additional information,comments... -->
|
<#-- It is possible to map metadata with additional information,comments... -->
|
||||||
|
|
||||||
<#--
|
<#--
|
||||||
<#if Header_MetaData_Map["Color"]??>
|
<#if Header_MetaData_Map["Color"]??>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<#-- Vous pouvez mapper les métadonnées avec des informations complémentaires, des commentaires... -->
|
<#-- Il est possible de mapper les métadonnées avec des informations complémentaires, des commentaires... -->
|
||||||
<#-- You can map metadata with additional information,comments... -->
|
<#-- It is possible to map metadata with additional information,comments... -->
|
||||||
|
|
||||||
<#--
|
<#--
|
||||||
<#if Header_MetaData_Map["Color"]??>
|
<#if Header_MetaData_Map["Color"]??>
|
||||||
@ -14,4 +14,4 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
</#if>,
|
</#if>,
|
||||||
-->
|
-->
|
||||||
@ -1,5 +1,5 @@
|
|||||||
<#-- Here are the fields that can be added
|
<#-- Here are the fields that can be added
|
||||||
"batch_2": "string",
|
"batch_2": "string",
|
||||||
"batch_3": "string",
|
"batch_3": "string",
|
||||||
"anticipated_receipt_line_activity_code": "str",
|
"anticipated_receipt_line_activity_code": "str",
|
||||||
"anticipated_receipt_line_physical_depot_code": "str",
|
"anticipated_receipt_line_physical_depot_code": "str",
|
||||||
|
|||||||
@ -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 >
|
<#function RfxDateTimetoUTC rfxdatetime offset >
|
||||||
<#return ((rfxdatetime + offset)?datetime.iso?iso_utc)>
|
<#return ((rfxdatetime + offset)?datetime.iso?iso_utc)>
|
||||||
@ -10,21 +10,21 @@
|
|||||||
</#function>
|
</#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" -->
|
<#-- Example : splitemail "john.doe@hardis-group.com,; name@hardis-group.com" -->
|
||||||
<#-- return "["john.doe@hardis-group.com","name@hardis-group.com"]" -->
|
<#-- return "["john.doe@hardis-group.com","name@hardis-group.com"]" -->
|
||||||
<#-- --------------------------------------------------------------------------------------- -->
|
<#-- --------------------------------------------------------------------------------------- -->
|
||||||
<#function splitEmailsIntoArray emails >
|
<#function splitEmailsIntoArray emails >
|
||||||
<#local str = "[">
|
<#local str = "[">
|
||||||
<#list emails?split(";|,| |à|/","r")?filter(l -> l != "") as email>
|
<#list emails?split(";|,| |à|/","r")?filter(l -> l != "") as email>
|
||||||
<#if email?matches("^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$")>
|
<#if email?matches("^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$")>
|
||||||
<#if str != "[">
|
<#if str != "[">
|
||||||
<#local str += ",">
|
<#local str += ",">
|
||||||
</#if>
|
</#if>
|
||||||
<#local str += "\"">
|
<#local str += "\"">
|
||||||
<#local str += email>
|
<#local str += email>
|
||||||
<#local str += "\"">
|
<#local str += "\"">
|
||||||
</#if>
|
</#if>
|
||||||
</#list>
|
</#list>
|
||||||
<#local str += "]">
|
<#local str += "]">
|
||||||
<#return (str)>
|
<#return (str)>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user