Merge branch 'release/2.0' into 'main-2.0'

Release/2.0 to main2.0

See merge request r-d-technique/tiers/reflex-wms-connector!157
This commit is contained in:
Francis REAT 2025-11-04 09:35:47 +00:00
commit 39c8280fa4
6 changed files with 30 additions and 34 deletions

View File

@ -4,7 +4,7 @@
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 **Reflex 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 **HARDIS WMS integration engines** or **data exchange pipelines**, where it applies the mapping rules defined in the `.ftl` files.
## Role of the FTL Files

View File

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

View File

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

View File

@ -10,8 +10,8 @@
<#assign aDateTime = .now>
<#assign no_apiRestReflexID = "no apiRestReflexID">
<#assign no_status = -99999>
<#assign no_apiRestReflexID = "no apiRestReflexID">
<#assign no_status = -99999>
<#switch id.apiRestReflexID!no_apiRestReflexID>
@ -30,7 +30,7 @@
}
]
<#break>
<#case "preparation_orders_post">
<#switch restResponsetMsg.status!no_status>
<#case no_status>
@ -54,7 +54,7 @@
}
]
<#break>
<#case 200>
<#case 201>
<#-- *********************************************** ApiRestID = preparation_orders_post ******************** -->
@ -144,7 +144,7 @@
}
]
<#break>
<#case 200>
<#case 201>
<#-- *********************************************** ApiRestID = receipts_post ******************** -->
@ -153,10 +153,10 @@
<#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" >
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipToAcked>
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDeleted>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_Receipt_ShipToAcked.ftl">
<#include "RFXtoRP_Receipt_ExecutionflowDeleted.ftl">
}
]
<#else>

View File

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

View File

@ -1 +1 @@
2.0.10+1
2.0.10+2