You've already forked reflex-wms-connector
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 201e58ed16 |
162
ActorPrefix.ftl
162
ActorPrefix.ftl
@@ -1,162 +0,0 @@
|
|||||||
|
|
||||||
<#-- --------------------------------------------------------------------------------------- -->
|
|
||||||
<#-- Actor Prefix 4 cars -->
|
|
||||||
<#-- --------------------------------------------------------------------------------------- -->
|
|
||||||
|
|
||||||
<#-- For Depot -->
|
|
||||||
<#function RFXtoRPprefixDepot depot>
|
|
||||||
<#if uniqueness >
|
|
||||||
<#local actor = depot>
|
|
||||||
<#else>
|
|
||||||
<#if text_language_rfx ="fr">
|
|
||||||
<#local actor = "DEP_"+depot>
|
|
||||||
<#else>
|
|
||||||
<#if text_language_rfx ="it">
|
|
||||||
<#local actor = "DEP_"+depot>
|
|
||||||
<#else>
|
|
||||||
<#if text_language_rfx ="es">
|
|
||||||
<#local actor = "DEP_"+depot>
|
|
||||||
<#else>
|
|
||||||
<#if text_language_rfx ="pl">
|
|
||||||
<#local actor = "MAG_"+depot>
|
|
||||||
<#else>
|
|
||||||
<#if text_language_rfx ="nl">
|
|
||||||
<#local actor = "DEP_"+depot>
|
|
||||||
<#else>
|
|
||||||
<#local actor = "DEP_"+depot>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
<#return (actor)>
|
|
||||||
</#function>
|
|
||||||
|
|
||||||
<#function RPtoRFXprefixDepot actor>
|
|
||||||
<#if uniqueness>
|
|
||||||
<#local depot = actor>
|
|
||||||
<#else>
|
|
||||||
<#local depot = actor[4..]>
|
|
||||||
</#if>
|
|
||||||
<#return (depot)>
|
|
||||||
</#function>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<#-- For Supplier -->
|
|
||||||
<#function RFXtoRPprefixSupplier supplier>
|
|
||||||
<#if uniqueness>
|
|
||||||
<#local actor = supplier>
|
|
||||||
<#else>
|
|
||||||
<#if text_language_rfx ="fr">
|
|
||||||
<#local actor = "FOU_"+supplier>
|
|
||||||
<#else>
|
|
||||||
<#if text_language_rfx ="it">
|
|
||||||
<#local actor = "FOR_"+supplier>
|
|
||||||
<#else>
|
|
||||||
<#if text_language_rfx ="es">
|
|
||||||
<#local actor = "PRO_"+supplier>
|
|
||||||
<#else>
|
|
||||||
<#if text_language_rfx ="pl">
|
|
||||||
<#local actor = "DOS_"+supplier>
|
|
||||||
<#else>
|
|
||||||
<#if text_language_rfx ="nl">
|
|
||||||
<#local actor = "LEV_"+supplier>
|
|
||||||
<#else>
|
|
||||||
<#local actor = "SUP_"+supplier>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
<#return (actor)>
|
|
||||||
</#function>
|
|
||||||
|
|
||||||
<#function RPtoRFXprefixSupplier actor>
|
|
||||||
<#if uniqueness>
|
|
||||||
<#local supplier = actor>
|
|
||||||
<#else>
|
|
||||||
<#local supplier = actor[4..]>
|
|
||||||
</#if>
|
|
||||||
<#return (supplier)>
|
|
||||||
</#function>
|
|
||||||
|
|
||||||
<#-- For Carrier -->
|
|
||||||
<#function RFXtoRPprefixCarrier carrier>
|
|
||||||
<#if uniqueness>
|
|
||||||
<#local actor = carrier>
|
|
||||||
<#else>
|
|
||||||
<#if text_language_rfx ="fr">
|
|
||||||
<#local actor = "TRA_"+carrier>
|
|
||||||
<#else>
|
|
||||||
<#if text_language_rfx ="it">
|
|
||||||
<#local actor = "VET_"+carrier>
|
|
||||||
<#else>
|
|
||||||
<#if text_language_rfx ="es">
|
|
||||||
<#local actor = "TRA_"+carrier>
|
|
||||||
<#else>
|
|
||||||
<#if text_language_rfx ="pl">
|
|
||||||
<#local actor = "PRZ_"+carrier>
|
|
||||||
<#else>
|
|
||||||
<#if text_language_rfx ="nl">
|
|
||||||
<#local actor = "VER_"+carrier>
|
|
||||||
<#else>
|
|
||||||
<#local actor = "CAR_"+carrier>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
<#return (actor)>
|
|
||||||
</#function>
|
|
||||||
|
|
||||||
<#function RPtoRFXprefixCarrier actor>
|
|
||||||
<#if uniqueness>
|
|
||||||
<#local carrier = actor>
|
|
||||||
<#else>
|
|
||||||
<#local carrier = actor[4..]>
|
|
||||||
</#if>
|
|
||||||
<#return (carrier)>
|
|
||||||
</#function>
|
|
||||||
|
|
||||||
<#-- For Consignee -->
|
|
||||||
<#function RFXtoRPprefixConsignee consignee>
|
|
||||||
<#if uniqueness>
|
|
||||||
<#local actor = consignee>
|
|
||||||
<#else>
|
|
||||||
<#if text_language_rfx ="fr">
|
|
||||||
<#local actor = "DES_"+consignee>
|
|
||||||
<#else>
|
|
||||||
<#if text_language_rfx ="it">
|
|
||||||
<#local actor = "DES_"+consignee>
|
|
||||||
<#else>
|
|
||||||
<#if text_language_rfx ="es">
|
|
||||||
<#local actor = "DES_"+consignee>
|
|
||||||
<#else>
|
|
||||||
<#if text_language_rfx ="pl">
|
|
||||||
<#local actor = "ODB_"+consignee>
|
|
||||||
<#else>
|
|
||||||
<#if text_language_rfx ="nl">
|
|
||||||
<#local actor = "ONT_"+consignee>
|
|
||||||
<#else>
|
|
||||||
<#local actor = "CON_"+consignee>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
<#return (actor)>
|
|
||||||
</#function>
|
|
||||||
|
|
||||||
<#function RPtoRFXprefixConsignee actor>
|
|
||||||
<#if uniqueness>
|
|
||||||
<#local consignee = actor>
|
|
||||||
<#else>
|
|
||||||
<#local consignee = actor[4..]>
|
|
||||||
</#if>
|
|
||||||
<#return (consignee)>
|
|
||||||
</#function>
|
|
||||||
@@ -50,11 +50,11 @@
|
|||||||
|
|
||||||
<#case "D">
|
<#case "D">
|
||||||
<#-- *********************************************** Action = DELETE ******************** -->
|
<#-- *********************************************** Action = DELETE ******************** -->
|
||||||
<#stop >
|
<#stop "event not supported">
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop "event not supported">
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
[
|
[
|
||||||
<#list reflexStockPicturesInterface.detailled_stock_list as stock>
|
<#list reflexStockPicturesInterface.detailled_stock_list as stock>
|
||||||
{
|
{
|
||||||
@@ -8,7 +6,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${RFXtoRPprefixDepot(stock.physical_depot_code)}"
|
"RefID": "${stock.physical_depot_code}"
|
||||||
},
|
},
|
||||||
"Payload": {
|
"Payload": {
|
||||||
<#assign generation_date = RfxDateTimetoUTC(stock.generation_date,time_zone_offset_rfx) />
|
<#assign generation_date = RfxDateTimetoUTC(stock.generation_date,time_zone_offset_rfx) />
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
[
|
[
|
||||||
<#list reflexStockPicturesInterface.detailled_stock_list as stock>
|
<#list reflexStockPicturesInterface.detailled_stock_list as stock>
|
||||||
{
|
{
|
||||||
@@ -8,7 +6,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"Payload": {
|
"Payload": {
|
||||||
"ActorID": "${RFXtoRPprefixDepot(stock.physical_depot_code)}",
|
"ActorID": "${stock.physical_depot_code}",
|
||||||
<#assign generation_date = RfxDateTimetoUTC(stock.generation_date,time_zone_offset_rfx) />
|
<#assign generation_date = RfxDateTimetoUTC(stock.generation_date,time_zone_offset_rfx) />
|
||||||
"Snapshot": {
|
"Snapshot": {
|
||||||
"DateTime": {
|
"DateTime": {
|
||||||
@@ -29,8 +27,6 @@
|
|||||||
<#assign priority_date = stock.priority_date?datetime(rfx_date_format_default)?iso_utc />
|
<#assign priority_date = stock.priority_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
<#if (stock.priority_date!="") && (stock.priority_date?starts_with("00")== false) >
|
<#if (stock.priority_date!="") && (stock.priority_date?starts_with("00")== false) >
|
||||||
"PriorityDate" : "${priority_date}",
|
"PriorityDate" : "${priority_date}",
|
||||||
<#else>
|
|
||||||
"PriorityDate": "1970-01-01T00:00:00Z",
|
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
<#-- Segmentation keys inclusion -->
|
<#-- Segmentation keys inclusion -->
|
||||||
|
|||||||
@@ -14,6 +14,6 @@
|
|||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop "event not supported">
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,6 @@
|
|||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop "event not supported">
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,6 @@
|
|||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop "event not supported">
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,6 @@ those parameters are stored in FTL file HfRpConfig.ftl for later use in some of
|
|||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop "event not supported">
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -41,6 +41,6 @@
|
|||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop "event not supported">
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,12 @@
|
|||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${RFXtoRPprefixCarrier(carrier.carrier_code?trim?json_string)}"
|
"RefID": "${carrier.carrier_code?trim?json_string}"
|
||||||
},
|
},
|
||||||
|
|
||||||
"Payload": {
|
"Payload": {
|
||||||
"Name": "${carrier.carrier_designation?json_string}",
|
"Name": "${carrier.carrier_designation?json_string}",
|
||||||
"ManagedStock": false,
|
"ManagedStock": false,
|
||||||
@@ -16,8 +14,10 @@
|
|||||||
<#-- ***Partner ID could be added here *** -->
|
<#-- ***Partner ID could be added here *** -->
|
||||||
<#-- "PartnerID": "${}", -->
|
<#-- "PartnerID": "${}", -->
|
||||||
|
|
||||||
|
<#--
|
||||||
<#include "RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl">,
|
<#include "RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl">,
|
||||||
|
-->
|
||||||
|
|
||||||
|
|
||||||
"Address":
|
"Address":
|
||||||
{
|
{
|
||||||
@@ -29,12 +29,7 @@
|
|||||||
"StreetAddressTwo" : "${carrier.carrier_structured_address.additionnal_data?json_string}",
|
"StreetAddressTwo" : "${carrier.carrier_structured_address.additionnal_data?json_string}",
|
||||||
"PostalCode" : "${carrier.carrier_structured_address.postal_code?json_string}",
|
"PostalCode" : "${carrier.carrier_structured_address.postal_code?json_string}",
|
||||||
"City" : "${carrier.carrier_structured_address.post_code_area_name?json_string}",
|
"City" : "${carrier.carrier_structured_address.post_code_area_name?json_string}",
|
||||||
<#assign isCountryCode = JsonUtil.isCountryCode(carrier.carrier_structured_address.country_code?upper_case) />
|
"CountryCode" : "${carrier.carrier_structured_address.country_code?json_string}",
|
||||||
<#if isCountryCode>
|
|
||||||
"CountryCode" : "${carrier.carrier_structured_address.country_code?upper_case?json_string}",
|
|
||||||
<#else>
|
|
||||||
"CountryCode" : "",
|
|
||||||
</#if>
|
|
||||||
"ProvinceCode": "${carrier.carrier_structured_address.territorial_div_code?json_string}",
|
"ProvinceCode": "${carrier.carrier_structured_address.territorial_div_code?json_string}",
|
||||||
"State": "${carrier.carrier_structured_address.country_designation?json_string}"
|
"State": "${carrier.carrier_structured_address.country_designation?json_string}"
|
||||||
|
|
||||||
@@ -44,8 +39,7 @@
|
|||||||
"Name": "${carrier.address.company_name?json_string}",
|
"Name": "${carrier.address.company_name?json_string}",
|
||||||
"StreetAddressOne" : "${carrier.address.address_1?json_string}",
|
"StreetAddressOne" : "${carrier.address.address_1?json_string}",
|
||||||
"StreetAddressTwo" : "${carrier.address.address_2?json_string}",
|
"StreetAddressTwo" : "${carrier.address.address_2?json_string}",
|
||||||
"StreetAddressThree" : "${carrier.address.address_3?json_string}",
|
"StreetAddressThree" : "${carrier.address.address_3?json_string}"
|
||||||
"CountryCode" : ""
|
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,14 +1,12 @@
|
|||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${RFXtoRPprefixCarrier(carrier.carrier_code?trim?json_string)}"
|
"RefID": "${carrier.carrier_code?trim?json_string}"
|
||||||
},
|
},
|
||||||
|
|
||||||
"Payload": {}
|
"Payload": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -41,6 +41,6 @@
|
|||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop "event not supported">
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,12 @@
|
|||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${RFXtoRPprefixConsignee(actor.code?trim?json_string)}"
|
"RefID": "${actor.code?trim?json_string}"
|
||||||
},
|
},
|
||||||
|
|
||||||
"Payload": {
|
"Payload": {
|
||||||
"Name": "${actor.designation?json_string}",
|
"Name": "${actor.designation?json_string}",
|
||||||
"ManagedStock": false,
|
"ManagedStock": false,
|
||||||
@@ -16,9 +14,9 @@
|
|||||||
<#-- ***Partner ID could be added here *** -->
|
<#-- ***Partner ID could be added here *** -->
|
||||||
<#-- "PartnerID": "${}", -->
|
<#-- "PartnerID": "${}", -->
|
||||||
|
|
||||||
|
<#--
|
||||||
<#include "RFXtoRP_HsaCons_ActorCreated_Metadata.ftl">,
|
<#include "RFXtoRP_HsaCons_ActorCreated_Metadata.ftl">,
|
||||||
|
-->
|
||||||
|
|
||||||
"Address":
|
"Address":
|
||||||
{
|
{
|
||||||
@@ -31,12 +29,7 @@
|
|||||||
"StreetAddressTwo" : "${actor.consignee_structured_address.additionnal_data?json_string}",
|
"StreetAddressTwo" : "${actor.consignee_structured_address.additionnal_data?json_string}",
|
||||||
"PostalCode" : "${actor.consignee_structured_address.postal_code?json_string}",
|
"PostalCode" : "${actor.consignee_structured_address.postal_code?json_string}",
|
||||||
"City" : "${actor.consignee_structured_address.post_code_area_name?json_string}",
|
"City" : "${actor.consignee_structured_address.post_code_area_name?json_string}",
|
||||||
<#assign isCountryCode = JsonUtil.isCountryCode(actor.consignee_structured_address.country_code?upper_case) />
|
"CountryCode" : "${actor.consignee_structured_address.country_code?json_string}",
|
||||||
<#if isCountryCode>
|
|
||||||
"CountryCode" : "${actor.consignee_structured_address.country_code?upper_case?json_string}",
|
|
||||||
<#else>
|
|
||||||
"CountryCode" : "",
|
|
||||||
</#if>
|
|
||||||
"ProvinceCode": "${actor.consignee_structured_address.territorial_div_code?json_string}",
|
"ProvinceCode": "${actor.consignee_structured_address.territorial_div_code?json_string}",
|
||||||
"State": "${actor.consignee_structured_address.country_designation?json_string}"
|
"State": "${actor.consignee_structured_address.country_designation?json_string}"
|
||||||
|
|
||||||
@@ -47,8 +40,7 @@
|
|||||||
"Name": "${actor.address.company_name?json_string}",
|
"Name": "${actor.address.company_name?json_string}",
|
||||||
"StreetAddressOne" : "${actor.address.address_1?json_string}",
|
"StreetAddressOne" : "${actor.address.address_1?json_string}",
|
||||||
"StreetAddressTwo" : "${actor.address.address_2?json_string}",
|
"StreetAddressTwo" : "${actor.address.address_2?json_string}",
|
||||||
"StreetAddressThree" : "${actor.address.address_3?json_string}",
|
"StreetAddressThree" : "${actor.address.address_3?json_string}"
|
||||||
"CountryCode" : ""
|
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,14 +1,12 @@
|
|||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${RFXtoRPprefixConsignee(actor.code?trim?json_string)}"
|
"RefID": "${actor.code?trim?json_string}"
|
||||||
},
|
},
|
||||||
|
|
||||||
"Payload": {}
|
"Payload": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,47 +0,0 @@
|
|||||||
<#-- **** input parameters ***** -->
|
|
||||||
<#-- input : message RFX -->
|
|
||||||
<#-- project : projectId in ReflexPlatform -->
|
|
||||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
|
||||||
<#assign projectRP = project>
|
|
||||||
<#assign organisationRP = organisation>
|
|
||||||
|
|
||||||
<#assign aDateTime = .now>
|
|
||||||
|
|
||||||
<#switch cloudEventMsg.action>
|
|
||||||
<#case "C">
|
|
||||||
<#case "U">
|
|
||||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
||||||
<#assign dispute = JsonUtil.jsonToMap(dataRfx)>
|
|
||||||
[
|
|
||||||
<#if dispute.dispute_closed == true >
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimCreated>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsaDispute_Created.ftl">
|
|
||||||
},
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimMessageSent>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsaDispute_MessageSent.ftl">
|
|
||||||
}
|
|
||||||
<#else>
|
|
||||||
<#stop>
|
|
||||||
</#if>
|
|
||||||
]
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
<#case "D">
|
|
||||||
<#-- *********************************************** Action = DELETE ******************** -->
|
|
||||||
<#stop>
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
|
|
||||||
<#default>
|
|
||||||
<#stop>
|
|
||||||
</#switch>
|
|
||||||
|
|
||||||
@@ -1,70 +0,0 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "Table.ftl">
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
<#if dispute.dispute_preparation??>
|
|
||||||
<#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0>
|
|
||||||
"RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_activity_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
|
||||||
<#else>
|
|
||||||
<#stop "preparation order list is empty" >
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#if dispute.dispute_reception??>
|
|
||||||
"RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
<#if dispute.dispute_reference?? && dispute.dispute_reference!="">
|
|
||||||
"Title":"${dispute.dispute_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
"Title":"",
|
|
||||||
</#if>
|
|
||||||
"Criticality":"${TableCriticality[dispute.dispute_criticity]}",
|
|
||||||
"Amount": {
|
|
||||||
<#assign isCurrencyCode = JsonUtil.isCurrencyCode(dispute.dispute_amount_unit?upper_case) />
|
|
||||||
<#if isCurrencyCode>
|
|
||||||
"Currency" : "${dispute.dispute_amount_unit?upper_case?json_string}",
|
|
||||||
<#else>
|
|
||||||
<#if TableAmount[dispute.dispute_amount_unit?json_string]??>
|
|
||||||
"Currency" : "${TableAmount[dispute.dispute_amount_unit?json_string]}",
|
|
||||||
<#else>
|
|
||||||
"Currency" : "XXX",
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
"Value": "${dispute.dispute_amount}"
|
|
||||||
},
|
|
||||||
<#if dispute.dispute_type_code=="050" >
|
|
||||||
<#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0>
|
|
||||||
"EntityID":"${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
<#stop "preparation order list is empty" >
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#if dispute.dispute_type_code=="070" || dispute.dispute_type_code=="030" >
|
|
||||||
"EntityID":"${dispute.dispute_reception.reception_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
<#stop "Type not supported" >
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
<#-- To configure -->
|
|
||||||
<#include "RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl">
|
|
||||||
|
|
||||||
<#if TableReasonCode[dispute.dispute_reason_code]??>
|
|
||||||
"ClaimTypeID":"${TableReasonCode[dispute.dispute_reason_code]}"
|
|
||||||
<#else>
|
|
||||||
<#stop "Claim reason code not supported" >
|
|
||||||
</#if>
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,124 +0,0 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ReflexUtils.ftl">
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
<#if dispute.dispute_preparation??>
|
|
||||||
<#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0>
|
|
||||||
"RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_activity_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
|
||||||
<#else>
|
|
||||||
<#stop "preparation order list is empty" >
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#if dispute.dispute_reception??>
|
|
||||||
"RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
|
|
||||||
<#if dispute.dispute_preparation??>
|
|
||||||
"Message": "${dispute.dispute_reference?trim?json_string}"
|
|
||||||
<#else>
|
|
||||||
<#if dispute.dispute_reception??>
|
|
||||||
"Message": "${dispute.dispute_reception.reception_reference?trim?json_string}"
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
<#if dispute.dispute_quantity!=0 && dispute.dispute_item??>
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
<#if dispute.dispute_preparation??>
|
|
||||||
<#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0>
|
|
||||||
"RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_activity_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
|
||||||
<#else>
|
|
||||||
<#stop "preparation order list is empty" >
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#if dispute.dispute_reception??>
|
|
||||||
"RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
"Message": "${dispute.dispute_item.item_code?trim?json_string} - ${dispute.dispute_quantity}${dispute.dispute_quantity_unit}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
<#elseif dispute.dispute_item??>
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
<#if dispute.dispute_preparation??>
|
|
||||||
<#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0>
|
|
||||||
"RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_activity_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
|
||||||
<#else>
|
|
||||||
<#stop "preparation order list is empty" >
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#if dispute.dispute_reception??>
|
|
||||||
"RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
"Message": "${dispute.dispute_item.item_code?trim?json_string}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
<#elseif dispute.dispute_quantity!=0>
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
<#if dispute.dispute_preparation??>
|
|
||||||
<#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0>
|
|
||||||
"RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_activity_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
|
||||||
<#else>
|
|
||||||
<#stop "preparation order list is empty" >
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#if dispute.dispute_reception??>
|
|
||||||
"RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
"Message": "${dispute.dispute_quantity}${dispute.dispute_quantity_unit}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
</#if>
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
<#if dispute.dispute_preparation??>
|
|
||||||
<#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0>
|
|
||||||
"RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_activity_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
|
||||||
<#else>
|
|
||||||
<#stop "preparation order list is empty" >
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#if dispute.dispute_reception??>
|
|
||||||
"RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
|
|
||||||
"Message": " ${dispute.dispute_description?trim?json_string}"
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
]
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
<#-- Specify table for reason code -->
|
|
||||||
<#assign TableReasonCode = {}/>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -12,8 +12,8 @@
|
|||||||
<#assign reflexMvtStockInterface = JsonUtil.jsonToMap(dataRfx)>
|
<#assign reflexMvtStockInterface = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
|
||||||
<#-- exclusion of the cases of an IPG move with quantity = 0 (weight modification) -->
|
<#-- exclusion of the cases of an IPG move with quantity = 0 (weight modification) -->
|
||||||
|
|
||||||
<#if reflexMvtStockInterface.ipg_move_quantity_in_base_lvs != 0>
|
<#if reflexMvtStockInterface.ipg_move_quantity_in_base_lvs != 0>
|
||||||
|
|
||||||
<#-- IPG moves translated into Stock moves -->
|
<#-- IPG moves translated into Stock moves -->
|
||||||
<#if reflexMvtStockInterface.ipg_move_type == "130" ||
|
<#if reflexMvtStockInterface.ipg_move_type == "130" ||
|
||||||
reflexMvtStockInterface.ipg_move_type == "200" ||
|
reflexMvtStockInterface.ipg_move_type == "200" ||
|
||||||
@@ -24,30 +24,25 @@
|
|||||||
reflexMvtStockInterface.ipg_move_type == "260" ||
|
reflexMvtStockInterface.ipg_move_type == "260" ||
|
||||||
reflexMvtStockInterface.ipg_move_type == "290" ||
|
reflexMvtStockInterface.ipg_move_type == "290" ||
|
||||||
reflexMvtStockInterface.ipg_move_type == "300" ||
|
reflexMvtStockInterface.ipg_move_type == "300" ||
|
||||||
reflexMvtStockInterface.ipg_move_type == "350" ||
|
|
||||||
reflexMvtStockInterface.ipg_move_type == "370" ||
|
|
||||||
reflexMvtStockInterface.ipg_move_type == "400" ||
|
reflexMvtStockInterface.ipg_move_type == "400" ||
|
||||||
reflexMvtStockInterface.ipg_move_type == "410" ||
|
reflexMvtStockInterface.ipg_move_type == "410" ||
|
||||||
reflexMvtStockInterface.ipg_move_type == "420" ||
|
reflexMvtStockInterface.ipg_move_type == "420"
|
||||||
reflexMvtStockInterface.ipg_move_type == "455" ||
|
|
||||||
reflexMvtStockInterface.ipg_move_type == "460" ||
|
|
||||||
reflexMvtStockInterface.ipg_move_type == "465" ||
|
|
||||||
(reflexMvtStockInterface.ipg_move_type == "520" && reflexMvtStockInterface.ipg_move_creation_program == "HFST69")
|
|
||||||
>
|
>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.MovementCreated>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.StockMoved>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaIpgMove_StockMoved.ftl">
|
<#include "RFXtoRP_HsaIpgMove_StockMoved.ftl">
|
||||||
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#else>
|
<#else>
|
||||||
<#-- IPG moves translated into goods received (all type of receipt) -->
|
<#-- IPG moves translated into goods received (all type of receipt) -->
|
||||||
<#if (reflexMvtStockInterface.ipg_move_type == "100" ||
|
<#if reflexMvtStockInterface.ipg_move_type == "100" ||
|
||||||
reflexMvtStockInterface.ipg_move_type == "110" ||
|
reflexMvtStockInterface.ipg_move_type == "110" ||
|
||||||
reflexMvtStockInterface.ipg_move_type == "120") >
|
reflexMvtStockInterface.ipg_move_type == "120"
|
||||||
<#if reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!="">
|
>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsReceived>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsReceived>
|
||||||
@@ -58,9 +53,6 @@
|
|||||||
]
|
]
|
||||||
<#else>
|
<#else>
|
||||||
<#-- Case of IPG move type volontarilly ignored-->
|
<#-- Case of IPG move type volontarilly ignored-->
|
||||||
<#stop " Reference receipt is empty">
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#stop>
|
<#stop>
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
@@ -72,11 +64,11 @@
|
|||||||
|
|
||||||
<#case "D">
|
<#case "D">
|
||||||
<#-- *********************************************** Action = DELETE ******************** -->
|
<#-- *********************************************** Action = DELETE ******************** -->
|
||||||
<#stop >
|
<#stop "event not supported - Case D ">
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop>
|
<#stop "event not supported">
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
[
|
[
|
||||||
<#assign receipt_confirmation_datetime = RfxDateTimetoUTC(reflexMvtStockInterface.ipg_move_creation_datetime,time_zone_offset_rfx) />
|
<#assign receipt_confirmation_datetime = RfxDateTimetoUTC(reflexMvtStockInterface.ipg_move_creation_datetime,time_zone_offset_rfx) />
|
||||||
<#assign priority_date = reflexMvtStockInterface.ipg_priority_date?datetime(rfx_date_format_default)?iso_utc />
|
<#assign priority_date = reflexMvtStockInterface.ipg_priority_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
@@ -21,23 +20,18 @@
|
|||||||
"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 (reflexMvtStockInterface.ipg_priority_date!="") && (reflexMvtStockInterface.ipg_priority_date?starts_with("00")== false) >
|
|
||||||
"PriorityDate": "${priority_date}",
|
"PriorityDate": "${priority_date}",
|
||||||
<#else>
|
|
||||||
"PriorityDate": "1970-01-01T00:00:00Z",
|
|
||||||
</#if>
|
|
||||||
|
|
||||||
<#-- Goods received Segmentation Keys inclusion -->
|
<#-- Goods received Segmentation Keys inclusion -->
|
||||||
<#include "RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl">
|
<#include "RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl">
|
||||||
},
|
},
|
||||||
|
|
||||||
<#if reflexMvtStockInterface.receipt_reference!="">
|
<#if reflexMvtStockInterface.receipt_reference!="">
|
||||||
"ExecutionflowID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}",
|
"ExecutionflowID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}",
|
||||||
<#else>
|
<#else>
|
||||||
"ExecutionflowID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}",
|
"ExecutionflowID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}",
|
||||||
</#if>
|
</#if>
|
||||||
"LineID": "${reflexMvtStockInterface.receipt_line_number}",
|
"LineID": "${reflexMvtStockInterface.receipt_line_number}",
|
||||||
"ActorID": "${RFXtoRPprefixDepot(reflexMvtStockInterface.physical_depot_code?trim?json_string)}",
|
"ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}",
|
||||||
"Quantity": {
|
"Quantity": {
|
||||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||||
"Value": ${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs}
|
"Value": ${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
|
|
||||||
<#assign MoveType_KV = {"130":"STOCK_MOVEMENT_TYPE_PRODUCTION",
|
<#assign MoveType_KV = {"130":"STOCK_MOVEMENT_TYPE_PRODUCTION",
|
||||||
"200":"STOCK_MOVEMENT_TYPE_FIX",
|
"200":"STOCK_MOVEMENT_TYPE_FIX",
|
||||||
@@ -11,18 +10,12 @@
|
|||||||
"260":"STOCK_MOVEMENT_TYPE_REQUALIFICATION",
|
"260":"STOCK_MOVEMENT_TYPE_REQUALIFICATION",
|
||||||
"290":"STOCK_MOVEMENT_TYPE_REQUALIFICATION",
|
"290":"STOCK_MOVEMENT_TYPE_REQUALIFICATION",
|
||||||
"300":"STOCK_MOVEMENT_TYPE_REQUALIFICATION",
|
"300":"STOCK_MOVEMENT_TYPE_REQUALIFICATION",
|
||||||
"350":"STOCK_MOVEMENT_TYPE_USE_OF_GOODS",
|
|
||||||
"370":"STOCK_MOVEMENT_TYPE_USE_OF_GOODS",
|
|
||||||
"400":"STOCK_MOVEMENT_TYPE_FIX",
|
"400":"STOCK_MOVEMENT_TYPE_FIX",
|
||||||
"410":"STOCK_MOVEMENT_TYPE_FIX",
|
"410":"STOCK_MOVEMENT_TYPE_FIX",
|
||||||
"420":"STOCK_MOVEMENT_TYPE_REQUALIFICATION",
|
"420":"STOCK_MOVEMENT_TYPE_REQUALIFICATION"}>
|
||||||
"455":"STOCK_MOVEMENT_TYPE_FIX",
|
|
||||||
"460":"STOCK_MOVEMENT_TYPE_FIX",
|
|
||||||
"465":"STOCK_MOVEMENT_TYPE_FIX",
|
|
||||||
"520":"STOCK_MOVEMENT_TYPE_OUTBOUND"
|
|
||||||
}>
|
|
||||||
<#assign generation_date = RfxDateTimetoUTC(reflexMvtStockInterface.ipg_move_creation_datetime,time_zone_offset_rfx) />
|
<#assign generation_date = RfxDateTimetoUTC(reflexMvtStockInterface.ipg_move_creation_datetime,time_zone_offset_rfx) />
|
||||||
<#assign ipg_priority_datetime = reflexMvtStockInterface.ipg_priority_date?datetime(rfx_date_format_default)?iso_utc />
|
<#assign ipg_priority_datetime = reflexMvtStockInterface.ipg_priority_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
@@ -31,11 +24,7 @@
|
|||||||
"Payload": {
|
"Payload": {
|
||||||
"Goods": {
|
"Goods": {
|
||||||
"ItemID": "${reflexMvtStockInterface.item_code?trim?json_string}",
|
"ItemID": "${reflexMvtStockInterface.item_code?trim?json_string}",
|
||||||
<#if (reflexMvtStockInterface.ipg_priority_date!="") && (reflexMvtStockInterface.ipg_priority_date?starts_with("00")== false) >
|
|
||||||
"PriorityDate": "${ipg_priority_datetime}",
|
"PriorityDate": "${ipg_priority_datetime}",
|
||||||
<#else>
|
|
||||||
"PriorityDate": "1970-01-01T00:00:00Z",
|
|
||||||
</#if>
|
|
||||||
|
|
||||||
<#-- Segmentation keys inclusions -->
|
<#-- Segmentation keys inclusions -->
|
||||||
<#include "RFXtoRP_HsaIpgMove_StockMoved_SegmentationKeys.ftl">,
|
<#include "RFXtoRP_HsaIpgMove_StockMoved_SegmentationKeys.ftl">,
|
||||||
@@ -43,7 +32,7 @@
|
|||||||
|
|
||||||
"LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}"
|
"LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}"
|
||||||
},
|
},
|
||||||
"ActorID": "${RFXtoRPprefixDepot(reflexMvtStockInterface.physical_depot_code?trim?json_string)}",
|
"ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}",
|
||||||
"Movement": {
|
"Movement": {
|
||||||
|
|
||||||
"DateTime": {
|
"DateTime": {
|
||||||
@@ -53,11 +42,7 @@
|
|||||||
"Author": "ReflexWMS-${reflexMvtStockInterface.ipg_move_creation_user_code?json_string}",
|
"Author": "ReflexWMS-${reflexMvtStockInterface.ipg_move_creation_user_code?json_string}",
|
||||||
"ExternalMoveRef" : "${reflexMvtStockInterface.ipg_move_year_number} - ${reflexMvtStockInterface.ipg_move_number}",
|
"ExternalMoveRef" : "${reflexMvtStockInterface.ipg_move_year_number} - ${reflexMvtStockInterface.ipg_move_number}",
|
||||||
"Type": "${MoveType_KV[reflexMvtStockInterface.ipg_move_type]!reflexMvtStockInterface.ipg_move_type}",
|
"Type": "${MoveType_KV[reflexMvtStockInterface.ipg_move_type]!reflexMvtStockInterface.ipg_move_type}",
|
||||||
<#if reflexMvtStockInterface.ipg_move_type == "520" >
|
|
||||||
"Reason": " Transfert ${RFXtoRPprefixDepot(reflexMvtStockInterface.physical_depot_code?trim?json_string)} to ${RFXtoRPprefixDepot(reflexMvtStockInterface.transfer_consignee_physical_depot_code?trim?json_string)}",
|
|
||||||
<#else>
|
|
||||||
"Reason": "${reflexMvtStockInterface.miscellaneous_receipts_despatches_code?json_string}",
|
"Reason": "${reflexMvtStockInterface.miscellaneous_receipts_despatches_code?json_string}",
|
||||||
</#if>
|
|
||||||
"ExternalInfo" : "${reflexMvtStockInterface.stock_move_reference?json_string}",
|
"ExternalInfo" : "${reflexMvtStockInterface.stock_move_reference?json_string}",
|
||||||
<#if reflexMvtStockInterface.ipg_move_operation_year_number!= 0>
|
<#if reflexMvtStockInterface.ipg_move_operation_year_number!= 0>
|
||||||
"OperationReference": "${reflexMvtStockInterface.ipg_move_operation_year_number} - ${reflexMvtStockInterface.ipg_move_operation_number}",
|
"OperationReference": "${reflexMvtStockInterface.ipg_move_operation_year_number} - ${reflexMvtStockInterface.ipg_move_operation_number}",
|
||||||
@@ -66,7 +51,7 @@
|
|||||||
"Quantity":
|
"Quantity":
|
||||||
{
|
{
|
||||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||||
<#if reflexMvtStockInterface.move_sign == "+" || reflexMvtStockInterface.ipg_move_quantity_in_base_lvs <= 0 >
|
<#if reflexMvtStockInterface.move_sign == "+">
|
||||||
"Value": ${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs}
|
"Value": ${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs}
|
||||||
<#else>
|
<#else>
|
||||||
"Value": -${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs}
|
"Value": -${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs}
|
||||||
|
|||||||
@@ -46,6 +46,6 @@
|
|||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop "event not supported">
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,6 @@
|
|||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop "event not supported">
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -16,8 +16,8 @@
|
|||||||
"Codes": [
|
"Codes": [
|
||||||
<#list lv.id_list as id>
|
<#list lv.id_list as id>
|
||||||
{
|
{
|
||||||
"Key": "${(id.logistical_variant_ID_type_code!"")?json_string}",
|
"Key": "${id.logistical_variant_ID_type_code?json_string!""}",
|
||||||
"Value": "${(id.logistical_variant_ID_code!"")?json_string}"
|
"Value": "${id.logistical_variant_ID_code?json_string!""}"
|
||||||
}<#sep>,</#sep>
|
}<#sep>,</#sep>
|
||||||
</#list>
|
</#list>
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -24,9 +24,7 @@
|
|||||||
<#include "RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl">,
|
<#include "RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl">,
|
||||||
|
|
||||||
<#-- Item Photo URI could be added here -->
|
<#-- Item Photo URI could be added here -->
|
||||||
<#if item.url?? && item.url!="">
|
<#--"PhotoURI": " ", -->
|
||||||
"PhotoURI": "${item.url?json_string}",
|
|
||||||
</#if>
|
|
||||||
|
|
||||||
<#-- Loop for the Logistical Variants - LV -->
|
<#-- Loop for the Logistical Variants - LV -->
|
||||||
<#if item.logistical_variant_list??>
|
<#if item.logistical_variant_list??>
|
||||||
@@ -41,8 +39,8 @@
|
|||||||
"Codes": [
|
"Codes": [
|
||||||
<#list logistical_variant.id_list as id>
|
<#list logistical_variant.id_list as id>
|
||||||
{
|
{
|
||||||
"Key": "${(id.logistical_variant_ID_type_code!"")?json_string}",
|
"Key": "${id.logistical_variant_ID_type_code?json_string!""}",
|
||||||
"Value": "${(id.logistical_variant_ID_code!"")?json_string}"
|
"Value": "${id.logistical_variant_ID_code?json_string!""}"
|
||||||
}<#sep>,</#sep>
|
}<#sep>,</#sep>
|
||||||
</#list>
|
</#list>
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,40 +0,0 @@
|
|||||||
<#-- **** input parameters ***** -->
|
|
||||||
<#-- input : message RFX -->
|
|
||||||
<#-- project : projectId in ReflexPlatform -->
|
|
||||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
|
||||||
<#assign projectRP = project>
|
|
||||||
<#assign organisationRP = organisation>
|
|
||||||
|
|
||||||
<#assign aDateTime = .now>
|
|
||||||
|
|
||||||
<#stop>
|
|
||||||
|
|
||||||
<#switch cloudEventMsg.action>
|
|
||||||
<#case "C">
|
|
||||||
<#case "U">
|
|
||||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
||||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
|
||||||
[
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
<#case "D">
|
|
||||||
<#-- *********************************************** Action = DELETE *************************** -->
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
||||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
|
||||||
[
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
<#default>
|
|
||||||
<#stop >
|
|
||||||
</#switch>
|
|
||||||
@@ -17,7 +17,6 @@
|
|||||||
<#assign preparationStatusInterface = JsonUtil.jsonToMap(dataRfx) />
|
<#assign preparationStatusInterface = JsonUtil.jsonToMap(dataRfx) />
|
||||||
[
|
[
|
||||||
<#--**Pick batch runned (200) **-->
|
<#--**Pick batch runned (200) **-->
|
||||||
<#if preparationStatusInterface.preparation_order_originator_reference?? && preparationStatusInterface.preparation_order_originator_reference!="">
|
|
||||||
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "200" >
|
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "200" >
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationExpected>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationExpected>
|
||||||
@@ -64,18 +63,15 @@
|
|||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
<#else>
|
|
||||||
<#stop "PRO reference is empty">
|
|
||||||
</#if>
|
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#case "D">
|
<#case "D">
|
||||||
<#-- *********************************************** Action = DELETE ******************** -->
|
<#-- *********************************************** Action = DELETE ******************** -->
|
||||||
<#stop >
|
<#stop "event not supported (case D)">
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop "event not supported">
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -41,6 +41,6 @@
|
|||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop "event not supported">
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,12 @@
|
|||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${RFXtoRPprefixSupplier(actor.code?trim?json_string)}"
|
"RefID": "${actor.code?trim?json_string}"
|
||||||
},
|
},
|
||||||
|
|
||||||
"Payload": {
|
"Payload": {
|
||||||
"Name": "${actor.designation?json_string}",
|
"Name": "${actor.designation?json_string}",
|
||||||
"ManagedStock": false,
|
"ManagedStock": false,
|
||||||
@@ -16,7 +14,9 @@
|
|||||||
<#-- ***Partner ID could be added here *** -->
|
<#-- ***Partner ID could be added here *** -->
|
||||||
<#-- "PartnerID": "${}", -->
|
<#-- "PartnerID": "${}", -->
|
||||||
|
|
||||||
|
<#--
|
||||||
<#include "RFXtoRP_HsaSup_ActorCreated_Metadata.ftl">,
|
<#include "RFXtoRP_HsaSup_ActorCreated_Metadata.ftl">,
|
||||||
|
-->
|
||||||
|
|
||||||
"Address":
|
"Address":
|
||||||
{
|
{
|
||||||
@@ -28,12 +28,7 @@
|
|||||||
"StreetAddressTwo" : "${actor.supplier_structured_address.additionnal_data?json_string}",
|
"StreetAddressTwo" : "${actor.supplier_structured_address.additionnal_data?json_string}",
|
||||||
"PostalCode" : "${actor.supplier_structured_address.postal_code?json_string}",
|
"PostalCode" : "${actor.supplier_structured_address.postal_code?json_string}",
|
||||||
"City" : "${actor.supplier_structured_address.post_code_area_name?json_string}",
|
"City" : "${actor.supplier_structured_address.post_code_area_name?json_string}",
|
||||||
<#assign isCountryCode = JsonUtil.isCountryCode(actor.supplier_structured_address.country_code?upper_case) />
|
"CountryCode" : "${actor.supplier_structured_address.country_code?json_string}",
|
||||||
<#if isCountryCode>
|
|
||||||
"CountryCode" : "${actor.supplier_structured_address.country_code?upper_case?json_string}",
|
|
||||||
<#else>
|
|
||||||
"CountryCode" : "",
|
|
||||||
</#if>
|
|
||||||
"ProvinceCode": "${actor.supplier_structured_address.territorial_div_code?json_string}",
|
"ProvinceCode": "${actor.supplier_structured_address.territorial_div_code?json_string}",
|
||||||
"State": "${actor.supplier_structured_address.country_designation?json_string}"
|
"State": "${actor.supplier_structured_address.country_designation?json_string}"
|
||||||
|
|
||||||
@@ -43,8 +38,7 @@
|
|||||||
"Name": "${actor.optional_attributes.company_name?json_string}",
|
"Name": "${actor.optional_attributes.company_name?json_string}",
|
||||||
"StreetAddressOne" : "${actor.optional_attributes.address_1?json_string}",
|
"StreetAddressOne" : "${actor.optional_attributes.address_1?json_string}",
|
||||||
"StreetAddressTwo" : "${actor.optional_attributes.address_2?json_string}",
|
"StreetAddressTwo" : "${actor.optional_attributes.address_2?json_string}",
|
||||||
"StreetAddressThree" : "${actor.optional_attributes.address_3?json_string}",
|
"StreetAddressThree" : "${actor.optional_attributes.address_3?json_string}"
|
||||||
"CountryCode" : ""
|
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,12 @@
|
|||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${RFXtoRPprefixSupplier(actor.code?trim?json_string)}"
|
"RefID": "${actor.code?trim?json_string}"
|
||||||
},
|
},
|
||||||
|
|
||||||
"Payload": {}
|
"Payload": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,40 +0,0 @@
|
|||||||
<#-- **** input parameters ***** -->
|
|
||||||
<#-- input : message RFX -->
|
|
||||||
<#-- project : projectId in ReflexPlatform -->
|
|
||||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
|
||||||
<#assign projectRP = project>
|
|
||||||
<#assign organisationRP = organisation>
|
|
||||||
|
|
||||||
<#assign aDateTime = .now>
|
|
||||||
|
|
||||||
<#stop>
|
|
||||||
|
|
||||||
<#switch cloudEventMsg.action>
|
|
||||||
<#case "C">
|
|
||||||
<#case "U">
|
|
||||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
||||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
|
||||||
[
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
<#case "D">
|
|
||||||
<#-- *********************************************** Action = DELETE *************************** -->
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
||||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
|
||||||
[
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
<#default>
|
|
||||||
<#stop >
|
|
||||||
</#switch>
|
|
||||||
@@ -41,6 +41,6 @@
|
|||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop "event not supported">
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,12 @@
|
|||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${RFXtoRPprefixDepot(depot.physical_depot_code?trim?json_string)}"
|
"RefID": "${depot.physical_depot_code?trim?json_string}"
|
||||||
},
|
},
|
||||||
|
|
||||||
"Payload": {
|
"Payload": {
|
||||||
"Name": "${depot.physical_depot_designation?json_string}",
|
"Name": "${depot.physical_depot_designation?json_string}",
|
||||||
"ManagedStock": true,
|
"ManagedStock": true,
|
||||||
@@ -16,9 +14,9 @@
|
|||||||
<#-- ***Partner ID could be added here *** -->
|
<#-- ***Partner ID could be added here *** -->
|
||||||
<#-- "PartnerID": "${}", -->
|
<#-- "PartnerID": "${}", -->
|
||||||
|
|
||||||
|
<#--
|
||||||
<#include "RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl">,
|
<#include "RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl">,
|
||||||
|
-->
|
||||||
|
|
||||||
"Address":
|
"Address":
|
||||||
{
|
{
|
||||||
@@ -30,31 +28,22 @@
|
|||||||
"StreetAddressTwo" : "${depot.physical_depot_structured_address.additionnal_data?json_string}",
|
"StreetAddressTwo" : "${depot.physical_depot_structured_address.additionnal_data?json_string}",
|
||||||
"PostalCode" : "${depot.physical_depot_structured_address.postal_code?json_string}",
|
"PostalCode" : "${depot.physical_depot_structured_address.postal_code?json_string}",
|
||||||
"City" : "${depot.physical_depot_structured_address.post_code_area_name?json_string}",
|
"City" : "${depot.physical_depot_structured_address.post_code_area_name?json_string}",
|
||||||
<#assign isCountryCode = JsonUtil.isCountryCode(depot.physical_depot_structured_address.country_code?upper_case) />
|
"CountryCode" : "${depot.physical_depot_structured_address.country_code?json_string}",
|
||||||
<#if isCountryCode >
|
|
||||||
"CountryCode" : "${depot.physical_depot_structured_address.country_code?upper_case?json_string}",
|
|
||||||
<#else>
|
|
||||||
"CountryCode" : "",
|
|
||||||
</#if>
|
|
||||||
"ProvinceCode": "${depot.physical_depot_structured_address.territorial_div_code?json_string}",
|
"ProvinceCode": "${depot.physical_depot_structured_address.territorial_div_code?json_string}",
|
||||||
"State": "${depot.physical_depot_structured_address.country_designation?json_string}"
|
"State": "${depot.physical_depot_structured_address.country_designation?json_string}"
|
||||||
|
|
||||||
<#-- if Reflex WMS address is not structured -->
|
<#-- if Reflex WMS address is not structured -->
|
||||||
<#else>
|
<#else>
|
||||||
<#if depot.physical_depot_address??>
|
|
||||||
"Name": "${depot.physical_depot_address.company_name?json_string}",
|
"Name": "${depot.physical_depot_address.company_name?json_string}",
|
||||||
"StreetAddressOne" : "${depot.physical_depot_address.address_1?json_string}",
|
"StreetAddressOne" : "${depot.physical_depot_address.address_1?json_string}",
|
||||||
"StreetAddressTwo" : "${depot.physical_depot_address.address_2?json_string}",
|
"StreetAddressTwo" : "${depot.physical_depot_address.address_2?json_string}",
|
||||||
"StreetAddressThree" : "${depot.physical_depot_address.address_3?json_string}",
|
"StreetAddressThree" : "${depot.physical_depot_address.address_3?json_string}"
|
||||||
"CountryCode" : ""
|
|
||||||
</#if>
|
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
},
|
},
|
||||||
<#if depot.physical_depot_address??>
|
|
||||||
"Phones": ["${depot.physical_depot_address.telephone?json_string}",
|
"Phones": ["${depot.physical_depot_address.telephone?json_string}",
|
||||||
"${depot.physical_depot_address.other_number?json_string}"
|
"${depot.physical_depot_address.other_number?json_string}"
|
||||||
],
|
],
|
||||||
</#if>
|
|
||||||
"Typology": "TYPOLOGY_UNKNOWN"
|
"Typology": "TYPOLOGY_UNKNOWN"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,12 @@
|
|||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${RFXtoRPprefixDepot(depot.physical_depot_code?trim?json_string)}"
|
"RefID": "${depot.physical_depot_code?trim?json_string}"
|
||||||
},
|
},
|
||||||
|
|
||||||
"Payload": {}
|
"Payload": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,40 +0,0 @@
|
|||||||
<#-- **** input parameters ***** -->
|
|
||||||
<#-- input : message RFX -->
|
|
||||||
<#-- project : projectId in ReflexPlatform -->
|
|
||||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
|
||||||
<#assign projectRP = project>
|
|
||||||
<#assign organisationRP = organisation>
|
|
||||||
|
|
||||||
<#assign aDateTime = .now>
|
|
||||||
|
|
||||||
<#stop>
|
|
||||||
|
|
||||||
<#switch cloudEventMsg.action>
|
|
||||||
<#case "C">
|
|
||||||
<#case "U">
|
|
||||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
||||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
|
||||||
[
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
<#case "D">
|
|
||||||
<#-- *********************************************** Action = DELETE *************************** -->
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
||||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
|
||||||
[
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
<#default>
|
|
||||||
<#stop >
|
|
||||||
</#switch>
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
<#-- input : message RFX -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in ReflexPlatform -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
<#assign organisationRP = organisation>
|
<#assign organisationRP = organisation>
|
||||||
@@ -25,7 +25,6 @@
|
|||||||
<#include "RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl">
|
<#include "RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl">
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
@@ -48,14 +47,9 @@
|
|||||||
}
|
}
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
<#assign refIDHmap ={}>
|
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list??) as preparation_line>
|
||||||
<#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>
|
<#list preparation_line.despatched_ipg_list as despatched_ipg>
|
||||||
<#assign HUadded_packing_datetime = RfxDateTimetoUTC(preparation_line.confirmation_datetime,time_zone_offset_rfx) />
|
<#if despatched_ipg.consignment_unit_id!="">
|
||||||
<#if !hd_numberHmap[despatched_ipg.hd_number]?? >
|
|
||||||
<#assign hd_numberHmap += {despatched_ipg.hd_number,despatched_ipg.hd_number}>
|
|
||||||
,
|
,
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled>
|
||||||
@@ -78,33 +72,25 @@
|
|||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl">
|
<#include "RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl">
|
||||||
}
|
}
|
||||||
<#if !hd_numberHmapHUadded[despatched_ipg.hd_number]??>
|
|
||||||
<#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>
|
||||||
|
<#-- <#sep>,</#sep> -->
|
||||||
</#list>
|
</#list>
|
||||||
<#assign refIDHmap ={}>
|
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
<#else>
|
<#else>
|
||||||
<#stop "no confirmed quantity for the preparation - preparation closed">
|
<#stop "no confirmed quantity for the preparation - preparation closed">
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
|
|
||||||
<#break>
|
<#break>
|
||||||
<#case "D">
|
<#case "D">
|
||||||
<#-- *********************************************** Action = DELETE ******************** -->
|
<#-- *********************************************** Action = DELETE ******************** -->
|
||||||
<#stop>
|
<#stop "event not supported (Case D)">
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop>
|
<#stop "event not supported">
|
||||||
</#switch>
|
</#switch>
|
||||||
@@ -1,25 +1,17 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.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": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID":{
|
"ID":{
|
||||||
"RefID": "${OrderOriginReference}"
|
"RefID": "${preparationOrder.preparation_line_lst[0].preparation_order_originator_reference?trim?json_string}"
|
||||||
},
|
},
|
||||||
"Payload":{
|
"Payload":{
|
||||||
"Carrier": {
|
"Carrier": {
|
||||||
"ActorID": "${RFXtoRPprefixCarrier(preparationOrder.load_data.carrier_code?trim?json_string)}"
|
"ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}"
|
||||||
}
|
}
|
||||||
<#-- Add transport grade code
|
<#-- Add transport grade code
|
||||||
<#if preparationOrder.transport_grade_code!="">
|
<#if preparationOrder.transport_grade_code!="">
|
||||||
@@ -28,7 +20,4 @@
|
|||||||
</#if> -->
|
</#if> -->
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</#if>
|
|
||||||
</#list>
|
|
||||||
<#assign refIDHmap_local ={}>
|
|
||||||
]
|
]
|
||||||
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
<#--
|
<#--
|
||||||
"MetaData" :[
|
"MetaData" :[
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
-->
|
-->
|
||||||
"MetaData": [ ]
|
"MetaData": [ ]
|
||||||
@@ -24,6 +24,7 @@
|
|||||||
<#else>
|
<#else>
|
||||||
"Value": { "Bool" : "False"}
|
"Value": { "Bool" : "False"}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
<#assign manufacturing_date = despatched_ipg.ipg_manufacture_date?datetime(rfx_date_format_default)?iso_utc />
|
<#assign manufacturing_date = despatched_ipg.ipg_manufacture_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
"Key": "ManufacturingDate",
|
"Key": "ManufacturingDate",
|
||||||
|
|||||||
@@ -1,29 +1,23 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
[
|
[
|
||||||
<#assign dispatched3_datetime = RfxDateTimetoUTC(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_offset_rfx) />
|
<#assign dispatched_datetime = RfxDateTimetoUTC(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_offset_rfx) />
|
||||||
|
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list??) as preparation_line>
|
||||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list??) as preparation_line3>
|
<#list preparation_line.despatched_ipg_list as despatched_ipg>
|
||||||
<#list preparation_line3.despatched_ipg_list?filter(j ->j.carton_number!="000000000000000000") as despatched_ipg3>
|
|
||||||
<#if !refIDHmap[despatched_ipg3.carton_number]?? >
|
|
||||||
<#if refIDHmap?size != 0 >
|
|
||||||
,
|
|
||||||
</#if>
|
|
||||||
<#assign refIDHmap += {despatched_ipg3.carton_number,despatched_ipg3.carton_number}>
|
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${despatched_ipg3.carton_number}",
|
"RefID": "${despatched_ipg.carton_number}",
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${dispatched3_datetime}",
|
"DateTime": "${dispatched_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Payload": { }
|
"Payload": { }
|
||||||
}
|
}<#sep>,</#sep>
|
||||||
</#if>
|
|
||||||
</#list>
|
</#list>
|
||||||
|
<#sep>,</#sep>
|
||||||
</#list>
|
</#list>
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
<#-- use protobuf of class HsrPrepa to find Reflex WMS fields names -->
|
|
||||||
|
|
||||||
<#--
|
|
||||||
"MetaData" :[
|
|
||||||
|
|
||||||
]
|
|
||||||
|
|
||||||
-->
|
|
||||||
"MetaData": [ ]
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
[
|
|
||||||
<#assign dispatched_datetime5 = RfxDateTimetoUTC(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_offset_rfx) />
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
"RefID":"${despatched_ipg.hd_number}",
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${dispatched_datetime5}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
"HandlingunitID": "${despatched_ipg.hd_number}"
|
|
||||||
<#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" >
|
|
||||||
,
|
|
||||||
"HUCarrier":{
|
|
||||||
"ActorID": "${RFXtoRPprefixCarrier(preparationOrder.load_data.carrier_code?trim?json_string)}"
|
|
||||||
}
|
|
||||||
</#if>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -2,16 +2,12 @@
|
|||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
[
|
[
|
||||||
<#assign dispatched_datetime = RfxDateTimetoUTC(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_offset_rfx) />
|
<#assign dispatched_datetime = RfxDateTimetoUTC(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_offset_rfx) />
|
||||||
<#assign refIDHmap_local ={}>
|
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list??) as preparation_line>
|
||||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.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?size != 0 >
|
|
||||||
,
|
|
||||||
</#if>
|
|
||||||
<#assign refIDHmap_local +={despatched_ipg.hd_number,despatched_ipg.hd_number}>
|
|
||||||
{
|
{
|
||||||
"Header": {"ProjectID": "${projectRP}"},
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${despatched_ipg.hd_number}",
|
"RefID": "${despatched_ipg.hd_number}",
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
@@ -20,9 +16,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Payload": { }
|
"Payload": { }
|
||||||
}
|
}<#sep>,</#sep>
|
||||||
</#if>
|
|
||||||
</#list>
|
</#list>
|
||||||
|
<#sep>,</#sep>
|
||||||
</#list>
|
</#list>
|
||||||
<#assign refIDHmap_local ={}>
|
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,19 +1,13 @@
|
|||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
[
|
[
|
||||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") as preparation_line>
|
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list??) as preparation_line>
|
||||||
<#list preparation_line.despatched_ipg_list as despatched_ipg>
|
<#list preparation_line.despatched_ipg_list as despatched_ipg>
|
||||||
<#assign packing_datetime = RfxDateTimetoUTC(preparation_line.confirmation_datetime,time_zone_offset_rfx) />
|
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefDate": {
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}",
|
|
||||||
"DateTime": "${packing_datetime}"
|
|
||||||
},
|
|
||||||
<#if despatched_ipg.carton_number != "000000000000000000">
|
<#if despatched_ipg.carton_number != "000000000000000000">
|
||||||
"RefID": "${despatched_ipg.carton_number}"
|
"RefID": "${despatched_ipg.carton_number}"
|
||||||
<#else>
|
<#else>
|
||||||
@@ -24,9 +18,9 @@
|
|||||||
"Payload": {
|
"Payload": {
|
||||||
"Information" :{
|
"Information" :{
|
||||||
<#if despatched_ipg.carton_number != "000000000000000000">
|
<#if despatched_ipg.carton_number != "000000000000000000">
|
||||||
"ContainerType": "${despatched_ipg.carton_type_code?json_string}"
|
"ContainerType": "${despatched_ipg.carton_type_code}"
|
||||||
<#if preparation_line.despatched_cartons_list?? >
|
<#if preparation_line.despatched_cartons_list?? >
|
||||||
<#list preparation_line.despatched_cartons_list?filter(l -> l?? && l.carton_number==despatched_ipg.carton_number) as dimensionCarton>
|
<#list preparation_line.despatched_cartons_list?filter(l ->l.carton_number==despatched_ipg.carton_number) as dimensionCarton>
|
||||||
,
|
,
|
||||||
"Length": {
|
"Length": {
|
||||||
"Unit": "${length_unit_rfx}",
|
"Unit": "${length_unit_rfx}",
|
||||||
@@ -49,7 +43,7 @@
|
|||||||
<#else>
|
<#else>
|
||||||
"ContainerType": "${despatched_ipg.hd_type_code?json_string}"
|
"ContainerType": "${despatched_ipg.hd_type_code?json_string}"
|
||||||
<#if preparation_line.despatched_hds_list??>
|
<#if preparation_line.despatched_hds_list??>
|
||||||
<#list preparation_line.despatched_hds_list?filter(j -> j?? && j.handling_device_number==despatched_ipg.hd_number) as dimensionHU>
|
<#list preparation_line.despatched_hds_list?filter(j ->j.handling_device_number==despatched_ipg.hd_number) as dimensionHU>
|
||||||
,
|
,
|
||||||
"Length": {
|
"Length": {
|
||||||
"Unit": "${length_unit_rfx}",
|
"Unit": "${length_unit_rfx}",
|
||||||
@@ -76,9 +70,12 @@
|
|||||||
"Goods": {
|
"Goods": {
|
||||||
"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_manufacture_date?length != 0) && (despatched_ipg.ipg_manufacture_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_manufacture_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}",
|
||||||
|
<#else>
|
||||||
|
<#if (despatched_ipg.ipg_receipt_date?length != 0) && (despatched_ipg.ipg_receipt_date?starts_with("00")== false)>
|
||||||
|
<#assign priority_date = despatched_ipg.ipg_receipt_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
"PriorityDate": "${priority_date}",
|
"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)>
|
||||||
@@ -89,12 +86,8 @@
|
|||||||
<#assign priority_date = despatched_ipg.ipg_sell_by_date?datetime(rfx_date_format_default)?iso_utc />
|
<#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_use_by_date?length != 0) && (despatched_ipg.ipg_use_by_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_use_by_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
"PriorityDate": "${priority_date}",
|
|
||||||
<#else>
|
|
||||||
<#if (despatched_ipg.ipg_receipt_date?length != 0) && (despatched_ipg.ipg_receipt_date?starts_with("00")== false)>
|
|
||||||
<#assign priority_date = despatched_ipg.ipg_receipt_date?datetime(rfx_date_format_default)?iso_utc />
|
|
||||||
"PriorityDate": "${priority_date}",
|
"PriorityDate": "${priority_date}",
|
||||||
<#else>
|
<#else>
|
||||||
<#if (preparationOrder.stock_despatch_at_preparation_datetime?length != 0) && (preparationOrder.stock_despatch_at_preparation_datetime?starts_with("00")== false)>
|
<#if (preparationOrder.stock_despatch_at_preparation_datetime?length != 0) && (preparationOrder.stock_despatch_at_preparation_datetime?starts_with("00")== false)>
|
||||||
@@ -118,7 +111,7 @@
|
|||||||
<#else>
|
<#else>
|
||||||
"LineID": "${preparation_line.pro_line_number!0}",
|
"LineID": "${preparation_line.pro_line_number!0}",
|
||||||
</#if>
|
</#if>
|
||||||
"ActorID": "${RFXtoRPprefixDepot(preparationOrder.physical_depot_code?trim?json_string)}",
|
"ActorID": "${preparationOrder.physical_depot_code?trim?json_string}",
|
||||||
"Quantity": {
|
"Quantity": {
|
||||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||||
"Value": ${despatched_ipg.quantity_lvs}
|
"Value": ${despatched_ipg.quantity_lvs}
|
||||||
@@ -127,6 +120,7 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
}<#sep>,</#sep>
|
}<#sep>,</#sep>
|
||||||
</#list>
|
</#list>
|
||||||
<#sep>,</#sep>
|
<#sep>,</#sep>
|
||||||
|
|||||||
@@ -1,22 +1,19 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
[
|
[
|
||||||
|
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefDate": {
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}",
|
|
||||||
"DateTime": "${HUadded_packing_datetime}"
|
|
||||||
},
|
|
||||||
"RefID": "${despatched_ipg.hd_number}"
|
"RefID": "${despatched_ipg.hd_number}"
|
||||||
},
|
},
|
||||||
|
|
||||||
"Payload": {
|
"Payload": {
|
||||||
|
|
||||||
"IncludedHandlingunitIDs": [ "${despatched_ipg.carton_number}" ]
|
"IncludedHandlingunitIDs": [ "${despatched_ipg.carton_number}" ]
|
||||||
<#if preparation_line.despatched_hds_list?? && preparation_line.despatched_hds_list[0]??>
|
<#if preparation_line.despatched_hds_list?? >
|
||||||
,
|
,
|
||||||
"Information": {
|
"Information": {
|
||||||
"ContainerType": "${preparation_line.despatched_hds_list[0].hd_type_code}",
|
"ContainerType": "${preparation_line.despatched_hds_list[0].hd_type_code}",
|
||||||
@@ -33,10 +30,7 @@
|
|||||||
"Value": ${preparation_line.despatched_hds_list[0].hd_type_width}
|
"Value": ${preparation_line.despatched_hds_list[0].hd_type_width}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</#if>,
|
</#if>
|
||||||
<#-- HU Metadata inclusin inclusion -->
|
|
||||||
<#include "RFXtoRP_HsrPrepa_HUsAdded_Metadata.ftl">
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,29 +1,18 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.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": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID":{
|
"ID":{
|
||||||
"RefID": "${OrderOriginReference}"
|
"RefID": "${preparationOrder.preparation_line_lst[0].preparation_order_originator_reference?trim?json_string}"
|
||||||
},
|
},
|
||||||
"Payload":{
|
"Payload":{
|
||||||
"Carrier": {
|
"Carrier": {
|
||||||
"ActorID": "${RFXtoRPprefixCarrier(preparationOrder.load_data.carrier_code?trim?json_string)}"
|
"ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</#if>
|
|
||||||
</#list>
|
|
||||||
<#assign refIDHmap_local ={}>
|
|
||||||
]
|
]
|
||||||
@@ -1,27 +1,13 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
[
|
[
|
||||||
<#assign dispatched_datetime4 = RfxDateTimetoUTC(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_offset_rfx) />
|
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"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>
|
|
||||||
<#if despatched_ipg.carton_number != "000000000000000000">
|
|
||||||
"RefID":"${despatched_ipg.carton_number}",
|
|
||||||
<#else>
|
|
||||||
"RefID":"${despatched_ipg.hd_number}",
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${dispatched_datetime4}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"Payload": {
|
"Payload": {
|
||||||
<#if despatched_ipg.carton_number != "000000000000000000">
|
<#if despatched_ipg.carton_number != "000000000000000000">
|
||||||
@@ -32,8 +18,9 @@
|
|||||||
<#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" >
|
<#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" >
|
||||||
,
|
,
|
||||||
"HUCarrier":{
|
"HUCarrier":{
|
||||||
"ActorID": "${RFXtoRPprefixCarrier(preparationOrder.load_data.carrier_code?trim?json_string)}"
|
"ActorID": "${preparationOrder.load_data.carrier_code?json_string}"
|
||||||
}
|
}
|
||||||
|
|
||||||
</#if>
|
</#if>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,30 +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!="">
|
<#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 == "010" || preparation_order.preparation_type_code == "030">
|
||||||
<#-- Only if preparation order not confirmed -->
|
<#-- Only if preparation order not confirmed -->
|
||||||
<#if preparation_order.preparation_order_confirmed == "false" >
|
<#if preparation_order.preparation_order_confirmed == "false" >
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl">
|
<#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl">
|
||||||
}
|
|
||||||
<#else>
|
<#else>
|
||||||
<#-- preparation order already confirmed -->
|
<#stop "preparation order already confirmed">
|
||||||
<#stop>
|
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
<#else>
|
<#else>
|
||||||
<#-- preparation order type not supported -->
|
<#stop "preparation order type not supported">
|
||||||
<#stop>
|
|
||||||
</#if>
|
</#if>
|
||||||
<#else>
|
<#else>
|
||||||
<#stop "PRO reference is empty">
|
<#stop "PRO reference is empty">
|
||||||
</#if>
|
</#if>
|
||||||
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
@@ -48,21 +46,17 @@
|
|||||||
<#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!="">
|
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrPro_ExecutionflowCancelled.ftl">
|
<#include "RFXtoRP_HsrPro_ExecutionflowCancelled.ftl">
|
||||||
}
|
}
|
||||||
<#else>
|
|
||||||
<#stop "PRO reference is empty">
|
|
||||||
</#if>
|
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop "event not supported">
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign planned_final_delivery_start_datetime = RfxDateTimetoUTC(preparation_order.planned_final_delivery_start_datetime,time_zone_offset_rfx) />
|
<#assign planned_final_delivery_start_datetime = RfxDateTimetoUTC(preparation_order.planned_final_delivery_start_datetime,time_zone_offset_rfx) />
|
||||||
@@ -27,7 +26,7 @@
|
|||||||
"CarrierService":"${preparation_order.transport_grade_code?trim?json_string}",
|
"CarrierService":"${preparation_order.transport_grade_code?trim?json_string}",
|
||||||
</#if> -->
|
</#if> -->
|
||||||
"ShipFrom": {
|
"ShipFrom": {
|
||||||
"ActorID": "${RFXtoRPprefixDepot(preparation_order.physical_depot_code?trim?json_string)}"
|
"ActorID": "${preparation_order.physical_depot_code?trim?json_string}"
|
||||||
},
|
},
|
||||||
"ShipFromAcked": true,
|
"ShipFromAcked": true,
|
||||||
"ShipTo": {
|
"ShipTo": {
|
||||||
@@ -49,32 +48,27 @@
|
|||||||
preparation_order.address.territorial_division_code == "" &&
|
preparation_order.address.territorial_division_code == "" &&
|
||||||
preparation_order.address.postal_code == "" &&
|
preparation_order.address.postal_code == "" &&
|
||||||
preparation_order.address.iso_country_code == "">
|
preparation_order.address.iso_country_code == "">
|
||||||
"ActorID": "${RFXtoRPprefixConsignee(preparation_order.end_consignee_code?json_string)}"
|
"ActorID": "${preparation_order.end_consignee_code}"
|
||||||
<#else>
|
<#else>
|
||||||
"Actor":
|
"Actor":
|
||||||
{
|
{
|
||||||
"Name" : "${(preparation_order.address.name_or_company_name!"")?json_string}",
|
"Name" : "${preparation_order.address.name_or_company_name?json_string!""}",
|
||||||
"Address" :
|
"Address" :
|
||||||
{
|
{
|
||||||
"City" : "${(preparation_order.address.post_code_area_name!"")?json_string}",
|
"City" : "${preparation_order.address.post_code_area_name?json_string!""}",
|
||||||
<#assign isCountryCode = JsonUtil.isCountryCode(preparation_order.address.iso_country_code?upper_case) />
|
"CountryCode" : "${preparation_order.address.iso_country_code!""}",
|
||||||
<#if isCountryCode>
|
"PostalCode" : "${preparation_order.address.postal_code!""}",
|
||||||
"CountryCode" : "${(preparation_order.address.iso_country_code!"")?json_string}",
|
"StreetAddressOne" : "${preparation_order.address.street_and_number_and_po_box?json_string!""}",
|
||||||
<#else>
|
"StreetAddressTwo" : "${preparation_order.address.additional_address_data_1?json_string!""}",
|
||||||
"CountryCode" : "",
|
"StreetAddressThree" : "${preparation_order.address.additional_address_data_2?json_string!""}"
|
||||||
</#if>
|
|
||||||
"PostalCode" : "${(preparation_order.address.postal_code!"")?json_string}",
|
|
||||||
"StreetAddressOne" : "${(preparation_order.address.street_and_number_and_po_box!"")?json_string}",
|
|
||||||
"StreetAddressTwo" : "${(preparation_order.address.additional_address_data_1!"")?json_string}",
|
|
||||||
"StreetAddressThree" : "${(preparation_order.address.additional_address_data_2!"")?json_string}"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Contact" :
|
"Contact" :
|
||||||
{
|
{
|
||||||
"FirstName" : "${(preparation_order.address.first_name!"")?json_string}",
|
"FirstName" : "${preparation_order.address.first_name?json_string!""}",
|
||||||
"LastName" : "${(preparation_order.address.last_name!"")?json_string}",
|
"LastName" : "${preparation_order.address.last_name?json_string!""}",
|
||||||
"Emails" : ${splitEmailsIntoArray((preparation_order.address.mail_address!"")?json_string)},
|
"Emails" : ${splitEmailsIntoArray(preparation_order.address.mail_address!""?json_string)},
|
||||||
"Phones" : ["${(preparation_order.address.mobile_phone_number!"")?json_string}","${(preparation_order.address.land_line_phone_number!"")?json_string}", "${(preparation_order.address.fax_number!"")?json_string}" ]
|
"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>
|
||||||
},
|
},
|
||||||
@@ -90,6 +84,7 @@
|
|||||||
</#if>
|
</#if>
|
||||||
<#-- Line Metadata inclusion -->
|
<#-- Line Metadata inclusion -->
|
||||||
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_LineMetadata.ftl">,
|
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_LineMetadata.ftl">,
|
||||||
|
|
||||||
"RequestedContent":
|
"RequestedContent":
|
||||||
{
|
{
|
||||||
"Goods":
|
"Goods":
|
||||||
@@ -100,8 +95,10 @@
|
|||||||
<#assign forced_priority_date = preparation_order_line.optional_attributes.forced_priority_date?datetime(rfx_date_format_default)?iso_utc />
|
<#assign forced_priority_date = preparation_order_line.optional_attributes.forced_priority_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
"PriorityDate": "${forced_priority_date}",
|
"PriorityDate": "${forced_priority_date}",
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
<#-- Segmentation Keys inclusion -->
|
<#-- Segmentation Keys inclusion -->
|
||||||
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_SegmentationKeys.ftl">
|
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_SegmentationKeys.ftl">
|
||||||
|
|
||||||
},
|
},
|
||||||
"Quantity" :
|
"Quantity" :
|
||||||
{
|
{
|
||||||
@@ -113,6 +110,7 @@
|
|||||||
</#list>
|
</#list>
|
||||||
],
|
],
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
"RequestedMilestones" :
|
"RequestedMilestones" :
|
||||||
{
|
{
|
||||||
"RequestedDeliveryDateTime" :
|
"RequestedDeliveryDateTime" :
|
||||||
|
|||||||
@@ -45,7 +45,6 @@
|
|||||||
<#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_reference?? && receipt.receipt_reference!="">
|
|
||||||
<#if receipt.receipt_confirmed == "true" >
|
<#if receipt.receipt_confirmed == "true" >
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted>
|
||||||
@@ -68,12 +67,10 @@
|
|||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
|
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
|
||||||
|
|
||||||
}
|
}
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
<#else>
|
|
||||||
<#stop "Receipt reference is empty">
|
|
||||||
</#if>
|
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
@@ -82,22 +79,19 @@
|
|||||||
<#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_reference?? && receipt.receipt_reference!="">
|
|
||||||
{
|
{
|
||||||
|
|
||||||
<#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>
|
|
||||||
<#stop "Receipt reference is empty">
|
|
||||||
</#if>
|
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop "event not supported">
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign receipt_datetime = RfxDateTimetoUTC(receipt.receipt_datetime,time_zone_offset_rfx) />
|
<#assign receipt_datetime = RfxDateTimetoUTC(receipt.receipt_datetime,time_zone_offset_rfx) />
|
||||||
@@ -26,21 +25,19 @@
|
|||||||
|
|
||||||
"ShipFrom":
|
"ShipFrom":
|
||||||
{
|
{
|
||||||
"ActorID": "${RFXtoRPprefixSupplier(receipt.original_code?trim?json_string)}"
|
"ActorID": "${receipt.original_code?trim?json_string}"
|
||||||
},
|
},
|
||||||
"ShipTo" :
|
"ShipTo" :
|
||||||
{
|
{
|
||||||
"ActorID": "${RFXtoRPprefixDepot(receipt.physical_depot_code?trim?json_string)}"
|
"ActorID": "${receipt.physical_depot_code?trim?json_string}"
|
||||||
},
|
},
|
||||||
"ShipToAcked": true,
|
"ShipToAcked": true,
|
||||||
|
|
||||||
<#if receipt.carrier_informations.carrier_code != "">
|
<#if receipt.carrier_informations.carrier_code != "">
|
||||||
"Carrier":
|
"Carrier" : {"ActorID": "${receipt.carrier_informations.carrier_code?trim?json_string}"},
|
||||||
{
|
|
||||||
"ActorID":"${RFXtoRPprefixCarrier(receipt.carrier_informations.carrier_code?trim?json_string)}"
|
|
||||||
},
|
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
|
|
||||||
<#if receipt.line_list??>
|
<#if receipt.line_list??>
|
||||||
"Lines" : [
|
"Lines" : [
|
||||||
<#list receipt.line_list as line>
|
<#list receipt.line_list as line>
|
||||||
@@ -54,16 +51,13 @@
|
|||||||
{
|
{
|
||||||
"ItemID": "${line.item_code?trim?json_string!"0"}",
|
"ItemID": "${line.item_code?trim?json_string!"0"}",
|
||||||
"LVBranchID": "${line.item_lv_code?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)>
|
<#if line.line_without_detail??>
|
||||||
|
<#if (line.line_without_detail.priority_date?length != 0) && (line.line_without_detail.priority_date?starts_with("00") == false)>
|
||||||
<#assign line_without_detail_priority_date = line.line_without_detail.priority_date?datetime(rfx_date_format_default)?iso_utc />
|
<#assign line_without_detail_priority_date = line.line_without_detail.priority_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
"PriorityDate": "${line_without_detail_priority_date}",
|
"PriorityDate": "${line_without_detail_priority_date}",
|
||||||
<#else>
|
|
||||||
<#if (line.line_detail?? && line.line_detail?size == 1 && line.line_detail[0].priority_date?length != 0) && (line.line_detail[0].priority_date?starts_with("00") == false)>
|
|
||||||
<#assign line_detail_priority_date = line.line_detail[0].priority_date?datetime(rfx_date_format_default)?iso_utc />
|
|
||||||
"PriorityDate": "${line_detail_priority_date}",
|
|
||||||
<#else>
|
|
||||||
"PriorityDate": "1970-01-01T00:00:00Z",
|
|
||||||
</#if>
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#stop >
|
||||||
</#if>
|
</#if>
|
||||||
<#-- Segmentation Keys inclusion -->
|
<#-- Segmentation Keys inclusion -->
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl">
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl">
|
||||||
|
|||||||
@@ -22,21 +22,22 @@
|
|||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
},
|
},
|
||||||
"TechMessage": {
|
"TechMessage": {
|
||||||
"Code": "${restResponsetMsg.status!"no Code"}",
|
"Code": "${restResponsetMsg.status}",
|
||||||
"Label": ${strJsonBody}
|
"Label": ${strJsonBody}
|
||||||
},
|
},
|
||||||
"UserMessage": {
|
"UserMessage": {
|
||||||
"Code": "${restResponsetMsg.status!"no Code"}",
|
"Code": "${restResponsetMsg.status}",
|
||||||
"Label": ${strJsonBody},
|
"Label": ${strJsonBody},
|
||||||
"Params": []
|
"Params": []
|
||||||
},
|
},
|
||||||
"DetailElements": [],
|
"DetailElements": [],
|
||||||
"CorrelationID": "${id.correlationid!"no Correlationid"}",
|
"CorrelationID": "${id.correlationid}",
|
||||||
"ContextPayload": ${strJsonBody},
|
"ContextPayload": "rfxresponse",
|
||||||
"Type": "RP_EXECUTIONFLOW_EVENT",
|
"Type": "RP_EXECUTIONFLOW_EVENT",
|
||||||
"Task": "${id.apiRestReflexID!"no Task"}",
|
"Task": "${id.apiRestReflexID}",
|
||||||
"OriginalID": "${id.refid!"no OriginalID"?trim?json_string}",
|
"OriginalID": "${id.refid?trim?json_string}",
|
||||||
"StackTrace": ""
|
"StackTrace": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${id.refid?json_string}"
|
"RefID": "${id.refid}"
|
||||||
},
|
},
|
||||||
|
|
||||||
"Payload": {
|
"Payload": {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${id.refid?json_string}"
|
"RefID": "${id.refid}"
|
||||||
},
|
},
|
||||||
|
|
||||||
"Payload": {
|
"Payload": {
|
||||||
|
|||||||
@@ -4,57 +4,16 @@
|
|||||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
|
|
||||||
<#assign restResponsetMsg = JsonUtil.jsonToMap(input)>
|
<#assign restResponsetMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign id = JsonUtil.jsonToMap(restResponsetMsg.id!"{}")>
|
<#assign id = JsonUtil.jsonToMap(restResponsetMsg.id)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
<#assign organisationRP = organisation>
|
<#assign organisationRP = organisation>
|
||||||
|
|
||||||
|
|
||||||
<#assign aDateTime = .now>
|
<#assign aDateTime = .now>
|
||||||
<#assign no_apiRestReflexID = "no apiRestReflexID">
|
|
||||||
<#assign no_status = -99999>
|
|
||||||
|
|
||||||
|
|
||||||
<#switch id.apiRestReflexID!no_apiRestReflexID>
|
|
||||||
<#case no_apiRestReflexID>
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#if restResponsetMsg.body?? >
|
|
||||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
|
||||||
<#else>
|
|
||||||
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
|
|
||||||
</#if>
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
|
<#switch id.apiRestReflexID>
|
||||||
<#case "preparation_orders_post">
|
<#case "preparation_orders_post">
|
||||||
<#switch restResponsetMsg.status!no_status>
|
<#switch restResponsetMsg.status>
|
||||||
<#case no_status>
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#if restResponsetMsg.body?? >
|
|
||||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
|
||||||
<#else>
|
|
||||||
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
|
|
||||||
</#if>
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
|
||||||
},
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
<#case 200>
|
<#case 200>
|
||||||
<#case 201>
|
<#case 201>
|
||||||
<#-- *********************************************** ApiRestID = preparation_orders_post ******************** -->
|
<#-- *********************************************** ApiRestID = preparation_orders_post ******************** -->
|
||||||
@@ -69,16 +28,6 @@
|
|||||||
<#include "RFXtoRP_PrepOrder_ShipFromAcked.ftl">
|
<#include "RFXtoRP_PrepOrder_ShipFromAcked.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#else>
|
|
||||||
<#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "WARN">
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipFromAcked>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_PrepOrder_ShipFromAcked.ftl">
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#else>
|
<#else>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@@ -96,7 +45,6 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
|
||||||
<#break>
|
<#break>
|
||||||
<#default>
|
<#default>
|
||||||
[
|
[
|
||||||
@@ -104,7 +52,7 @@
|
|||||||
<#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 = "{}" />
|
||||||
</#if>
|
</#if>
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
@@ -122,29 +70,7 @@
|
|||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#case "receipts_post">
|
<#case "receipts_post">
|
||||||
<#switch restResponsetMsg.status!no_status>
|
<#switch restResponsetMsg.status>
|
||||||
<#case no_status>
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#if restResponsetMsg.body?? >
|
|
||||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
|
||||||
<#else>
|
|
||||||
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
|
|
||||||
</#if>
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
|
||||||
},
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
<#case 200>
|
<#case 200>
|
||||||
<#case 201>
|
<#case 201>
|
||||||
<#-- *********************************************** ApiRestID = receipts_post ******************** -->
|
<#-- *********************************************** ApiRestID = receipts_post ******************** -->
|
||||||
@@ -184,7 +110,7 @@
|
|||||||
<#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 = "{}" />
|
||||||
</#if>
|
</#if>
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
@@ -200,6 +126,7 @@
|
|||||||
]
|
]
|
||||||
</#switch>
|
</#switch>
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop>
|
<#stop>
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${id.refid!"no RefID"?trim?json_string}",
|
"RefID": "${id.refid?trim?json_string}",
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${aDateTime?iso_utc}",
|
"DateTime": "${aDateTime?iso_utc}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
|||||||
@@ -33,11 +33,4 @@
|
|||||||
<#noparse><#assign text_language_rfx = </#noparse>"${reflex_platform_project.text_language!"en"}<#noparse>"></#noparse>
|
<#noparse><#assign text_language_rfx = </#noparse>"${reflex_platform_project.text_language!"en"}<#noparse>"></#noparse>
|
||||||
</#list>
|
</#list>
|
||||||
|
|
||||||
<#list file.reflex_platform_project_list?filter(j -> j.name == projectRP) as reflex_platform_project_uniqueness>
|
|
||||||
<#if reflex_platform_project_uniqueness.site_code_unicity??>
|
|
||||||
<#noparse><#assign uniqueness = </#noparse>${reflex_platform_project_uniqueness.site_code_unicity?c}<#noparse>></#noparse>
|
|
||||||
<#else>
|
|
||||||
<#noparse><#assign uniqueness = </#noparse>false<#noparse>></#noparse>
|
|
||||||
</#if>
|
|
||||||
</#list>
|
|
||||||
|
|
||||||
@@ -2,8 +2,6 @@
|
|||||||
<#-- input : message RFX -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in ReflexPlatform -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ReflexUtils.ftl">
|
|
||||||
|
|
||||||
<#assign eventRP = JsonUtil.jsonToMap(input)>
|
<#assign eventRP = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
@@ -46,6 +44,6 @@
|
|||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop "Event not processed">
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -1,39 +1,26 @@
|
|||||||
<#include "RPtoRFX_PrepOrder_DefaultHeaderData.ftl">
|
<#include "RPtoRFX_PrepOrder_DefaultHeaderData.ftl">
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
<#include "HfRpConfig.ftl">
|
<#assign aDateTime = .now>
|
||||||
<#-- Valeurs par défaut Adresse -->
|
|
||||||
<#-- Default values -->
|
|
||||||
<#assign typecode ="010">
|
|
||||||
<#assign titlecode ="1">
|
|
||||||
<#assign contacttypecode ="010">
|
|
||||||
<#assign adresstypecode ="010">
|
|
||||||
<#-- Si vous utilisez des acteurs non référencés, il faudra créer un destinataire "VIZ" dans Reflex WMS pour utiliser cette fonctionnalité -->
|
|
||||||
<#-- If you are using unreferenced actors, you will need to create a "VIZ" consignee in Reflex WMS to use this feature -->
|
|
||||||
<#assign defaultactor ="VIZ">
|
|
||||||
<#if executionflow.ShipTo.ActorID?? && executionflow.ShipTo.ActorID!="">
|
|
||||||
<#assign actorID = "${RPtoRFXprefixConsignee(executionflow.ShipTo.ActorID)}" >
|
|
||||||
<#else>
|
|
||||||
<#assign actorID = defaultactor >
|
|
||||||
</#if>
|
|
||||||
|
|
||||||
{
|
{
|
||||||
"id" : {"refid" : "${executionflow.OrderID?json_string}"},
|
"id" : {"refid" : "${executionflow.OrderID}"},
|
||||||
"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": {
|
||||||
"activity_code": "${activity_code}",
|
"activity_code": "${activity_code}",
|
||||||
"physical_depot_code": "${RPtoRFXprefixDepot(executionflow.ShipFrom.ActorID)}",
|
"physical_depot_code": "${executionflow.ShipFrom.ActorID}",
|
||||||
"originator_code": "${originator_code}"
|
"originator_code": "${originator_code}"
|
||||||
},
|
},
|
||||||
"payload" :
|
"payload" :
|
||||||
{
|
{
|
||||||
"originator_reference": "${executionflow.OrderID?json_string}",
|
"originator_reference": "${executionflow.OrderID}",
|
||||||
"preparation_type_code": "${preparation_type_code}",
|
"preparation_type_code": "${preparation_type_code}",
|
||||||
"end_consignee_code": "${actorID}",
|
"end_consignee_code": "${executionflow.ShipTo.ActorID!""}",
|
||||||
<#if executionflow.RequestedMilestones?? && executionflow.RequestedMilestones.RequestedDeliveryDateTime??>
|
<#if executionflow.RequestedMilestones?? && executionflow.RequestedMilestones.RequestedDeliveryDateTime??>
|
||||||
"requested_delivery_start_datetime": "${DateTimeUTCtoRfxLocale(executionflow.RequestedMilestones.RequestedDeliveryDateTime.DateTime,time_zone_rfx)}",
|
"requested_delivery_start_datetime": "${executionflow.RequestedMilestones.RequestedDeliveryDateTime.DateTime}",
|
||||||
<#else>
|
<#else>
|
||||||
"requested_delivery_start_datetime": "${DateTimeUTCtoRfxLocale(.now?iso_utc?string,time_zone_rfx)}",
|
"requested_delivery_start_datetime": "${aDateTime?iso_utc}",
|
||||||
</#if>
|
</#if>
|
||||||
"requested_delivery_date_type": "${requested_delivery_date_type}",
|
"requested_delivery_date_type": "${requested_delivery_date_type}",
|
||||||
"consolidated_delivery": "${consolidated_delivery_flag}",
|
"consolidated_delivery": "${consolidated_delivery_flag}",
|
||||||
@@ -46,37 +33,21 @@
|
|||||||
"apt_with_end_consignee": "${apt_with_end_consignee_flag}",
|
"apt_with_end_consignee": "${apt_with_end_consignee_flag}",
|
||||||
"apt_with_intermediate": "false",
|
"apt_with_intermediate": "false",
|
||||||
"load_grouping": "${load_grouping}"
|
"load_grouping": "${load_grouping}"
|
||||||
}
|
},
|
||||||
<#if actorID == defaultactor >
|
<#if executionflow.ShipTo.ActorID == "">
|
||||||
,
|
|
||||||
"address": {
|
"address": {
|
||||||
"type_code": "${typecode}",
|
"first_name": "${executionflow.ShipTo.Contact.FirstName!""?json_string}",
|
||||||
"title_code" : "${titlecode}",
|
"last_name" :"${executionflow.ShipTo.Contact.Lastname!""?json_string}",
|
||||||
"contact_type_code" : "${contacttypecode}",
|
"mail_address": "${executionflow.ShipTo.Actor.Emails[0]!""}",
|
||||||
"address_type_code" : "${adresstypecode}",
|
"mobile_phone_number": "${executionflow.ShipTo.Actor.Phones[0]!""}",
|
||||||
"first_name": "${(executionflow.ShipTo.Contact.FirstName!"")?json_string}",
|
"street_and_number_and_po_box": "${executionflow.ShipTo.Actor.Address.StreetAddressOne!""?json_string}",
|
||||||
"last_name" :"${(executionflow.ShipTo.Contact.LastName!"")?json_string}",
|
"additional_address_data_1": "${executionflow.ShipTo.Actor.Address.StreetAddressTwo!""?json_string}",
|
||||||
<#if executionflow.ShipTo.Actor.Address.Name?? && executionflow.ShipTo.Actor.Address.Name!="">
|
"additional_address_data_2": "${executionflow.ShipTo.Actor.Address.StreetAddressThree!""?json_string}",
|
||||||
"name_or_company_name" : "${(executionflow.ShipTo.Actor.Address.Name!"")?json_string}",
|
"postal_code": "${executionflow.ShipTo.Actor.Address.PostalCode!""}",
|
||||||
<#else>
|
"iso_country_code": "${executionflow.ShipTo.Actor.Address.CountryCode!""}"
|
||||||
"name_or_company_name" : "${(executionflow.ShipTo.Contact.FirstName!"")?json_string} ${(executionflow.ShipTo.Contact.LastName!"")?json_string}",
|
},
|
||||||
</#if>
|
|
||||||
<#if executionflow.ShipTo.Contact.Emails?? && executionflow.ShipTo.Contact.Emails[0]!="">
|
|
||||||
"mail_address": "${executionflow.ShipTo.Contact.Emails[0]?json_string}",
|
|
||||||
</#if>
|
|
||||||
<#if executionflow.ShipTo.Contact.Phones?? && executionflow.ShipTo.Contact.Phones[0]!="">
|
|
||||||
"mobile_phone_number": "${executionflow.ShipTo.Contact.Phones[0]?json_string}",
|
|
||||||
</#if>
|
|
||||||
"street_and_number_and_po_box": "${(executionflow.ShipTo.Actor.Address.StreetAddressOne!"")?json_string}",
|
|
||||||
"additional_address_data_1": "${(executionflow.ShipTo.Actor.Address.StreetAddressTwo!"")?json_string}",
|
|
||||||
"additional_address_data_2": "${(executionflow.ShipTo.Actor.Address.StreetAddressThree!"")?json_string}",
|
|
||||||
"postal_code": "${(executionflow.ShipTo.Actor.Address.PostalCode!"")?json_string}",
|
|
||||||
"post_code_area_name" : "${(executionflow.ShipTo.Actor.Address.City!"")?json_string}",
|
|
||||||
"iso_country_code": "${(executionflow.ShipTo.Actor.Address.CountryCode!"")?json_string}"
|
|
||||||
}
|
|
||||||
</#if>
|
</#if>
|
||||||
<#if executionflow.Lines??>
|
<#if executionflow.Lines??>
|
||||||
,
|
|
||||||
"line_list": [
|
"line_list": [
|
||||||
<#list executionflow.Lines as line>
|
<#list executionflow.Lines as line>
|
||||||
<#-- ******* line MetaData and Segmentationkeys to maps ******** -->
|
<#-- ******* line MetaData and Segmentationkeys to maps ******** -->
|
||||||
@@ -95,7 +66,7 @@
|
|||||||
"owner_code_to_prepare" :"${owner_code_to_prepare}",
|
"owner_code_to_prepare" :"${owner_code_to_prepare}",
|
||||||
"grade_code_to_prepare" :"${grade_code_to_prepare}",
|
"grade_code_to_prepare" :"${grade_code_to_prepare}",
|
||||||
"input_order_data": "false",
|
"input_order_data": "false",
|
||||||
"batch_1": "${batch_1?json_string}",
|
"batch_1": "${batch_1}",
|
||||||
"base_lv_quantity": "true",
|
"base_lv_quantity": "true",
|
||||||
"any_lv": "false"
|
"any_lv": "false"
|
||||||
<#--
|
<#--
|
||||||
@@ -105,11 +76,10 @@
|
|||||||
"substitution_possible": "false"
|
"substitution_possible": "false"
|
||||||
-->
|
-->
|
||||||
|
|
||||||
}
|
}<#sep>,</#sep>
|
||||||
<#sep>,</#sep>
|
|
||||||
</#list>
|
</#list>
|
||||||
]
|
|
||||||
</#if>
|
</#if>
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -23,22 +23,8 @@
|
|||||||
<#assign protected_flag ="false"/>
|
<#assign protected_flag ="false"/>
|
||||||
<#assign automatic_generation_flag ="false"/>
|
<#assign automatic_generation_flag ="false"/>
|
||||||
<#assign apt_with_end_consignee_flag="false"/>
|
<#assign apt_with_end_consignee_flag="false"/>
|
||||||
|
<#assign load_grouping = "DEFAUT"/>
|
||||||
<#-- A supprimer si utilisation de la table de correspondance-->
|
|
||||||
<#--To be deleted if using the correspondence table-->
|
|
||||||
<#assign load_grouping = "default">
|
|
||||||
|
|
||||||
|
|
||||||
<#-- Table de correspondance Transporteur/Code regroupement chargement,
|
|
||||||
affectation à un chargement si paramétrage regroupement chargement+plan de base distribution-->
|
|
||||||
<#--Carrier / Load Grouping Code Correspondence Table,
|
|
||||||
Assigning to a load if you set up Load Grouping+Distribution Master Plan-->
|
|
||||||
<#-- Example -->
|
|
||||||
<#--<#if executionflow.Carrier.ActorID == "TEST" >
|
|
||||||
<#assign load_grouping = "TEST">
|
|
||||||
<#else>
|
|
||||||
<#assign load_grouping = "default">
|
|
||||||
</#if>-->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,36 +1,33 @@
|
|||||||
<#include "RPtoRFX_Receipt_DefaultHeaderData.ftl">
|
<#include "RPtoRFX_Receipt_DefaultHeaderData.ftl">
|
||||||
<#include "ActorPrefix.ftl">
|
<#assign aDateTime = .now>
|
||||||
<#include "HfRpConfig.ftl">
|
|
||||||
|
|
||||||
{
|
{
|
||||||
"id" : {"refid" : "${executionflow.OrderID?json_string}"},
|
"id" : {"refid" : "${executionflow.OrderID}"},
|
||||||
"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": {
|
||||||
"activity_code": "${activity_code}",
|
"activity_code": "${activity_code}",
|
||||||
"physical_depot_code": "${RPtoRFXprefixDepot(executionflow.ShipTo.ActorID!"")}",
|
"physical_depot_code": "${executionflow.ShipTo.ActorID!""}",
|
||||||
"originator_code": "${originator_code}"
|
"originator_code": "${originator_code}"
|
||||||
},
|
},
|
||||||
"payload" :
|
"payload" :
|
||||||
{
|
{
|
||||||
"receipt_reference": "${executionflow.OrderID?json_string}",
|
"receipt_reference": "${executionflow.OrderID}",
|
||||||
"receipt_type": "${receipt_type}",
|
"receipt_type": "${receipt_type}",
|
||||||
"receipt_reason_code": "${receipt_reason_code}",
|
"receipt_reason_code": "${receipt_reason_code}",
|
||||||
"work_mode_code" : "${work_mode_code}",
|
"work_mode_code" : "${work_mode_code}",
|
||||||
"original_code" : "${RPtoRFXprefixSupplier(executionflow.ShipFrom.ActorID)}",
|
"original_code" : "${executionflow.ShipFrom.ActorID}",
|
||||||
"carrier_code" : "${RPtoRFXprefixCarrier(executionflow.Carrier.ActorID!"")}",
|
"carrier_code" : "${executionflow.Carrier.ActorID!""}",
|
||||||
|
|
||||||
<#if executionflow.RequestedMilestones?? && executionflow.RequestedMilestones.RequestedDeliveryDateTime??>
|
<#if executionflow.RequestedMilestones?? && executionflow.RequestedMilestones.RequestedDeliveryDateTime??>
|
||||||
"receipt_datetime": "${DateTimeUTCtoRfxLocale(executionflow.RequestedMilestones.RequestedDeliveryDateTime.DateTime,time_zone_rfx)}",
|
"receipt_datetime": "${executionflow.RequestedMilestones.RequestedDeliveryDateTime.DateTime}",
|
||||||
<#else>
|
<#else>
|
||||||
"receipt_datetime": "${DateTimeUTCtoRfxLocale(.now?iso_utc?string,time_zone_rfx)}",
|
"receipt_datetime": "${aDateTime?iso_utc}",
|
||||||
</#if>
|
</#if>
|
||||||
"carrier_appointment_made": "false",
|
"carrier_appointment_made": "false",
|
||||||
"receipt_in_cross_docking": "false",
|
"receipt_in_cross_docking": "false",
|
||||||
"dock_occupation_duration": 1
|
"dock_occupation_duration": 1,
|
||||||
|
|
||||||
<#if executionflow.Lines??>
|
<#if executionflow.Lines??>
|
||||||
,
|
|
||||||
"line_list": [
|
"line_list": [
|
||||||
<#list executionflow.Lines as line>
|
<#list executionflow.Lines as line>
|
||||||
|
|
||||||
@@ -49,7 +46,7 @@
|
|||||||
"level_1_quantity": ${line.RequestedMetrics.QuantityInBaseLV.Value!0},
|
"level_1_quantity": ${line.RequestedMetrics.QuantityInBaseLV.Value!0},
|
||||||
"owner_code": "${owner_code}",
|
"owner_code": "${owner_code}",
|
||||||
"grade_code": "${grade_code}",
|
"grade_code": "${grade_code}",
|
||||||
"batch_1": "${batch_1?json_string!""}",
|
"batch_1": "${batch_1!""}",
|
||||||
"optional_attributes": {
|
"optional_attributes": {
|
||||||
<#--"held_for_check": "false",
|
<#--"held_for_check": "false",
|
||||||
"held _for_repacking": "false",
|
"held _for_repacking": "false",
|
||||||
@@ -65,5 +62,6 @@
|
|||||||
</#list>
|
</#list>
|
||||||
]
|
]
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,10 +5,6 @@
|
|||||||
<#return ((rfxdatetime + offset)?datetime.iso?iso_utc)>
|
<#return ((rfxdatetime + offset)?datetime.iso?iso_utc)>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
<#function DateTimeUTCtoRfxLocale dateutc locale >
|
|
||||||
<#return dateutc?datetime.iso?iso_nz(locale)>
|
|
||||||
</#function>
|
|
||||||
|
|
||||||
<#-- --------------------------------------------------------------------------------------- -->
|
<#-- --------------------------------------------------------------------------------------- -->
|
||||||
<#-- Split email reflex 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" -->
|
||||||
|
|||||||
15
Table.ftl
15
Table.ftl
@@ -1,15 +0,0 @@
|
|||||||
<#-- Table criticality -->
|
|
||||||
<#assign TableCriticality = {
|
|
||||||
"1": "CLAIM_CRITICALITY_LOW",
|
|
||||||
"2":"CLAIM_CRITICALITY_MEDIUM",
|
|
||||||
"3":"CLAIM_CRITICALITY_HIGH",
|
|
||||||
"4":"CLAIM_CRITICALITY_BLOCKING"
|
|
||||||
}>
|
|
||||||
|
|
||||||
<#-- Table Amount -->
|
|
||||||
<#assign TableAmount = {
|
|
||||||
"$": "USD",
|
|
||||||
"£":"GBP",
|
|
||||||
"DH":"MAD"
|
|
||||||
}>
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user