diff --git a/README.md b/README.md index 9c390cd..c650960 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ + # HARDIS SC NETWORK Core FTLs - ## Overview - The **Reflex WMS Connector** is a set of **FreeMarker templates (FTL)** designed to transform **outgoing JSON flows from Reflex WMS** into **flows compatible with HARDIS SC NETWORK**. + This connector does not contain any standalone executable code: it is intended to be used by **Reflex integration engines** or **data exchange pipelines**, where it applies the mapping rules defined in the `.ftl` files. ## Role of the FTL Files @@ -14,7 +14,9 @@ This connector does not contain any standalone executable code: it is intended t - Apply transformation rules (mapping, conversions, enrichments). - Generate a **final structured JSON** for HARDIS SC NETWORK. + ## Useful Resources - [FreeMarker Documentation](https://freemarker.apache.org/docs/index.html) - [HARDIS SC NETWORK](https://auth.reflex-platform.com/) + diff --git a/RFXtoRP_HliPrepaL.ftl b/RFXtoRP_HliPrepaL.ftl index 1756f5e..aefd91c 100644 --- a/RFXtoRP_HliPrepaL.ftl +++ b/RFXtoRP_HliPrepaL.ftl @@ -21,7 +21,20 @@ <#if preparationOrder.total_lv_validated !=0> <#if preparationOrder.preparation_line_lst??> [ - <#assign first = true> + { + <#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 ={}> @@ -29,10 +42,7 @@ <#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))> - <#if !first > - <#assign first = false> , - { <#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled> "apiReflexPlatformID" : "${apiReflexPlatformID}", @@ -41,10 +51,7 @@ } <#if despatched_ipg.carton_number != "000000000000000000" && despatched_ipg.carton_number!=despatched_ipg.hd_number > - <#if !first > - <#assign first = false> , - { <#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitHUsAdded> "apiReflexPlatformID" : "${apiReflexPlatformID}", diff --git a/RFXtoRP_HliReceiptLr.ftl b/RFXtoRP_HliReceiptLr.ftl index f2c6601..f93bbc3 100644 --- a/RFXtoRP_HliReceiptLr.ftl +++ b/RFXtoRP_HliReceiptLr.ftl @@ -25,7 +25,7 @@ <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowLinesAdded> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : - <#include "RFXtoRP_HsrReceiptList_ExecutionflowLinesAdded.ftl"> + <#include "RFXtoRP_HliReceiptLr_ExecutionflowLinesAdded.ftl"> }, {