mise en forme
This commit is contained in:
parent
353f8a8ee2
commit
a7055b1a1e
@ -1,14 +1,14 @@
|
||||
|
||||
|
||||
|
||||
|
||||
<#-- Warning the file is generated, if you modify it manually, do not enable automatic update via the pipeline -->
|
||||
<#-- Date of last generation : Jul 10, 2023 2:39:59 PM -->
|
||||
|
||||
<#-- if LVID is egal to **quantity_in_base_lv** keyword then LVID is egal to base VL of the item -->
|
||||
<#assign quantity_in_base_lv_RP_Cst = "**quantity_in_base_lv**" >
|
||||
<#assign rfx_date_format_default = "yyyy-MM-dd" >
|
||||
|
||||
|
||||
<#assign quantity_in_base_lv_RP_Cst = "**quantity_in_base_lv**" >
|
||||
<#assign rfx_date_format_default = "yyyy-MM-dd" >
|
||||
|
||||
|
||||
<#assign length_unit_KV_rfx = {"MET":"MILLIMETER","CM":"CENTIMETER","MM":"METER","DM":"DECIMETER","KM":"KILOMETER","MIL":"MILE","YAR":"YARD","INC":"INCH","FT":"FOOT"}>
|
||||
<#assign weight_unit_KV_rfx = {"GR":"GRAMME","DG":"DECIGRAM","KG":"KILOGRAM","TON":"TONNE","OCE":"ONCE","LTO":"LONG_TON","STO":"SHORT_TON","PND":"POUND"}>
|
||||
<#assign area_unit_KV_rfx = {"MM²":"SQUARE_MILLIMETER","CM²":"SQUARE_CENTIMETER","DM²":"SQUARE_DECIMETER","M²":"SQUARE_METER","SQI":"SQUARE_INCH","SQF":"SQUARE_FOOT","SQY":"SQUARE_YARD"}>
|
||||
@ -16,20 +16,20 @@
|
||||
<#assign temperature_unit_KV_rfx = {"° C":"CELSIUS","° F":"FAHRENHEIT"}>
|
||||
|
||||
|
||||
<#assign length_unit_rfx = length_unit_KV_rfx["CM"]!"CENTIMETER">
|
||||
<#assign distance_unit_rfx = length_unit_KV_rfx["MET"]!"CENTIMETER">
|
||||
<#assign transport_distance_unit_rfx = length_unit_KV_rfx["KM"]!"CENTIMETER">
|
||||
<#assign weight_unit_rfx = weight_unit_KV_rfx["KG"]!"KILOGRAM">
|
||||
<#assign area_unit_rfx = area_unit_KV_rfx["M²"]!"SQUARE_METER">
|
||||
<#assign volume_unit_rfx = volume_unit_KV_rfx["DM³"]!"CUBIC_DECIMETER">
|
||||
<#assign number_of_litres_unit_rfx = volume_unit_KV_rfx["LIT"]!"CUBIC_DECIMETER">
|
||||
|
||||
<#assign length_unit_rfx = length_unit_KV_rfx["CM"]!"CENTIMETER">
|
||||
<#assign distance_unit_rfx = length_unit_KV_rfx["MET"]!"CENTIMETER">
|
||||
<#assign transport_distance_unit_rfx = length_unit_KV_rfx["KM"]!"CENTIMETER">
|
||||
<#assign weight_unit_rfx = weight_unit_KV_rfx["KG"]!"KILOGRAM">
|
||||
<#assign area_unit_rfx = area_unit_KV_rfx["M²"]!"SQUARE_METER">
|
||||
<#assign volume_unit_rfx = volume_unit_KV_rfx["DM³"]!"CUBIC_DECIMETER">
|
||||
<#assign number_of_litres_unit_rfx = volume_unit_KV_rfx["LIT"]!"CUBIC_DECIMETER">
|
||||
|
||||
|
||||
|
||||
<#assign time_zone_rfx = "Europe/Paris"!"UTC">
|
||||
<#assign time_zone_offset_rfx = "+02:00"!"+00:00">
|
||||
|
||||
<#assign text_language_rfx = "fr"!"en">
|
||||
|
||||
|
||||
<#assign time_zone_rfx = "Europe/Paris"!"UTC">
|
||||
<#assign time_zone_offset_rfx = "+02:00"!"+00:00">
|
||||
|
||||
<#assign text_language_rfx = "fr"!"en">
|
||||
|
||||
|
||||
|
||||
|
||||
@ -11,50 +11,50 @@
|
||||
<#assign organisationRP = organisation>
|
||||
|
||||
<#switch cloudEventMsg.action>
|
||||
<#case "C">
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign reflexStockPicturesInterface = JsonUtil.jsonToMap(dataRfx)>
|
||||
|
||||
<#-- idSnapshot MUST BE UNIQUE regardless of the number of messages in the stock image -->
|
||||
<#if cloudEventMsg.messageSet??>
|
||||
<#assign idSnapshot = cloudEventMsg.messageSet />
|
||||
<#else>
|
||||
<#assign idSnapshot = cloudEventMsg.id />
|
||||
</#if>
|
||||
|
||||
<#list reflexStockPicturesInterface.detailled_stock_list as stock>
|
||||
<#if stock.stock_type_code != "200">
|
||||
<#stop "stock type different from 200">
|
||||
<#break>
|
||||
</#if>
|
||||
</#list>
|
||||
[
|
||||
{
|
||||
<#if sum_elt??>
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorSnapshotCompleted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HfDtlStockLs_ActorSnapshotCompleted.ftl">
|
||||
<#else>
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.StockSnapshotted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HfDtlStockLs_StockSnapshotted.ftl">
|
||||
</#if>
|
||||
}
|
||||
]
|
||||
<#case "C">
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign reflexStockPicturesInterface = JsonUtil.jsonToMap(dataRfx)>
|
||||
|
||||
<#-- idSnapshot MUST BE UNIQUE regardless of the number of messages in the stock image -->
|
||||
<#if cloudEventMsg.messageSet??>
|
||||
<#assign idSnapshot = cloudEventMsg.messageSet />
|
||||
<#else>
|
||||
<#assign idSnapshot = cloudEventMsg.id />
|
||||
</#if>
|
||||
|
||||
<#list reflexStockPicturesInterface.detailled_stock_list as stock>
|
||||
<#if stock.stock_type_code != "200">
|
||||
<#stop "stock type different from 200">
|
||||
<#break>
|
||||
</#if>
|
||||
</#list>
|
||||
[
|
||||
{
|
||||
<#if sum_elt??>
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorSnapshotCompleted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HfDtlStockLs_ActorSnapshotCompleted.ftl">
|
||||
<#else>
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.StockSnapshotted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HfDtlStockLs_StockSnapshotted.ftl">
|
||||
</#if>
|
||||
}
|
||||
]
|
||||
|
||||
<#break>
|
||||
|
||||
<#break>
|
||||
|
||||
<#case "D">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#stop "event not supported">
|
||||
<#break>
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#stop "event not supported">
|
||||
<#break>
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
</#switch>
|
||||
|
||||
|
||||
@ -1,27 +1,27 @@
|
||||
<#include "ReflexUtils.ftl">
|
||||
[
|
||||
<#list reflexStockPicturesInterface.detailled_stock_list as stock>
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
<#list reflexStockPicturesInterface.detailled_stock_list as stock>
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${stock.physical_depot_code}"
|
||||
},
|
||||
"Payload": {
|
||||
<#assign generation_date = RfxDateTimetoUTC(stock.generation_date,time_zone_offset_rfx) />
|
||||
"Snapshot": {
|
||||
"EndDateTime": {
|
||||
"DateTime": "${generation_date}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
},
|
||||
"Payload": {
|
||||
<#assign generation_date = RfxDateTimetoUTC(stock.generation_date,time_zone_offset_rfx) />
|
||||
"Snapshot": {
|
||||
"EndDateTime": {
|
||||
"DateTime": "${generation_date}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
},
|
||||
"ID": "${stock.physical_depot_code}-${idSnapshot}",
|
||||
"MessageNb": ${sum_elt}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
<#break>
|
||||
</#list>
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
<#break>
|
||||
</#list>
|
||||
]
|
||||
|
||||
|
||||
@ -1,38 +1,38 @@
|
||||
<#include "ReflexUtils.ftl">
|
||||
[
|
||||
<#list reflexStockPicturesInterface.detailled_stock_list as stock>
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"Payload": {
|
||||
"ActorID": "${stock.physical_depot_code}",
|
||||
<#assign generation_date = RfxDateTimetoUTC(stock.generation_date,time_zone_offset_rfx) />
|
||||
"Snapshot": {
|
||||
"DateTime": {
|
||||
"DateTime": "${generation_date}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
},
|
||||
<#list reflexStockPicturesInterface.detailled_stock_list as stock>
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"Payload": {
|
||||
"ActorID": "${stock.physical_depot_code}",
|
||||
<#assign generation_date = RfxDateTimetoUTC(stock.generation_date,time_zone_offset_rfx) />
|
||||
"Snapshot": {
|
||||
"DateTime": {
|
||||
"DateTime": "${generation_date}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
},
|
||||
"ID": "${stock.physical_depot_code}-${idSnapshot}",
|
||||
"Quantity":
|
||||
{
|
||||
"Value" : "${stock.quantity_in_base_lvs!"0"}",
|
||||
"LVID": "${quantity_in_base_lv_RP_Cst}"
|
||||
}
|
||||
},
|
||||
|
||||
"Goods": {
|
||||
"ItemID": "${stock.item_code}",
|
||||
"LVBranchID": "${stock.item_logistical_variant_code}",
|
||||
<#assign priority_date = stock.priority_date?datetime(rfx_date_format_default)?iso_utc />
|
||||
"PriorityDate" : "${priority_date}",
|
||||
|
||||
<#-- Segmentation keys inclusion -->
|
||||
<#include "RFXtoRP_HfDtlStockLs_StockSnapshotted_SegmentationKeys.ftl">
|
||||
}
|
||||
|
||||
}
|
||||
}<#sep>,</#sep>
|
||||
</#list>
|
||||
},
|
||||
|
||||
"Goods": {
|
||||
"ItemID": "${stock.item_code}",
|
||||
"LVBranchID": "${stock.item_logistical_variant_code}",
|
||||
<#assign priority_date = stock.priority_date?datetime(rfx_date_format_default)?iso_utc />
|
||||
"PriorityDate" : "${priority_date}",
|
||||
|
||||
<#-- Segmentation keys inclusion -->
|
||||
<#include "RFXtoRP_HfDtlStockLs_StockSnapshotted_SegmentationKeys.ftl">
|
||||
}
|
||||
|
||||
}
|
||||
}<#sep>,</#sep>
|
||||
</#list>
|
||||
]
|
||||
|
||||
|
||||
@ -2,23 +2,23 @@
|
||||
<#-- use protobuf of class HfDtlStockLs to find Reflex WMS fields names -->
|
||||
|
||||
<#--"SegmentationKeys": [
|
||||
{
|
||||
"Key": "BatchNumber",
|
||||
<#if stock.batch_1 == "">
|
||||
"Value": { "String" : "no batch"}
|
||||
{
|
||||
"Key": "BatchNumber",
|
||||
<#if stock.batch_1 == "">
|
||||
"Value": { "String" : "no batch"}
|
||||
<#else>
|
||||
"Value": { "String" : "${stock.batch_1}"}
|
||||
</#if>
|
||||
},
|
||||
{
|
||||
"Key": "Grade",
|
||||
"Value": { "String" : "${SegmentationKeys_KV[stock.grade_code]!Default_Value_Grade_SegmentationKey}"}
|
||||
},
|
||||
{
|
||||
"Key": "Owner",
|
||||
"Value": { "String" : "${stock.owner_code}"}
|
||||
}
|
||||
],
|
||||
</#if>
|
||||
},
|
||||
{
|
||||
"Key": "Grade",
|
||||
"Value": { "String" : "${SegmentationKeys_KV[stock.grade_code]!Default_Value_Grade_SegmentationKey}"}
|
||||
},
|
||||
{
|
||||
"Key": "Owner",
|
||||
"Value": { "String" : "${stock.owner_code}"}
|
||||
}
|
||||
],
|
||||
|
||||
-->
|
||||
"SegmentationKeys": [ ]
|
||||
"SegmentationKeys": [ ]
|
||||
@ -11,23 +11,23 @@ those parameters are stored in FTL file HfRpConfig.ftl for later use in some of
|
||||
<#assign aDateTime = .now>
|
||||
|
||||
<#switch cloudEventMsg.action>
|
||||
<#case "C">
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign file = JsonUtil.jsonToMap(dataRfx)>
|
||||
<#case "C">
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign file = JsonUtil.jsonToMap(dataRfx)>
|
||||
|
||||
<#include "RFXtoRP_RfxConfigurationRp.ftl">
|
||||
|
||||
<#break>
|
||||
|
||||
<#include "RFXtoRP_RfxConfigurationRp.ftl">
|
||||
|
||||
<#break>
|
||||
|
||||
<#case "D">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#stop "deletion of config not supported">
|
||||
<#break>
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#stop "deletion of config not supported">
|
||||
<#break>
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
</#switch>
|
||||
|
||||
|
||||
@ -10,37 +10,37 @@
|
||||
<#assign aDateTime = .now>
|
||||
|
||||
<#switch cloudEventMsg.action>
|
||||
<#case "C">
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign carrier = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaCarrier_ActorCreated.ftl">
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
|
||||
<#case "C">
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign carrier = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaCarrier_ActorCreated.ftl">
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
|
||||
<#case "D">
|
||||
<#-- *********************************************** Action = DELETE ******************************* -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign carrier = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorDeleted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaCarrier_ActorDeleted.ftl">
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
<#-- *********************************************** Action = DELETE ******************************* -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign carrier = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorDeleted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaCarrier_ActorDeleted.ftl">
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
</#switch>
|
||||
|
||||
|
||||
@ -1,40 +1,40 @@
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${carrier.carrier_code}"
|
||||
},
|
||||
|
||||
"Payload": {
|
||||
"Name": "${carrier.carrier_designation}",
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${carrier.carrier_code}"
|
||||
},
|
||||
|
||||
"Payload": {
|
||||
"Name": "${carrier.carrier_designation}",
|
||||
"ManagedStock": false,
|
||||
"IsCarrier": true,
|
||||
<#-- ***Partner ID could be added here *** -->
|
||||
<#-- "PartnerID": "${}", -->
|
||||
|
||||
<#--
|
||||
<#include "RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl">,
|
||||
-->
|
||||
<#-- ***Partner ID could be added here *** -->
|
||||
<#-- "PartnerID": "${}", -->
|
||||
|
||||
<#--
|
||||
<#include "RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl">,
|
||||
-->
|
||||
|
||||
"Address":
|
||||
{
|
||||
"StreetAddressOne" : "${carrier.address.address_1}",
|
||||
"StreetAddressTwo" : "${carrier.address.address_2}",
|
||||
"Address":
|
||||
{
|
||||
"StreetAddressOne" : "${carrier.address.address_1}",
|
||||
"StreetAddressTwo" : "${carrier.address.address_2}",
|
||||
|
||||
<#if carrier.address.address_3?length < 10>
|
||||
<#if carrier.address.address_3?length < 10>
|
||||
"PostalCode" : "${carrier.address.address_3?trim}",
|
||||
<#else>
|
||||
"PostalCode" : "${carrier.address.address_3?substring(0,9)?trim}",
|
||||
</#if>
|
||||
<#if carrier.address.address_4?length < 14>
|
||||
</#if>
|
||||
<#if carrier.address.address_4?length < 14>
|
||||
"CountryCode" : ""
|
||||
<#else>
|
||||
"CountryCode" : "${carrier.address.address_4?substring(10,13)?trim}"
|
||||
</#if>
|
||||
},
|
||||
"Typology": "TYPOLOGY_CARRIER"
|
||||
}
|
||||
}
|
||||
</#if>
|
||||
},
|
||||
"Typology": "TYPOLOGY_CARRIER"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@ -2,4 +2,4 @@
|
||||
<#-- use protobuf of class HsaCarrier to find Reflex WMS fields names -->
|
||||
|
||||
|
||||
"MetaData": [ ]
|
||||
"MetaData": [ ]
|
||||
@ -1,12 +1,12 @@
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${carrier.carrier_code}"
|
||||
},
|
||||
|
||||
"Payload": {}
|
||||
}
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${carrier.carrier_code}"
|
||||
},
|
||||
|
||||
"Payload": {}
|
||||
}
|
||||
]
|
||||
|
||||
@ -10,37 +10,37 @@
|
||||
<#assign aDateTime = .now>
|
||||
|
||||
<#switch cloudEventMsg.action>
|
||||
<#case "C">
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaCons_ActorCreated.ftl">
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
|
||||
<#case "C">
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaCons_ActorCreated.ftl">
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
|
||||
<#case "D">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorDeleted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaCons_ActorDeleted.ftl">
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorDeleted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaCons_ActorDeleted.ftl">
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
</#switch>
|
||||
|
||||
|
||||
@ -1,43 +1,43 @@
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${actor.code}"
|
||||
},
|
||||
|
||||
"Payload": {
|
||||
"Name": "${actor.designation}",
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${actor.code}"
|
||||
},
|
||||
|
||||
"Payload": {
|
||||
"Name": "${actor.designation}",
|
||||
"ManagedStock": false,
|
||||
"IsCarrier": false,
|
||||
<#-- ***Partner ID could be added here *** -->
|
||||
<#-- "PartnerID": "${}", -->
|
||||
|
||||
<#--
|
||||
<#include "RFXtoRP_HsaCons_ActorCreated_Metadata.ftl">
|
||||
-->
|
||||
|
||||
|
||||
"Address":
|
||||
{
|
||||
<#if actor.address.address_3?length > 10>
|
||||
"City" : "${actor.address.address_3?substring(10)?trim}",
|
||||
</#if>
|
||||
"StreetAddressOne" : "${actor.address.address_1}",
|
||||
"StreetAddressTwo" : "${actor.address.address_2}",
|
||||
<#if actor.address.address_3?length < 10>
|
||||
"IsCarrier": false,
|
||||
<#-- ***Partner ID could be added here *** -->
|
||||
<#-- "PartnerID": "${}", -->
|
||||
|
||||
<#--
|
||||
<#include "RFXtoRP_HsaCons_ActorCreated_Metadata.ftl">
|
||||
-->
|
||||
|
||||
|
||||
"Address":
|
||||
{
|
||||
<#if actor.address.address_3?length > 10>
|
||||
"City" : "${actor.address.address_3?substring(10)?trim}",
|
||||
</#if>
|
||||
"StreetAddressOne" : "${actor.address.address_1}",
|
||||
"StreetAddressTwo" : "${actor.address.address_2}",
|
||||
<#if actor.address.address_3?length < 10>
|
||||
"PostalCode" : "${actor.address.address_3?trim}",
|
||||
<#else>
|
||||
"PostalCode" : "${actor.address.address_3?substring(0,9)?trim}",
|
||||
</#if>
|
||||
<#if actor.address.address_4?length < 14>
|
||||
"PostalCode" : "${actor.address.address_3?substring(0,9)?trim}",
|
||||
</#if>
|
||||
<#if actor.address.address_4?length < 14>
|
||||
"CountryCode" : ""
|
||||
<#else>
|
||||
"CountryCode" : "${actor.address.address_4?substring(10,13)?trim}"
|
||||
</#if>
|
||||
},
|
||||
"Typology": "TYPOLOGY_UNKNOWN"
|
||||
}
|
||||
}
|
||||
</#if>
|
||||
},
|
||||
"Typology": "TYPOLOGY_UNKNOWN"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@ -2,4 +2,4 @@
|
||||
<#-- use protobuf of class HsaCons to find Reflex WMS fields names -->
|
||||
|
||||
|
||||
"MetaData": [ ],
|
||||
"MetaData": [ ],
|
||||
@ -1,12 +1,12 @@
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${actor.code}"
|
||||
},
|
||||
|
||||
"Payload": {}
|
||||
}
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${actor.code}"
|
||||
},
|
||||
|
||||
"Payload": {}
|
||||
}
|
||||
]
|
||||
|
||||
@ -5,71 +5,71 @@
|
||||
<#assign aDateTime = .now>
|
||||
|
||||
<#switch cloudEventMsg.action>
|
||||
<#case "C">
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign reflexMvtStockInterface = JsonUtil.jsonToMap(dataRfx)>
|
||||
|
||||
<#-- exclusion of the cases of an IPG move with quantity = 0 (weight modification) -->
|
||||
<#if reflexMvtStockInterface.ipg_move_quantity_in_base_lvs != 0>
|
||||
|
||||
<#-- IPG moves translated into Stock moves -->
|
||||
<#if reflexMvtStockInterface.ipg_move_type == "130" ||
|
||||
reflexMvtStockInterface.ipg_move_type == "200" ||
|
||||
reflexMvtStockInterface.ipg_move_type == "210" ||
|
||||
reflexMvtStockInterface.ipg_move_type == "220" ||
|
||||
reflexMvtStockInterface.ipg_move_type == "230" ||
|
||||
reflexMvtStockInterface.ipg_move_type == "240" ||
|
||||
reflexMvtStockInterface.ipg_move_type == "260" ||
|
||||
reflexMvtStockInterface.ipg_move_type == "290" ||
|
||||
reflexMvtStockInterface.ipg_move_type == "300" ||
|
||||
reflexMvtStockInterface.ipg_move_type == "400" ||
|
||||
reflexMvtStockInterface.ipg_move_type == "410" ||
|
||||
reflexMvtStockInterface.ipg_move_type == "420"
|
||||
>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.StockMoved>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaIpgMove_StockMoved.ftl">
|
||||
|
||||
}
|
||||
]
|
||||
<#else>
|
||||
<#-- IPG moves translated into goods received (all type of receipt) -->
|
||||
<#if reflexMvtStockInterface.ipg_move_type == "100" ||
|
||||
reflexMvtStockInterface.ipg_move_type == "110" ||
|
||||
reflexMvtStockInterface.ipg_move_type == "120"
|
||||
>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.GoodsReceived>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaIpgMove_GoodsReceived.ftl">
|
||||
|
||||
}
|
||||
]
|
||||
<#else>
|
||||
<#-- Case of IPG move type volontarilly ignored-->
|
||||
<#stop "Move type not supported">
|
||||
</#if>
|
||||
</#if>
|
||||
<#else>
|
||||
<#-- cases of an IPG move with quantity = 0 (weight modification))-->
|
||||
<#stop "move ingored quantity = 0">
|
||||
</#if>
|
||||
<#break>
|
||||
|
||||
<#case "C">
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign reflexMvtStockInterface = JsonUtil.jsonToMap(dataRfx)>
|
||||
|
||||
<#-- exclusion of the cases of an IPG move with quantity = 0 (weight modification) -->
|
||||
<#if reflexMvtStockInterface.ipg_move_quantity_in_base_lvs != 0>
|
||||
|
||||
<#-- IPG moves translated into Stock moves -->
|
||||
<#if reflexMvtStockInterface.ipg_move_type == "130" ||
|
||||
reflexMvtStockInterface.ipg_move_type == "200" ||
|
||||
reflexMvtStockInterface.ipg_move_type == "210" ||
|
||||
reflexMvtStockInterface.ipg_move_type == "220" ||
|
||||
reflexMvtStockInterface.ipg_move_type == "230" ||
|
||||
reflexMvtStockInterface.ipg_move_type == "240" ||
|
||||
reflexMvtStockInterface.ipg_move_type == "260" ||
|
||||
reflexMvtStockInterface.ipg_move_type == "290" ||
|
||||
reflexMvtStockInterface.ipg_move_type == "300" ||
|
||||
reflexMvtStockInterface.ipg_move_type == "400" ||
|
||||
reflexMvtStockInterface.ipg_move_type == "410" ||
|
||||
reflexMvtStockInterface.ipg_move_type == "420"
|
||||
>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.StockMoved>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaIpgMove_StockMoved.ftl">
|
||||
|
||||
}
|
||||
]
|
||||
<#else>
|
||||
<#-- IPG moves translated into goods received (all type of receipt) -->
|
||||
<#if reflexMvtStockInterface.ipg_move_type == "100" ||
|
||||
reflexMvtStockInterface.ipg_move_type == "110" ||
|
||||
reflexMvtStockInterface.ipg_move_type == "120"
|
||||
>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.GoodsReceived>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaIpgMove_GoodsReceived.ftl">
|
||||
|
||||
}
|
||||
]
|
||||
<#else>
|
||||
<#-- Case of IPG move type volontarilly ignored-->
|
||||
<#stop "Move type not supported">
|
||||
</#if>
|
||||
</#if>
|
||||
<#else>
|
||||
<#-- cases of an IPG move with quantity = 0 (weight modification))-->
|
||||
<#stop "move ingored quantity = 0">
|
||||
</#if>
|
||||
<#break>
|
||||
|
||||
<#case "D">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#stop "event not supported - Case D ">
|
||||
<#break>
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#stop "event not supported - Case D ">
|
||||
<#break>
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
</#switch>
|
||||
|
||||
|
||||
@ -2,42 +2,42 @@
|
||||
<#include "ReflexUtils.ftl">
|
||||
[
|
||||
<#assign receipt_confirmation_datetime = RfxDateTimetoUTC(reflexMvtStockInterface.ipg_move_creation_datetime,time_zone_offset_rfx) />
|
||||
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${reflexMvtStockInterface.hd_number}"
|
||||
},
|
||||
|
||||
"Payload": {
|
||||
"ReceivedContents" :[
|
||||
{
|
||||
"DateTime": {
|
||||
"DateTime": "${receipt_confirmation_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
},
|
||||
"Goods": {
|
||||
"ItemID": "${reflexMvtStockInterface.item_code}",
|
||||
"LVBranchID": "${reflexMvtStockInterface.lv_code}",
|
||||
<#assign priority_date = "${Default_date}"?datetime(rfx_date_format_default)?iso_utc />
|
||||
"PriorityDate": "${priority_date}",
|
||||
|
||||
<#-- Goods received Segmentation Keys inclusion -->
|
||||
<#include "RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl">
|
||||
|
||||
},
|
||||
"ExecutionflowID": "R-${reflexMvtStockInterface.receipt_year_number}-${reflexMvtStockInterface.receipt_number}",
|
||||
"LineID": "${reflexMvtStockInterface.receipt_line_number}",
|
||||
"ActorID": "${reflexMvtStockInterface.physical_depot_code}",
|
||||
"Quantity": {
|
||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||
"Value": ${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${reflexMvtStockInterface.hd_number}"
|
||||
},
|
||||
|
||||
"Payload": {
|
||||
"ReceivedContents" :[
|
||||
{
|
||||
"DateTime": {
|
||||
"DateTime": "${receipt_confirmation_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
},
|
||||
"Goods": {
|
||||
"ItemID": "${reflexMvtStockInterface.item_code}",
|
||||
"LVBranchID": "${reflexMvtStockInterface.lv_code}",
|
||||
<#assign priority_date = "${Default_date}"?datetime(rfx_date_format_default)?iso_utc />
|
||||
"PriorityDate": "${priority_date}",
|
||||
|
||||
<#-- Goods received Segmentation Keys inclusion -->
|
||||
<#include "RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl">
|
||||
|
||||
},
|
||||
"ExecutionflowID": "R-${reflexMvtStockInterface.receipt_year_number}-${reflexMvtStockInterface.receipt_number}",
|
||||
"LineID": "${reflexMvtStockInterface.receipt_line_number}",
|
||||
"ActorID": "${reflexMvtStockInterface.physical_depot_code}",
|
||||
"Quantity": {
|
||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||
"Value": ${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
]
|
||||
|
||||
@ -1,24 +1,24 @@
|
||||
<#-- use protobuf of class HsaIpgMove to find Reflex WMS fields names -->
|
||||
|
||||
<#--"SegmentationKeys":
|
||||
[
|
||||
{
|
||||
"Key": "Grade",
|
||||
"Value": {"String": "${reflexMvtStockInterface.grade_code}"}
|
||||
},
|
||||
{
|
||||
"Key": "Owner",
|
||||
"Value": {"String": "${reflexMvtStockInterface.owner_code}"}
|
||||
},
|
||||
{
|
||||
"Key": "BatchNumber",
|
||||
<#if reflexMvtStockInterface.batch_1 == "">
|
||||
"Value": { "String" : "no batch"}
|
||||
[
|
||||
{
|
||||
"Key": "Grade",
|
||||
"Value": {"String": "${reflexMvtStockInterface.grade_code}"}
|
||||
},
|
||||
{
|
||||
"Key": "Owner",
|
||||
"Value": {"String": "${reflexMvtStockInterface.owner_code}"}
|
||||
},
|
||||
{
|
||||
"Key": "BatchNumber",
|
||||
<#if reflexMvtStockInterface.batch_1 == "">
|
||||
"Value": { "String" : "no batch"}
|
||||
<#else>
|
||||
"Value": { "String" : "${reflexMvtStockInterface.batch_1}"}
|
||||
</#if>
|
||||
}
|
||||
],
|
||||
</#if>
|
||||
}
|
||||
],
|
||||
|
||||
-->
|
||||
"SegmentationKeys": [ ]
|
||||
"SegmentationKeys": [ ]
|
||||
@ -2,62 +2,62 @@
|
||||
<#include "ReflexUtils.ftl">
|
||||
|
||||
<#assign MoveType_KV = {"130":"STOCK_MOVEMENT_TYPE_PRODUCTION",
|
||||
"200":"STOCK_MOVEMENT_TYPE_FIX",
|
||||
"210":"STOCK_MOVEMENT_TYPE_FIX",
|
||||
"220":"STOCK_MOVEMENT_TYPE_FIX",
|
||||
"230":"STOCK_MOVEMENT_TYPE_REQUALIFICATION",
|
||||
"240":"STOCK_MOVEMENT_TYPE_REQUALIFICATION",
|
||||
"260":"STOCK_MOVEMENT_TYPE_REQUALIFICATION",
|
||||
"290":"STOCK_MOVEMENT_TYPE_REQUALIFICATION",
|
||||
"300":"STOCK_MOVEMENT_TYPE_REQUALIFICATION",
|
||||
"400":"STOCK_MOVEMENT_TYPE_FIX",
|
||||
"410":"STOCK_MOVEMENT_TYPE_FIX",
|
||||
"420":"STOCK_MOVEMENT_TYPE_REQUALIFICATION"}>
|
||||
"200":"STOCK_MOVEMENT_TYPE_FIX",
|
||||
"210":"STOCK_MOVEMENT_TYPE_FIX",
|
||||
"220":"STOCK_MOVEMENT_TYPE_FIX",
|
||||
"230":"STOCK_MOVEMENT_TYPE_REQUALIFICATION",
|
||||
"240":"STOCK_MOVEMENT_TYPE_REQUALIFICATION",
|
||||
"260":"STOCK_MOVEMENT_TYPE_REQUALIFICATION",
|
||||
"290":"STOCK_MOVEMENT_TYPE_REQUALIFICATION",
|
||||
"300":"STOCK_MOVEMENT_TYPE_REQUALIFICATION",
|
||||
"400":"STOCK_MOVEMENT_TYPE_FIX",
|
||||
"410":"STOCK_MOVEMENT_TYPE_FIX",
|
||||
"420":"STOCK_MOVEMENT_TYPE_REQUALIFICATION"}>
|
||||
<#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": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"Payload": {
|
||||
"Goods": {
|
||||
"ItemID": "${reflexMvtStockInterface.item_code}",
|
||||
"PriorityDate": "${ipg_priority_datetime}",
|
||||
|
||||
<#-- Segmentation keys inclusions -->
|
||||
<#include "RFXtoRP_HsaIpgMove_StockMoved_SegmentationKeys.ftl">
|
||||
|
||||
|
||||
"LVBranchID": "${reflexMvtStockInterface.lv_code}"
|
||||
},
|
||||
"ActorID": "${reflexMvtStockInterface.physical_depot_code}",
|
||||
"Movement": {
|
||||
|
||||
"DateTime": {
|
||||
"DateTime": "${generation_date}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
},
|
||||
"Author": "ReflexWMS-${reflexMvtStockInterface.ipg_move_creation_user_code}",
|
||||
"ExternalMoveRef" : "${reflexMvtStockInterface.ipg_move_year_number} - ${reflexMvtStockInterface.ipg_move_number}",
|
||||
"Type": "${MoveType_KV[reflexMvtStockInterface.ipg_move_type]!reflexMvtStockInterface.ipg_move_type}",
|
||||
"Reason": "${reflexMvtStockInterface.miscellaneous_receipts_despatches_code}",
|
||||
"ExternalInfo" : "${reflexMvtStockInterface.stock_move_reference}",
|
||||
<#if reflexMvtStockInterface.ipg_move_operation_year_number!= 0>
|
||||
"OperationReference": "${reflexMvtStockInterface.ipg_move_operation_year_number} - ${reflexMvtStockInterface.ipg_move_operation_number}",
|
||||
</#if>
|
||||
|
||||
"Quantity":
|
||||
{
|
||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||
<#if reflexMvtStockInterface.move_sign == "+">
|
||||
"Value": ${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs}
|
||||
<#else>
|
||||
"Value": -${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs}
|
||||
</#if>
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"Payload": {
|
||||
"Goods": {
|
||||
"ItemID": "${reflexMvtStockInterface.item_code}",
|
||||
"PriorityDate": "${ipg_priority_datetime}",
|
||||
|
||||
<#-- Segmentation keys inclusions -->
|
||||
<#include "RFXtoRP_HsaIpgMove_StockMoved_SegmentationKeys.ftl">
|
||||
|
||||
|
||||
"LVBranchID": "${reflexMvtStockInterface.lv_code}"
|
||||
},
|
||||
"ActorID": "${reflexMvtStockInterface.physical_depot_code}",
|
||||
"Movement": {
|
||||
|
||||
"DateTime": {
|
||||
"DateTime": "${generation_date}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
},
|
||||
"Author": "ReflexWMS-${reflexMvtStockInterface.ipg_move_creation_user_code}",
|
||||
"ExternalMoveRef" : "${reflexMvtStockInterface.ipg_move_year_number} - ${reflexMvtStockInterface.ipg_move_number}",
|
||||
"Type": "${MoveType_KV[reflexMvtStockInterface.ipg_move_type]!reflexMvtStockInterface.ipg_move_type}",
|
||||
"Reason": "${reflexMvtStockInterface.miscellaneous_receipts_despatches_code}",
|
||||
"ExternalInfo" : "${reflexMvtStockInterface.stock_move_reference}",
|
||||
<#if reflexMvtStockInterface.ipg_move_operation_year_number!= 0>
|
||||
"OperationReference": "${reflexMvtStockInterface.ipg_move_operation_year_number} - ${reflexMvtStockInterface.ipg_move_operation_number}",
|
||||
</#if>
|
||||
|
||||
"Quantity":
|
||||
{
|
||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||
<#if reflexMvtStockInterface.move_sign == "+">
|
||||
"Value": ${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs}
|
||||
<#else>
|
||||
"Value": -${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs}
|
||||
</#if>
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@ -2,24 +2,24 @@
|
||||
<#-- use protobuf of class HsaIpgMove to find Reflex WMS fields names -->
|
||||
|
||||
<#--"SegmentationKeys":
|
||||
[
|
||||
{
|
||||
"Key": "Grade",
|
||||
"Value": {"String": "${reflexMvtStockInterface.grade_code}"}
|
||||
},
|
||||
{
|
||||
"Key": "Owner",
|
||||
"Value": {"String": "${reflexMvtStockInterface.owner_code}"}
|
||||
},
|
||||
{
|
||||
"Key": "BatchNumber",
|
||||
<#if reflexMvtStockInterface.batch_1 == "">
|
||||
"Value": { "String" : "no batch"}
|
||||
[
|
||||
{
|
||||
"Key": "Grade",
|
||||
"Value": {"String": "${reflexMvtStockInterface.grade_code}"}
|
||||
},
|
||||
{
|
||||
"Key": "Owner",
|
||||
"Value": {"String": "${reflexMvtStockInterface.owner_code}"}
|
||||
},
|
||||
{
|
||||
"Key": "BatchNumber",
|
||||
<#if reflexMvtStockInterface.batch_1 == "">
|
||||
"Value": { "String" : "no batch"}
|
||||
<#else>
|
||||
"Value": { "String" : "${reflexMvtStockInterface.batch_1}"}
|
||||
</#if>
|
||||
}
|
||||
],
|
||||
</#if>
|
||||
}
|
||||
],
|
||||
|
||||
-->
|
||||
"SegmentationKeys": [ ],
|
||||
"SegmentationKeys": [ ],
|
||||
@ -11,41 +11,41 @@
|
||||
<#assign aDateTime = .now>
|
||||
|
||||
<#switch cloudEventMsg.action>
|
||||
<#case "C">
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign item = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#if item.logistical_variant_list?? >
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ItemCreated>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaItm_ItemCreated.ftl">
|
||||
<#else>
|
||||
<#stop "no LV for the item">
|
||||
</#if>
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
|
||||
<#case "C">
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign item = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#if item.logistical_variant_list?? >
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ItemCreated>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaItm_ItemCreated.ftl">
|
||||
<#else>
|
||||
<#stop "no LV for the item">
|
||||
</#if>
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
|
||||
<#case "D">
|
||||
<#-- *********************************************** Action = DELETE ******************************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign item = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ItemDeleted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaItm_ItemDeleted.ftl">
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
<#-- *********************************************** Action = DELETE ******************************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign item = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ItemDeleted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaItm_ItemDeleted.ftl">
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
</#switch>
|
||||
|
||||
|
||||
@ -11,46 +11,46 @@
|
||||
<#assign aDateTime = .now>
|
||||
|
||||
<#switch cloudEventMsg.action>
|
||||
<#case "C">
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign lv = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.LVUpdated>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaItmLv_LVUpdated.ftl">
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
|
||||
<#case "C">
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign lv = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.LVUpdated>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaItmLv_LVUpdated.ftl">
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
|
||||
<#case "D">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#stop "LV deletion not supported" >
|
||||
|
||||
<#-- supression LV a décommenter quand API ajouté au connecteur
|
||||
|
||||
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign item = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.LVDeleted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaItmLv_LVRemoved.ftl">
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
-->
|
||||
|
||||
<#break>
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#stop "LV deletion not supported" >
|
||||
|
||||
<#-- supression LV a décommenter quand API ajouté au connecteur
|
||||
|
||||
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign item = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.LVDeleted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaItmLv_LVRemoved.ftl">
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
-->
|
||||
|
||||
<#break>
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
</#switch>
|
||||
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${lv.item_code}"
|
||||
},
|
||||
"Payload": {
|
||||
"RemovedLogisticVariant": "${lv.logistical_variant_code}
|
||||
}
|
||||
}
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${lv.item_code}"
|
||||
},
|
||||
"Payload": {
|
||||
"RemovedLogisticVariant": "${lv.logistical_variant_code}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@ -1,73 +1,73 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${lv.item_code}"
|
||||
},
|
||||
"Payload": {
|
||||
"LogisticVariants": [
|
||||
{
|
||||
"LVID": "${lv.logistical_variant_code}",
|
||||
"Name" : "${lv.lv_type_code}",
|
||||
<#if lv.id_list??>
|
||||
"Codes": [
|
||||
<#list lv.id_list as id>
|
||||
{
|
||||
"Key": "${id.logistical_variant_ID_type_code}",
|
||||
"Value": "${id.logistical_variant_ID_code}"
|
||||
}<#sep>,</#sep>
|
||||
</#list>
|
||||
],
|
||||
</#if>
|
||||
|
||||
<#-- LV Metadata inclusion -->
|
||||
<#include "RFXtoRP_HsaItmLv_LVUpdated_Metadata.ftl">
|
||||
|
||||
"IsBaseLogisticVariant": ${lv.base_lv},
|
||||
|
||||
<#if lv.base_lv != "true">
|
||||
"RefLV": "${lv.subpackaging_lv_code}",
|
||||
</#if>
|
||||
|
||||
"QuantityInRefLV": ${lv.quantity_in_subpackaging_lv},
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${lv.item_code}"
|
||||
},
|
||||
"Payload": {
|
||||
"LogisticVariants": [
|
||||
{
|
||||
"LVID": "${lv.logistical_variant_code}",
|
||||
"Name" : "${lv.lv_type_code}",
|
||||
<#if lv.id_list??>
|
||||
"Codes": [
|
||||
<#list lv.id_list as id>
|
||||
{
|
||||
"Key": "${id.logistical_variant_ID_type_code}",
|
||||
"Value": "${id.logistical_variant_ID_code}"
|
||||
}<#sep>,</#sep>
|
||||
</#list>
|
||||
],
|
||||
</#if>
|
||||
|
||||
<#-- LV Metadata inclusion -->
|
||||
<#include "RFXtoRP_HsaItmLv_LVUpdated_Metadata.ftl">
|
||||
|
||||
"IsBaseLogisticVariant": ${lv.base_lv},
|
||||
|
||||
<#if lv.base_lv != "true">
|
||||
"RefLV": "${lv.subpackaging_lv_code}",
|
||||
</#if>
|
||||
|
||||
"QuantityInRefLV": ${lv.quantity_in_subpackaging_lv},
|
||||
|
||||
"NetWeight": {
|
||||
"Value": ${lv.net_weight},
|
||||
"Unit": "${weight_unit_rfx}"
|
||||
},
|
||||
"GrossWeight": {
|
||||
"Value": ${lv.gross_weight},
|
||||
"Unit": "${weight_unit_rfx}"
|
||||
},
|
||||
"Volume": {
|
||||
"Value": ${lv.volume},
|
||||
"Unit": "${volume_unit_rfx}"
|
||||
},
|
||||
"Height": {
|
||||
"Value": ${lv.height},
|
||||
"Unit": "${length_unit_rfx}"
|
||||
},
|
||||
"Width": {
|
||||
"Value": ${lv.width},
|
||||
"Unit": "${length_unit_rfx}"
|
||||
},
|
||||
"Length": {
|
||||
"Value": ${lv.depth},
|
||||
"Unit": "${length_unit_rfx}"
|
||||
},
|
||||
"NetWeight": {
|
||||
"Value": ${lv.net_weight},
|
||||
"Unit": "${weight_unit_rfx}"
|
||||
},
|
||||
"GrossWeight": {
|
||||
"Value": ${lv.gross_weight},
|
||||
"Unit": "${weight_unit_rfx}"
|
||||
},
|
||||
"Volume": {
|
||||
"Value": ${lv.volume},
|
||||
"Unit": "${volume_unit_rfx}"
|
||||
},
|
||||
"Height": {
|
||||
"Value": ${lv.height},
|
||||
"Unit": "${length_unit_rfx}"
|
||||
},
|
||||
"Width": {
|
||||
"Value": ${lv.width},
|
||||
"Unit": "${length_unit_rfx}"
|
||||
},
|
||||
"Length": {
|
||||
"Value": ${lv.depth},
|
||||
"Unit": "${length_unit_rfx}"
|
||||
},
|
||||
|
||||
<#if lv.packaging_lv == "true">
|
||||
"BranchIDs": ["${lv.logistical_variant_code}"]
|
||||
<#else>
|
||||
"BranchIDs": []
|
||||
</#if>
|
||||
|
||||
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
<#if lv.packaging_lv == "true">
|
||||
"BranchIDs": ["${lv.logistical_variant_code}"]
|
||||
<#else>
|
||||
"BranchIDs": []
|
||||
</#if>
|
||||
|
||||
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<#-- use protobuf of class HsaItmLv to find Reflex Wms fields names -->
|
||||
|
||||
|
||||
"MetaData": [ ],
|
||||
"MetaData": [ ],
|
||||
@ -1,105 +1,105 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${item.item_code}"
|
||||
},
|
||||
"Payload": {
|
||||
"DescriptionsByLanguage": [{
|
||||
"ShortDescription": "${item.short_designation?json_string}",
|
||||
"LongDescription": "${item.designation?json_string}",
|
||||
"TechnicalDetails": "${item.item_description?json_string}",
|
||||
"LanguageCodeISO6391": "${text_language_rfx}"
|
||||
}
|
||||
],
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${item.item_code}"
|
||||
},
|
||||
"Payload": {
|
||||
"DescriptionsByLanguage": [{
|
||||
"ShortDescription": "${item.short_designation?json_string}",
|
||||
"LongDescription": "${item.designation?json_string}",
|
||||
"TechnicalDetails": "${item.item_description?json_string}",
|
||||
"LanguageCodeISO6391": "${text_language_rfx}"
|
||||
}
|
||||
],
|
||||
<#-- /!\ table de correspondance à faire disparaitre /!\ -->
|
||||
<#assign ExpiryConstraint = {"REC":"PRODUCTION_DATE", "DDM":"BEST_BEFORE_DATE", "DLC":"USE_BY_DATE"}/>
|
||||
"ExpiryConstraint": {
|
||||
"Type": "${ExpiryConstraint[item.expiry_group_code]!"UNKNOWN_DATE"}"
|
||||
},
|
||||
|
||||
<#-- Item metadata inclusion -->
|
||||
<#include "RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl">
|
||||
|
||||
<#-- Item Photo URI could be added here -->
|
||||
<#--"PhotoURI": " ", -->
|
||||
<#assign ExpiryConstraint = {"REC":"PRODUCTION_DATE", "DDM":"BEST_BEFORE_DATE", "DLC":"USE_BY_DATE"}/>
|
||||
"ExpiryConstraint": {
|
||||
"Type": "${ExpiryConstraint[item.expiry_group_code]!"UNKNOWN_DATE"}"
|
||||
},
|
||||
|
||||
<#-- Item metadata inclusion -->
|
||||
<#include "RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl">
|
||||
|
||||
<#-- Item Photo URI could be added here -->
|
||||
<#--"PhotoURI": " ", -->
|
||||
|
||||
<#-- Loop for the Logistical Variants - LV -->
|
||||
<#if item.logistical_variant_list??>
|
||||
"LogisticVariants": [
|
||||
|
||||
<#list item.logistical_variant_list as logistical_variant>
|
||||
{
|
||||
"LVID": "${logistical_variant.logistical_variant_code}",
|
||||
"Name" : "${logistical_variant.lv_type_code}",
|
||||
|
||||
<#if logistical_variant.id_list??>
|
||||
"Codes": [
|
||||
<#list logistical_variant.id_list as id>
|
||||
{
|
||||
"Key": "${id.logistical_variant_ID_type_code}",
|
||||
"Value": "${id.logistical_variant_ID_code}"
|
||||
}<#sep>,</#sep>
|
||||
</#list>
|
||||
],
|
||||
</#if>
|
||||
|
||||
<#-- LV Metadata inclusion -->
|
||||
<#if logistical_variant.additional_data_value_list??>
|
||||
<#include "RFXtoRP_HsaItm_ItemCreated_LVMetadata.ftl">
|
||||
</#if>
|
||||
|
||||
"IsBaseLogisticVariant": ${logistical_variant.base_lv},
|
||||
|
||||
<#if logistical_variant.base_lv != "true">
|
||||
"RefLV": "${logistical_variant.subpackaging_lv_code}",
|
||||
</#if>
|
||||
|
||||
"QuantityInRefLV": ${logistical_variant.quantity_in_subpackaging_lv},
|
||||
|
||||
"NetWeight": {
|
||||
"Value": ${logistical_variant.net_weight},
|
||||
"Unit": "${weight_unit_rfx}"
|
||||
},
|
||||
"GrossWeight": {
|
||||
"Value": ${logistical_variant.gross_weight},
|
||||
"Unit": "${weight_unit_rfx}"
|
||||
},
|
||||
"Volume": {
|
||||
"Value": ${logistical_variant.volume},
|
||||
"Unit": "${volume_unit_rfx}"
|
||||
},
|
||||
"Height": {
|
||||
"Value": ${logistical_variant.height},
|
||||
"Unit": "${length_unit_rfx}"
|
||||
},
|
||||
"Width": {
|
||||
"Value": ${logistical_variant.width},
|
||||
"Unit": "${length_unit_rfx}"
|
||||
},
|
||||
"Length": {
|
||||
"Value": ${logistical_variant.depth},
|
||||
"Unit": "${length_unit_rfx}"
|
||||
},
|
||||
<#-- Loop for the Logistical Variants - LV -->
|
||||
<#if item.logistical_variant_list??>
|
||||
"LogisticVariants": [
|
||||
|
||||
<#list item.logistical_variant_list as logistical_variant>
|
||||
{
|
||||
"LVID": "${logistical_variant.logistical_variant_code}",
|
||||
"Name" : "${logistical_variant.lv_type_code}",
|
||||
|
||||
<#if logistical_variant.id_list??>
|
||||
"Codes": [
|
||||
<#list logistical_variant.id_list as id>
|
||||
{
|
||||
"Key": "${id.logistical_variant_ID_type_code}",
|
||||
"Value": "${id.logistical_variant_ID_code}"
|
||||
}<#sep>,</#sep>
|
||||
</#list>
|
||||
],
|
||||
</#if>
|
||||
|
||||
<#-- LV Metadata inclusion -->
|
||||
<#if logistical_variant.additional_data_value_list??>
|
||||
<#include "RFXtoRP_HsaItm_ItemCreated_LVMetadata.ftl">
|
||||
</#if>
|
||||
|
||||
"IsBaseLogisticVariant": ${logistical_variant.base_lv},
|
||||
|
||||
<#if logistical_variant.base_lv != "true">
|
||||
"RefLV": "${logistical_variant.subpackaging_lv_code}",
|
||||
</#if>
|
||||
|
||||
"QuantityInRefLV": ${logistical_variant.quantity_in_subpackaging_lv},
|
||||
|
||||
"NetWeight": {
|
||||
"Value": ${logistical_variant.net_weight},
|
||||
"Unit": "${weight_unit_rfx}"
|
||||
},
|
||||
"GrossWeight": {
|
||||
"Value": ${logistical_variant.gross_weight},
|
||||
"Unit": "${weight_unit_rfx}"
|
||||
},
|
||||
"Volume": {
|
||||
"Value": ${logistical_variant.volume},
|
||||
"Unit": "${volume_unit_rfx}"
|
||||
},
|
||||
"Height": {
|
||||
"Value": ${logistical_variant.height},
|
||||
"Unit": "${length_unit_rfx}"
|
||||
},
|
||||
"Width": {
|
||||
"Value": ${logistical_variant.width},
|
||||
"Unit": "${length_unit_rfx}"
|
||||
},
|
||||
"Length": {
|
||||
"Value": ${logistical_variant.depth},
|
||||
"Unit": "${length_unit_rfx}"
|
||||
},
|
||||
|
||||
|
||||
<#if logistical_variant.packaging_lv == "true">
|
||||
"BranchIDs": ["${logistical_variant.logistical_variant_code}"]
|
||||
<#else>
|
||||
"BranchIDs": []
|
||||
</#if>
|
||||
|
||||
}
|
||||
<#sep>,</#sep>
|
||||
|
||||
</#list>
|
||||
]
|
||||
</#if>
|
||||
<#-- End of LV loop -->
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
<#if logistical_variant.packaging_lv == "true">
|
||||
"BranchIDs": ["${logistical_variant.logistical_variant_code}"]
|
||||
<#else>
|
||||
"BranchIDs": []
|
||||
</#if>
|
||||
|
||||
}
|
||||
<#sep>,</#sep>
|
||||
|
||||
</#list>
|
||||
]
|
||||
</#if>
|
||||
<#-- End of LV loop -->
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@ -2,4 +2,4 @@
|
||||
<#-- use protobuf of class HsaItm to find Reflex Wms fields names -->
|
||||
|
||||
|
||||
"MetaData": [ ],
|
||||
"MetaData": [ ],
|
||||
@ -2,4 +2,4 @@
|
||||
<#-- use protobuf of class HsaItm to find Reflex Wms fields names -->
|
||||
|
||||
|
||||
"MetaData": [ ],
|
||||
"MetaData": [ ],
|
||||
@ -1,12 +1,12 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${item.item_code}"
|
||||
},
|
||||
"Payload": {}
|
||||
}
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${item.item_code}"
|
||||
},
|
||||
"Payload": {}
|
||||
}
|
||||
]
|
||||
|
||||
@ -10,88 +10,88 @@
|
||||
<#assign aDateTime = .now>
|
||||
|
||||
<#switch cloudEventMsg.action>
|
||||
<#case "C">
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign preparationStatusInterface = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
|
||||
<#--
|
||||
**Pick batch runned (100) **
|
||||
<#if preparationStatusInterface.preparation_status_type == "100" &&
|
||||
(preparationStatusInterface.preparation_status_code == "200" >
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PreparationStarted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaProStatus_PreparationExpecteded.ftl">
|
||||
}
|
||||
<#else>
|
||||
-->
|
||||
|
||||
<#-- ** Collection started (300) and Preparation in progress (400)** -->
|
||||
<#if preparationStatusInterface.preparation_status_type == "100" &&
|
||||
(preparationStatusInterface.preparation_status_code == "300" ||
|
||||
preparationStatusInterface.preparation_status_code == "400") >
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PreparationStarted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaProStatus_PreparationStarted.ftl">
|
||||
}
|
||||
<#else>
|
||||
<#-- **Preparation to package (500) and preparationcompleted (550)** -->
|
||||
<#if preparationStatusInterface.preparation_status_type == "100" &&
|
||||
(preparationStatusInterface.preparation_status_code == "500" ||
|
||||
preparationStatusInterface.preparation_status_code == "550")>
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PreparationCompleted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaProStatus_PreparationCompleted.ftl">
|
||||
}
|
||||
<#else>
|
||||
<#-- ****Preparation dispatched (600)** -->
|
||||
<#if preparationStatusInterface.preparation_status_type == "100" &&
|
||||
preparationStatusInterface.preparation_status_code == "600" >
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowTransportStarted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaProStatus_TransportStarted.ftl">
|
||||
}
|
||||
<#else>
|
||||
<#-- ****Preparation cancelled (650)**** -->
|
||||
<#if preparationStatusInterface.preparation_status_type == "100" &&
|
||||
preparationStatusInterface.preparation_status_code == "650" >
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaProStatus_ExecutionflowCancelled.ftl">
|
||||
}
|
||||
<#else>
|
||||
|
||||
<#stop "Reflex WMS status not supported on Reflex Platform">
|
||||
<#case "C">
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign preparationStatusInterface = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
|
||||
<#--
|
||||
**Pick batch runned (100) **
|
||||
<#if preparationStatusInterface.preparation_status_type == "100" &&
|
||||
(preparationStatusInterface.preparation_status_code == "200" >
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PreparationStarted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaProStatus_PreparationExpecteded.ftl">
|
||||
}
|
||||
<#else>
|
||||
-->
|
||||
|
||||
<#-- ** Collection started (300) and Preparation in progress (400)** -->
|
||||
<#if preparationStatusInterface.preparation_status_type == "100" &&
|
||||
(preparationStatusInterface.preparation_status_code == "300" ||
|
||||
preparationStatusInterface.preparation_status_code == "400") >
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PreparationStarted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaProStatus_PreparationStarted.ftl">
|
||||
}
|
||||
<#else>
|
||||
<#-- **Preparation to package (500) and preparationcompleted (550)** -->
|
||||
<#if preparationStatusInterface.preparation_status_type == "100" &&
|
||||
(preparationStatusInterface.preparation_status_code == "500" ||
|
||||
preparationStatusInterface.preparation_status_code == "550")>
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PreparationCompleted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaProStatus_PreparationCompleted.ftl">
|
||||
}
|
||||
<#else>
|
||||
<#-- ****Preparation dispatched (600)** -->
|
||||
<#if preparationStatusInterface.preparation_status_type == "100" &&
|
||||
preparationStatusInterface.preparation_status_code == "600" >
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowTransportStarted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaProStatus_TransportStarted.ftl">
|
||||
}
|
||||
<#else>
|
||||
<#-- ****Preparation cancelled (650)**** -->
|
||||
<#if preparationStatusInterface.preparation_status_type == "100" &&
|
||||
preparationStatusInterface.preparation_status_code == "650" >
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaProStatus_ExecutionflowCancelled.ftl">
|
||||
}
|
||||
<#else>
|
||||
|
||||
<#stop "Reflex WMS status not supported on Reflex Platform">
|
||||
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
<#--
|
||||
</#if>
|
||||
-->
|
||||
]
|
||||
<#break>
|
||||
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
<#--
|
||||
</#if>
|
||||
-->
|
||||
]
|
||||
<#break>
|
||||
|
||||
<#case "D">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#stop "event not supported (case D)">
|
||||
<#break>
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#stop "event not supported (case D)">
|
||||
<#break>
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
</#switch>
|
||||
|
||||
|
||||
@ -1,20 +1,20 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ReflexUtils.ftl">
|
||||
|
||||
<#assign preparation_status_datetime = preparationStatusInterface.preparation_status_datetime?datetime(rfx_date_format_default)?iso_utc />
|
||||
<#assign preparation_status_datetime = preparationStatusInterface.preparation_status_datetime?datetime(rfx_date_format_default)?iso_utc />
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${preparationStatusInterface.preparation_order_originator_reference}",
|
||||
"RefDate": {
|
||||
"DateTime": "${preparation_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
"Payload": {
|
||||
}
|
||||
}
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${preparationStatusInterface.preparation_order_originator_reference}",
|
||||
"RefDate": {
|
||||
"DateTime": "${preparation_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
"Payload": {
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@ -2,19 +2,19 @@
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#assign preparation_status_datetime = preparationStatusInterface.preparation_status_datetime?datetime(rfx_date_format_default)?iso_utc />
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${preparationStatusInterface.preparation_order_originator_reference}",
|
||||
"RefDate": {
|
||||
"DateTime": "${preparation_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
|
||||
"Payload": {}
|
||||
|
||||
}
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${preparationStatusInterface.preparation_order_originator_reference}",
|
||||
"RefDate": {
|
||||
"DateTime": "${preparation_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
|
||||
"Payload": {}
|
||||
|
||||
}
|
||||
]
|
||||
|
||||
@ -2,19 +2,19 @@
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#assign preparation_status_datetime = preparationStatusInterface.preparation_status_datetime?datetime(rfx_date_format_default)?iso_utc />
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${preparationStatusInterface.preparation_order_originator_reference}",
|
||||
"RefDate": {
|
||||
"DateTime": "${preparation_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
|
||||
"Payload": {}
|
||||
|
||||
}
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${preparationStatusInterface.preparation_order_originator_reference}",
|
||||
"RefDate": {
|
||||
"DateTime": "${preparation_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
|
||||
"Payload": {}
|
||||
|
||||
}
|
||||
]
|
||||
|
||||
@ -2,19 +2,19 @@
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#assign preparation_status_datetime = preparationStatusInterface.preparation_status_datetime?datetime(rfx_date_format_default)?iso_utc />
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${preparationStatusInterface.preparation_order_originator_reference}",
|
||||
"RefDate": {
|
||||
"DateTime": "${preparation_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
|
||||
"Payload": {}
|
||||
|
||||
}
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${preparationStatusInterface.preparation_order_originator_reference}",
|
||||
"RefDate": {
|
||||
"DateTime": "${preparation_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
|
||||
"Payload": {}
|
||||
|
||||
}
|
||||
]
|
||||
|
||||
@ -2,19 +2,19 @@
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#assign preparation_status_datetime = preparationStatusInterface.preparation_status_datetime?datetime(rfx_date_format_default)?iso_utc />
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${preparationStatusInterface.preparation_order_originator_reference}",
|
||||
"RefDate": {
|
||||
"DateTime": "${preparation_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
|
||||
"Payload": {}
|
||||
|
||||
}
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${preparationStatusInterface.preparation_order_originator_reference}",
|
||||
"RefDate": {
|
||||
"DateTime": "${preparation_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
|
||||
"Payload": {}
|
||||
|
||||
}
|
||||
]
|
||||
|
||||
@ -10,37 +10,37 @@
|
||||
<#assign aDateTime = .now>
|
||||
|
||||
<#switch cloudEventMsg.action>
|
||||
<#case "C">
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaSup_ActorCreated.ftl">
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
<#case "C">
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaSup_ActorCreated.ftl">
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
|
||||
<#case "D">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorDeleted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaSup_ActorDeleted.ftl">
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorDeleted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaSup_ActorDeleted.ftl">
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
</#switch>
|
||||
|
||||
|
||||
@ -1,43 +1,43 @@
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${actor.code}"
|
||||
},
|
||||
|
||||
"Payload": {
|
||||
"Name": "${actor.designation}",
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${actor.code}"
|
||||
},
|
||||
|
||||
"Payload": {
|
||||
"Name": "${actor.designation}",
|
||||
"ManagedStock": false,
|
||||
"IsCarrier": false,
|
||||
<#-- ***Partner ID could be added here *** -->
|
||||
<#-- "PartnerID": "${}", -->
|
||||
|
||||
<#--
|
||||
<#include "RFXtoRP_HsaSup_ActorCreated_Metadata.ftl">
|
||||
-->
|
||||
|
||||
"Address":
|
||||
{
|
||||
<#if actor.optional_attributes.address_3?length > 10>
|
||||
"IsCarrier": false,
|
||||
<#-- ***Partner ID could be added here *** -->
|
||||
<#-- "PartnerID": "${}", -->
|
||||
|
||||
<#--
|
||||
<#include "RFXtoRP_HsaSup_ActorCreated_Metadata.ftl">
|
||||
-->
|
||||
|
||||
"Address":
|
||||
{
|
||||
<#if actor.optional_attributes.address_3?length > 10>
|
||||
"City" : "${actor.optional_attributes.address_3?substring(10)?trim}",
|
||||
</#if>
|
||||
"StreetAddressOne" : "${actor.optional_attributes.address_1}",
|
||||
"StreetAddressTwo" : "${actor.optional_attributes.address_2}",
|
||||
</#if>
|
||||
"StreetAddressOne" : "${actor.optional_attributes.address_1}",
|
||||
"StreetAddressTwo" : "${actor.optional_attributes.address_2}",
|
||||
|
||||
<#if actor.optional_attributes.address_3?length < 10>
|
||||
<#if actor.optional_attributes.address_3?length < 10>
|
||||
"PostalCode" : "${actor.optional_attributes.address_3?trim}",
|
||||
<#else>
|
||||
"PostalCode" : "${actor.optional_attributes.address_3?substring(0,9)?trim}",
|
||||
</#if>
|
||||
<#if actor.optional_attributes.address_4?length < 14>
|
||||
</#if>
|
||||
<#if actor.optional_attributes.address_4?length < 14>
|
||||
"CountryCode" : ""
|
||||
<#else>
|
||||
"CountryCode" : "${actor.optional_attributes.address_4?substring(10,13)?trim}"
|
||||
</#if>
|
||||
},
|
||||
"Typology": "TYPOLOGY_UNKNOWN"
|
||||
}
|
||||
}
|
||||
</#if>
|
||||
},
|
||||
"Typology": "TYPOLOGY_UNKNOWN"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@ -2,4 +2,4 @@
|
||||
<#-- use protobuf of class HsaSup to find Reflex WMS fields names -->
|
||||
|
||||
|
||||
"MetaData": [ ],
|
||||
"MetaData": [ ],
|
||||
@ -1,12 +1,12 @@
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${actor.code}"
|
||||
},
|
||||
|
||||
"Payload": {}
|
||||
}
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${actor.code}"
|
||||
},
|
||||
|
||||
"Payload": {}
|
||||
}
|
||||
]
|
||||
|
||||
@ -10,37 +10,37 @@
|
||||
<#assign aDateTime = .now>
|
||||
|
||||
<#switch cloudEventMsg.action>
|
||||
<#case "C">
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrDepot_ActorCreated.ftl">
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
|
||||
<#case "C">
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrDepot_ActorCreated.ftl">
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
|
||||
<#case "D">
|
||||
<#-- *********************************************** Action = DELETE *************************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorDeleted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrDepot_ActorDeleted.ftl">
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
<#-- *********************************************** Action = DELETE *************************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorDeleted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrDepot_ActorDeleted.ftl">
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
</#switch>
|
||||
|
||||
|
||||
@ -1,39 +1,39 @@
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${depot.physical_depot_code}"
|
||||
},
|
||||
|
||||
"Payload": {
|
||||
"Name": "${depot.physical_depot_designation}",
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${depot.physical_depot_code}"
|
||||
},
|
||||
|
||||
"Payload": {
|
||||
"Name": "${depot.physical_depot_designation}",
|
||||
"ManagedStock": true,
|
||||
"IsCarrier": false,
|
||||
<#-- ***Partner ID could be added here *** -->
|
||||
<#-- "PartnerID": "${}", -->
|
||||
|
||||
<#--
|
||||
<#include "RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl">
|
||||
-->
|
||||
|
||||
"Address":
|
||||
{
|
||||
"StreetAddressOne" : "${depot.physical_depot_address.address_1}",
|
||||
"StreetAddressTwo" : "${depot.physical_depot_address.address_2}",
|
||||
<#-- ***Partner ID could be added here *** -->
|
||||
<#-- "PartnerID": "${}", -->
|
||||
|
||||
<#--
|
||||
<#include "RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl">
|
||||
-->
|
||||
|
||||
"Address":
|
||||
{
|
||||
"StreetAddressOne" : "${depot.physical_depot_address.address_1}",
|
||||
"StreetAddressTwo" : "${depot.physical_depot_address.address_2}",
|
||||
|
||||
<#if depot.physical_depot_address.address_3?length < 10>
|
||||
<#if depot.physical_depot_address.address_3?length < 10>
|
||||
"PostalCode" : "${depot.physical_depot_address.address_3?trim}",
|
||||
<#else>
|
||||
"PostalCode" : "${depot.physical_depot_address.address_3?substring(0,9)?trim}",
|
||||
</#if>
|
||||
<#if depot.physical_depot_address.address_4?length < 14>
|
||||
</#if>
|
||||
<#if depot.physical_depot_address.address_4?length < 14>
|
||||
"CountryCode" : ""
|
||||
<#else>
|
||||
"CountryCode" : "${depot.physical_depot_address.address_4?substring(10,13)?trim}"
|
||||
</#if>
|
||||
}
|
||||
}
|
||||
}
|
||||
</#if>
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@ -2,4 +2,4 @@
|
||||
<#-- use protobuf of class HsrDepot to find Reflex WMS fields names -->
|
||||
|
||||
|
||||
"MetaData": [ ],
|
||||
"MetaData": [ ],
|
||||
@ -1,12 +1,12 @@
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${depot.physical_depot_code}"
|
||||
},
|
||||
|
||||
"Payload": {}
|
||||
}
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${depot.physical_depot_code}"
|
||||
},
|
||||
|
||||
"Payload": {}
|
||||
}
|
||||
]
|
||||
|
||||
@ -10,40 +10,40 @@
|
||||
<#assign aDateTime = .now>
|
||||
|
||||
<#switch cloudEventMsg.action>
|
||||
<#case "C">
|
||||
<#--<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign preparationOrder = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.GoodsPrepared>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPrepa_GoodsPrepared.ftl">
|
||||
},
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl">
|
||||
},
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowTransportStarted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_Hsrprepa_TransportStarted.ftl">
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
|
||||
<#case "C">
|
||||
<#--<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign preparationOrder = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.GoodsPrepared>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPrepa_GoodsPrepared.ftl">
|
||||
},
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl">
|
||||
},
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowTransportStarted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_Hsrprepa_TransportStarted.ftl">
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
|
||||
<#case "D">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#stop "event not supported (Case D)">
|
||||
<#break>
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#stop "event not supported (Case D)">
|
||||
<#break>
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
</#switch>
|
||||
|
||||
|
||||
@ -1,85 +1,85 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
|
||||
[
|
||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list??) as preparation_line>
|
||||
<#list preparation_line.despatched_ipg_list as despatched_ipg>
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
<#if despatched_ipg.carton_number != "000000000000000000">
|
||||
"RefID": "${despatched_ipg.carton_number}"
|
||||
<#else>
|
||||
"RefID": "${despatched_ipg.hd_number}"
|
||||
</#if>
|
||||
},
|
||||
|
||||
"Payload": {
|
||||
"Information" :{
|
||||
<#if despatched_ipg.carton_number != "000000000000000000">
|
||||
"ContainerType": "${despatched_ipg.carton_type_code}"
|
||||
<#else>
|
||||
"ContainerType": "${despatched_ipg.hd_type_code}"
|
||||
</#if>
|
||||
|
||||
},
|
||||
<#-- HU Metadata inclusin inclusion -->
|
||||
<#include "RFXtoRP_HsrPrepa_GoodsPrepared_HUMetadata.ftl">
|
||||
,
|
||||
"PreparedContents" :[
|
||||
{
|
||||
"Goods": {
|
||||
"ItemID": "${preparation_line.item_code}",
|
||||
"LVBranchID": "${preparation_line.item_lv_code}",
|
||||
<#if (despatched_ipg.ipg_manufacture_date?length != 0) && (despatched_ipg.ipg_manufacture_date?starts_with("00") == false)>
|
||||
<#-- <#assign priority_date = JsonUtil.createUTCDateTime(despatched_ipg.ipg_manufacture_date) /> -->
|
||||
<#assign priority_date = despatched_ipg.ipg_manufacture_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 = JsonUtil.createUTCDateTime(despatched_ipg.ipg_receipt_date) /> -->
|
||||
<#assign priority_date = despatched_ipg.ipg_receipt_date?datetime(rfx_date_format_default)?iso_utc />
|
||||
"PriorityDate": "${priority_date}",
|
||||
<#else>
|
||||
<#if (despatched_ipg.ipg_best_before_date?length != 0) && (despatched_ipg.ipg_best_before_date?starts_with("00")== false)>
|
||||
<#-- <#assign priority_date = JsonUtil.createUTCDateTime(despatched_ipg.ipg_best_before_date) /> -->
|
||||
<#assign priority_date = despatched_ipg.ipg_best_before_date?datetime(rfx_date_format_default)?iso_utc />
|
||||
"PriorityDate": "${priority_date}",
|
||||
<#else>
|
||||
<#if (despatched_ipg.ipg_sell_by_date?length != 0) && (despatched_ipg.ipg_sell_by_date?starts_with("00")== false)>
|
||||
<#-- <#assign priority_date = JsonUtil.createUTCDateTime(despatched_ipg.ipg_sell_by_date) /> -->
|
||||
<#assign priority_date = despatched_ipg.ipg_sell_by_date?datetime(rfx_date_format_default)?iso_utc />
|
||||
"PriorityDate": "${priority_date}",
|
||||
<#else>
|
||||
<#if (despatched_ipg.ipg_use_by_date?length != 0) && (despatched_ipg.ipg_use_by_date?starts_with("00")== false)>
|
||||
<#-- <#assign priority_date = JsonUtil.createUTCDateTime(despatched_ipg.ipg_use_by_date) /> -->
|
||||
<#assign priority_date = despatched_ipg.ipg_use_by_date?datetime(rfx_date_format_default)?iso_utc />
|
||||
"PriorityDate": "${priority_date}",
|
||||
<#else>
|
||||
"PriorityDate": "error_date",
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
|
||||
<#-- Segmentation Keys inclusion -->
|
||||
<#include "RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl">
|
||||
},
|
||||
"ExecutionflowID": "${preparation_line.preparation_order_originator_reference}",
|
||||
"LineID": "${preparation_line.pro_line_number}",
|
||||
"ActorID": "${preparationOrder.physical_depot_code}",
|
||||
"Quantity": {
|
||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||
"Value": ${despatched_ipg.quantity_lvs}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
}<#sep>,</#sep>
|
||||
</#list>
|
||||
<#sep>,</#sep>
|
||||
</#list>
|
||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list??) as preparation_line>
|
||||
<#list preparation_line.despatched_ipg_list as despatched_ipg>
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
<#if despatched_ipg.carton_number != "000000000000000000">
|
||||
"RefID": "${despatched_ipg.carton_number}"
|
||||
<#else>
|
||||
"RefID": "${despatched_ipg.hd_number}"
|
||||
</#if>
|
||||
},
|
||||
|
||||
"Payload": {
|
||||
"Information" :{
|
||||
<#if despatched_ipg.carton_number != "000000000000000000">
|
||||
"ContainerType": "${despatched_ipg.carton_type_code}"
|
||||
<#else>
|
||||
"ContainerType": "${despatched_ipg.hd_type_code}"
|
||||
</#if>
|
||||
|
||||
},
|
||||
<#-- HU Metadata inclusin inclusion -->
|
||||
<#include "RFXtoRP_HsrPrepa_GoodsPrepared_HUMetadata.ftl">
|
||||
,
|
||||
"PreparedContents" :[
|
||||
{
|
||||
"Goods": {
|
||||
"ItemID": "${preparation_line.item_code}",
|
||||
"LVBranchID": "${preparation_line.item_lv_code}",
|
||||
<#if (despatched_ipg.ipg_manufacture_date?length != 0) && (despatched_ipg.ipg_manufacture_date?starts_with("00") == false)>
|
||||
<#-- <#assign priority_date = JsonUtil.createUTCDateTime(despatched_ipg.ipg_manufacture_date) /> -->
|
||||
<#assign priority_date = despatched_ipg.ipg_manufacture_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 = JsonUtil.createUTCDateTime(despatched_ipg.ipg_receipt_date) /> -->
|
||||
<#assign priority_date = despatched_ipg.ipg_receipt_date?datetime(rfx_date_format_default)?iso_utc />
|
||||
"PriorityDate": "${priority_date}",
|
||||
<#else>
|
||||
<#if (despatched_ipg.ipg_best_before_date?length != 0) && (despatched_ipg.ipg_best_before_date?starts_with("00")== false)>
|
||||
<#-- <#assign priority_date = JsonUtil.createUTCDateTime(despatched_ipg.ipg_best_before_date) /> -->
|
||||
<#assign priority_date = despatched_ipg.ipg_best_before_date?datetime(rfx_date_format_default)?iso_utc />
|
||||
"PriorityDate": "${priority_date}",
|
||||
<#else>
|
||||
<#if (despatched_ipg.ipg_sell_by_date?length != 0) && (despatched_ipg.ipg_sell_by_date?starts_with("00")== false)>
|
||||
<#-- <#assign priority_date = JsonUtil.createUTCDateTime(despatched_ipg.ipg_sell_by_date) /> -->
|
||||
<#assign priority_date = despatched_ipg.ipg_sell_by_date?datetime(rfx_date_format_default)?iso_utc />
|
||||
"PriorityDate": "${priority_date}",
|
||||
<#else>
|
||||
<#if (despatched_ipg.ipg_use_by_date?length != 0) && (despatched_ipg.ipg_use_by_date?starts_with("00")== false)>
|
||||
<#-- <#assign priority_date = JsonUtil.createUTCDateTime(despatched_ipg.ipg_use_by_date) /> -->
|
||||
<#assign priority_date = despatched_ipg.ipg_use_by_date?datetime(rfx_date_format_default)?iso_utc />
|
||||
"PriorityDate": "${priority_date}",
|
||||
<#else>
|
||||
"PriorityDate": "error_date",
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
|
||||
<#-- Segmentation Keys inclusion -->
|
||||
<#include "RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl">
|
||||
},
|
||||
"ExecutionflowID": "${preparation_line.preparation_order_originator_reference}",
|
||||
"LineID": "${preparation_line.pro_line_number}",
|
||||
"ActorID": "${preparationOrder.physical_depot_code}",
|
||||
"Quantity": {
|
||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||
"Value": ${despatched_ipg.quantity_lvs}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
}<#sep>,</#sep>
|
||||
</#list>
|
||||
<#sep>,</#sep>
|
||||
</#list>
|
||||
]
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
|
||||
<#--
|
||||
"Metadata" :[
|
||||
|
||||
]
|
||||
|
||||
]
|
||||
|
||||
-->
|
||||
"Metadata": [ ]
|
||||
"Metadata": [ ]
|
||||
@ -2,23 +2,23 @@
|
||||
|
||||
<#--
|
||||
"SegmentationKeys" :[
|
||||
{
|
||||
"Key": "BatchNumber",
|
||||
<#if despatched_ipg.batch_number == "">
|
||||
"Value": { "String" : "no batch"}
|
||||
<#else>
|
||||
"Value": { "String" : "${despatched_ipg.batch_number}"}
|
||||
</#if>
|
||||
},
|
||||
{
|
||||
"Key": "Grade",
|
||||
"Value": { "String" : "${preparation_line.grade_code}"}
|
||||
},
|
||||
{
|
||||
"Key": "Owner",
|
||||
"Value": { "String" : "${preparation_line.owner_code}"}
|
||||
}
|
||||
]
|
||||
{
|
||||
"Key": "BatchNumber",
|
||||
<#if despatched_ipg.batch_number == "">
|
||||
"Value": { "String" : "no batch"}
|
||||
<#else>
|
||||
"Value": { "String" : "${despatched_ipg.batch_number}"}
|
||||
</#if>
|
||||
},
|
||||
{
|
||||
"Key": "Grade",
|
||||
"Value": { "String" : "${preparation_line.grade_code}"}
|
||||
},
|
||||
{
|
||||
"Key": "Owner",
|
||||
"Value": { "String" : "${preparation_line.owner_code}"}
|
||||
}
|
||||
]
|
||||
|
||||
-->
|
||||
"SegmentationKeys": [ ]
|
||||
"SegmentationKeys": [ ]
|
||||
@ -2,26 +2,26 @@
|
||||
<#include "ReflexUtils.ftl">
|
||||
[
|
||||
|
||||
<#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_line>
|
||||
<#assign preparationOrder_confirmation_datetime = RfxDateTimetoUTC(preparation_line.confirmation_datetime,time_zone_offset_rfx) />
|
||||
<#list preparation_line.despatched_ipg_list as despatched_ipg>
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
<#if despatched_ipg.carton_number != "000000000000000000">
|
||||
"RefID": "${despatched_ipg.carton_number}"
|
||||
<#else>
|
||||
"RefID": "${despatched_ipg.hd_number}"
|
||||
</#if>
|
||||
|
||||
},
|
||||
"Payload": {
|
||||
|
||||
}
|
||||
}<#sep>,</#sep>
|
||||
</#list>
|
||||
<#sep>,</#sep>
|
||||
</#list>
|
||||
<#list preparation_line.despatched_ipg_list as despatched_ipg>
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
<#if despatched_ipg.carton_number != "000000000000000000">
|
||||
"RefID": "${despatched_ipg.carton_number}"
|
||||
<#else>
|
||||
"RefID": "${despatched_ipg.hd_number}"
|
||||
</#if>
|
||||
|
||||
},
|
||||
"Payload": {
|
||||
|
||||
}
|
||||
}<#sep>,</#sep>
|
||||
</#list>
|
||||
<#sep>,</#sep>
|
||||
</#list>
|
||||
]
|
||||
|
||||
@ -2,20 +2,20 @@
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#assign preparation_status_datetime = preparationOrder.stock_despatch_at_preparation_datetime?datetime(rfx_date_format_default)?iso_utc />
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${preparation_line.preparation_order_originator_reference}",
|
||||
"RefDate": {
|
||||
"DateTime": "${preparation_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
|
||||
"Payload": {}
|
||||
|
||||
}
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${preparation_line.preparation_order_originator_reference}",
|
||||
"RefDate": {
|
||||
"DateTime": "${preparation_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
|
||||
"Payload": {}
|
||||
|
||||
}
|
||||
]
|
||||
<#-- ajouter une boucle sur tous les ODP de la prepa - -->
|
||||
|
||||
@ -10,65 +10,65 @@
|
||||
<#assign aDateTime = .now>
|
||||
|
||||
<#switch cloudEventMsg.action>
|
||||
<#case "C">
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign order = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#-- check preparation type code (internal order and reservation are ignored) -->
|
||||
<#if order.preparation_type_code == "010" ||
|
||||
order.preparation_type_code == "030">
|
||||
|
||||
<#-- Preparation order not confirmed -->
|
||||
<#if order.preparation_order_confirmed == "false" >
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl">
|
||||
|
||||
<#-- preparation expected a prendre en compte dans le connecteur
|
||||
,
|
||||
<#case "C">
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign order = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#-- check preparation type code (internal order and reservation are ignored) -->
|
||||
<#if order.preparation_type_code == "010" ||
|
||||
order.preparation_type_code == "030">
|
||||
|
||||
<#-- Preparation order not confirmed -->
|
||||
<#if order.preparation_order_confirmed == "false" >
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl">
|
||||
|
||||
<#-- preparation expected a prendre en compte dans le connecteur
|
||||
,
|
||||
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.TransportExpected>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPro_PreparationExpected.ftl">
|
||||
-->
|
||||
|
||||
<#-- Preparation order confirmed -->
|
||||
<#else>
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PreparationCompleted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPro_PreparationCompleted.ftl">
|
||||
</#if>
|
||||
<#else>
|
||||
<#stop "preparation type not supported">
|
||||
</#if>
|
||||
|
||||
}
|
||||
|
||||
]
|
||||
<#break>
|
||||
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.TransportExpected>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPro_PreparationExpected.ftl">
|
||||
-->
|
||||
|
||||
<#-- Preparation order confirmed -->
|
||||
<#else>
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PreparationCompleted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPro_PreparationCompleted.ftl">
|
||||
</#if>
|
||||
<#else>
|
||||
<#stop "preparation type not supported">
|
||||
</#if>
|
||||
|
||||
}
|
||||
|
||||
]
|
||||
<#break>
|
||||
|
||||
<#case "D">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign order = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPro_ExecutionflowCancelled.ftl">
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign order = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPro_ExecutionflowCancelled.ftl">
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
</#switch>
|
||||
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${order.originator_reference}"
|
||||
},
|
||||
"Payload": {
|
||||
}
|
||||
}
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${order.originator_reference}"
|
||||
},
|
||||
"Payload": {
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@ -1,106 +1,106 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ReflexUtils.ftl">
|
||||
[
|
||||
{
|
||||
{
|
||||
<#assign planned_final_delivery_start_datetime = RfxDateTimetoUTC(order.planned_final_delivery_start_datetime,time_zone_offset_rfx) />
|
||||
<#assign pro_creation_datetime = RfxDateTimetoUTC(order.creation_datetime,time_zone_offset_rfx) />
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${order.originator_reference}",
|
||||
"RefDate": {
|
||||
"DateTime": "${pro_creation_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
"Payload": {
|
||||
"CreationDateTime": {
|
||||
"DateTime": "${pro_creation_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
},
|
||||
<#-- Header Metadata inclusion -->
|
||||
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_HeaderMetadata.ftl">
|
||||
|
||||
"ShipFrom": {
|
||||
"ActorID": "${order.physical_depot_code}"
|
||||
},
|
||||
"ShipFromAcked": true,
|
||||
"ShipTo": {
|
||||
<#if order.end_consignee_code != "ECOM">
|
||||
"ActorID": "${order.end_consignee_code}"
|
||||
<#else>
|
||||
<#if order.address != "">
|
||||
"Actor":
|
||||
{
|
||||
"Name" : "${order.address.name_or_company_name!""}",
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${order.originator_reference}",
|
||||
"RefDate": {
|
||||
"DateTime": "${pro_creation_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
"Payload": {
|
||||
"CreationDateTime": {
|
||||
"DateTime": "${pro_creation_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
},
|
||||
<#-- Header Metadata inclusion -->
|
||||
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_HeaderMetadata.ftl">
|
||||
|
||||
"ShipFrom": {
|
||||
"ActorID": "${order.physical_depot_code}"
|
||||
},
|
||||
"ShipFromAcked": true,
|
||||
"ShipTo": {
|
||||
<#if order.end_consignee_code != "ECOM">
|
||||
"ActorID": "${order.end_consignee_code}"
|
||||
<#else>
|
||||
<#if order.address != "">
|
||||
"Actor":
|
||||
{
|
||||
"Name" : "${order.address.name_or_company_name!""}",
|
||||
"Address" :
|
||||
{
|
||||
"City" : "${order.address.post_code_area_name!""}",
|
||||
"CountryCode" : "${order.address.iso_country_code!""}",
|
||||
"PostalCode" : "${order.address.postal_code!""}",
|
||||
"StreetAddressOne" : "${order.address.street_and_number_and_po_box!""}",
|
||||
"StreetAddressTwo" : "${order.address.additional_address_data_1!""}",
|
||||
"StreetAddressThree" : "${order.address.additional_address_data_2!""}"
|
||||
"StreetAddressTwo" : "${order.address.additional_address_data_1!""}",
|
||||
"StreetAddressThree" : "${order.address.additional_address_data_2!""}"
|
||||
}
|
||||
},
|
||||
"Contact" :
|
||||
{
|
||||
"FirstName" : "${order.address.first_name!""}",
|
||||
"LastName" : "${order.address.last_name!""}",
|
||||
"Emails" : ["${order.address.mail_address!""}"],
|
||||
"Phones" : ["${order.address.mobile_phone_number!""}"]
|
||||
}
|
||||
</#if>
|
||||
</#if>
|
||||
},
|
||||
|
||||
<#if order.line_list??>
|
||||
"Lines" : [
|
||||
<#list order.line_list as line>
|
||||
{
|
||||
<#if (line.originator_reference_line_number!0) != 0>
|
||||
"LineID": "${line.originator_reference_line_number}",
|
||||
<#else>
|
||||
"LineID": "${line.preparation_order_line_number!0}",
|
||||
</#if>
|
||||
<#-- Line Metadata inclusion -->
|
||||
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_LineMetadata.ftl">
|
||||
|
||||
"RequestedContent":
|
||||
{
|
||||
"Goods":
|
||||
{
|
||||
"ItemID": "${line.item_code!"0"}",
|
||||
"LVBranchID": "${line.item_lv_code!"0"}",
|
||||
<#if (line.optional_attributes.forced_priority_date?length != 0) && (line.optional_attributes.forced_priority_date?starts_with("00") == false)>
|
||||
<#assign forced_priority_date = line.optional_attributes.forced_priority_date?datetime(rfx_date_format_default)?iso_utc />
|
||||
"PriorityDate": "${forced_priority_date}",
|
||||
</#if>
|
||||
|
||||
<#-- Line Segmentation Keys inclusion -->
|
||||
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_LineSegmentationKeys.ftl">
|
||||
|
||||
},
|
||||
"Quantity" :
|
||||
{
|
||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||
"Value": "${line.base_lv_quantity_to_prepare!0}"
|
||||
}
|
||||
}
|
||||
}<#sep>,</#sep>
|
||||
</#list>
|
||||
],
|
||||
</#if>
|
||||
|
||||
"RequestedMilestones" :
|
||||
{
|
||||
"RequestedDeliveryDateTime" :
|
||||
{
|
||||
"DateTime": "${planned_final_delivery_start_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Contact" :
|
||||
{
|
||||
"FirstName" : "${order.address.first_name!""}",
|
||||
"LastName" : "${order.address.last_name!""}",
|
||||
"Emails" : ["${order.address.mail_address!""}"],
|
||||
"Phones" : ["${order.address.mobile_phone_number!""}"]
|
||||
}
|
||||
</#if>
|
||||
</#if>
|
||||
},
|
||||
|
||||
<#if order.line_list??>
|
||||
"Lines" : [
|
||||
<#list order.line_list as line>
|
||||
{
|
||||
<#if (line.originator_reference_line_number!0) != 0>
|
||||
"LineID": "${line.originator_reference_line_number}",
|
||||
<#else>
|
||||
"LineID": "${line.preparation_order_line_number!0}",
|
||||
</#if>
|
||||
<#-- Line Metadata inclusion -->
|
||||
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_LineMetadata.ftl">
|
||||
|
||||
"RequestedContent":
|
||||
{
|
||||
"Goods":
|
||||
{
|
||||
"ItemID": "${line.item_code!"0"}",
|
||||
"LVBranchID": "${line.item_lv_code!"0"}",
|
||||
<#if (line.optional_attributes.forced_priority_date?length != 0) && (line.optional_attributes.forced_priority_date?starts_with("00") == false)>
|
||||
<#assign forced_priority_date = line.optional_attributes.forced_priority_date?datetime(rfx_date_format_default)?iso_utc />
|
||||
"PriorityDate": "${forced_priority_date}",
|
||||
</#if>
|
||||
|
||||
<#-- Line Segmentation Keys inclusion -->
|
||||
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_LineSegmentationKeys.ftl">
|
||||
|
||||
},
|
||||
"Quantity" :
|
||||
{
|
||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||
"Value": "${line.base_lv_quantity_to_prepare!0}"
|
||||
}
|
||||
}
|
||||
}<#sep>,</#sep>
|
||||
</#list>
|
||||
],
|
||||
</#if>
|
||||
|
||||
"RequestedMilestones" :
|
||||
{
|
||||
"RequestedDeliveryDateTime" :
|
||||
{
|
||||
"DateTime": "${planned_final_delivery_start_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@ -4,12 +4,12 @@
|
||||
<#--
|
||||
|
||||
"MetaData": [
|
||||
{
|
||||
"Key": "OrderType",
|
||||
"Value": { "String" : "${order.optional_attributes.reason_code}"}
|
||||
}
|
||||
],
|
||||
{
|
||||
"Key": "OrderType",
|
||||
"Value": { "String" : "${order.optional_attributes.reason_code}"}
|
||||
}
|
||||
],
|
||||
-->
|
||||
|
||||
|
||||
"MetaData": [ ],
|
||||
"MetaData": [ ],
|
||||
@ -2,4 +2,4 @@
|
||||
<#-- use protobuf of class HsrPro to find Reflex Wms fields names -->
|
||||
|
||||
|
||||
"MetaData": [ ],
|
||||
"MetaData": [ ],
|
||||
@ -2,19 +2,19 @@
|
||||
<#-- use protobuf of class HsrPro to find Reflex WMS fields names -->
|
||||
|
||||
<#--
|
||||
"SegmentationKeys": [ {
|
||||
"Key": "BatchNumber",
|
||||
<#if line.batch_1 == "">
|
||||
"Value": { "String" : "no batch"}
|
||||
<#else>
|
||||
"Value": { "String" : "${line.batch_1}"}
|
||||
</#if>
|
||||
},
|
||||
{
|
||||
"Key": "Grade",
|
||||
"Value": { "String" : "${SegmentationKeys_KV[line.grade_code_to_prepare]!Default_Value_Grade_SegmentationKey}"}
|
||||
}
|
||||
]
|
||||
"SegmentationKeys": [ {
|
||||
"Key": "BatchNumber",
|
||||
<#if line.batch_1 == "">
|
||||
"Value": { "String" : "no batch"}
|
||||
<#else>
|
||||
"Value": { "String" : "${line.batch_1}"}
|
||||
</#if>
|
||||
},
|
||||
{
|
||||
"Key": "Grade",
|
||||
"Value": { "String" : "${SegmentationKeys_KV[line.grade_code_to_prepare]!Default_Value_Grade_SegmentationKey}"}
|
||||
}
|
||||
]
|
||||
|
||||
-->
|
||||
"SegmentationKeys": [ ]
|
||||
"SegmentationKeys": [ ]
|
||||
@ -2,19 +2,19 @@
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#assign preparation_status_datetime = order.confirmation_datetime?datetime(rfx_date_format_default)?iso_utc />
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${order.originator_reference}",
|
||||
"RefDate": {
|
||||
"DateTime": "${preparation_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
|
||||
"Payload": {}
|
||||
|
||||
}
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${order.originator_reference}",
|
||||
"RefDate": {
|
||||
"DateTime": "${preparation_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
|
||||
"Payload": {}
|
||||
|
||||
}
|
||||
]
|
||||
|
||||
@ -2,19 +2,19 @@
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#assign preparation_status_datetime = order.creation_datetime?datetime(rfx_date_format_default)?iso_utc />
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${order.originator_reference}",
|
||||
"RefDate": {
|
||||
"DateTime": "${preparation_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
|
||||
"Payload": {}
|
||||
|
||||
}
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${order.originator_reference}",
|
||||
"RefDate": {
|
||||
"DateTime": "${preparation_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
|
||||
"Payload": {}
|
||||
|
||||
}
|
||||
]
|
||||
|
||||
@ -10,61 +10,61 @@
|
||||
<#assign aDateTime = .now>
|
||||
|
||||
<#switch cloudEventMsg.action>
|
||||
<#case "C">
|
||||
<#-- *********************************************** Action = CREATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl">
|
||||
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
<#if receipt.receipt_confirmed == "true" >
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ReceiptCompleted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrReceiptList_ReceiptCompleted.ftl">
|
||||
}
|
||||
<#else>
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl">
|
||||
}
|
||||
</#if>
|
||||
]
|
||||
<#break>
|
||||
|
||||
<#case "C">
|
||||
<#-- *********************************************** Action = CREATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl">
|
||||
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
<#if receipt.receipt_confirmed == "true" >
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ReceiptCompleted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrReceiptList_ReceiptCompleted.ftl">
|
||||
}
|
||||
<#else>
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl">
|
||||
}
|
||||
</#if>
|
||||
]
|
||||
<#break>
|
||||
|
||||
<#case "D">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl">
|
||||
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl">
|
||||
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
</#switch>
|
||||
|
||||
|
||||
@ -1,126 +1,126 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ReflexUtils.ftl">
|
||||
[
|
||||
{
|
||||
<#assign receipt_datetime = RfxDateTimetoUTC(receipt.receipt_datetime,time_zone_offset_rfx) />
|
||||
<#assign receipt_creation_datetime = RfxDateTimetoUTC(receipt.creation_datetime,time_zone_offset_rfx) />
|
||||
{
|
||||
<#assign receipt_datetime = RfxDateTimetoUTC(receipt.receipt_datetime,time_zone_offset_rfx) />
|
||||
<#assign receipt_creation_datetime = RfxDateTimetoUTC(receipt.creation_datetime,time_zone_offset_rfx) />
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${receipt.receipt_reference}"
|
||||
"RefDate": {
|
||||
"DateTime": "${receipt_creation_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
"Payload": {
|
||||
"CreationDateTime": {
|
||||
"DateTime": "${receipt_creation_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
|
||||
},
|
||||
|
||||
<#-- Header Metadata inclusion -->
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl">
|
||||
,
|
||||
"ShipFrom":
|
||||
{
|
||||
"ActorID": "${receipt.original_code}"
|
||||
},
|
||||
"ShipTo" :
|
||||
{
|
||||
"ActorID": "${receipt.physical_depot_code}"
|
||||
},
|
||||
"ShipToAcked": true,
|
||||
|
||||
<#if receipt.carrier_informations.carrier_code != "">
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${receipt.receipt_reference}"
|
||||
"RefDate": {
|
||||
"DateTime": "${receipt_creation_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
"Payload": {
|
||||
"CreationDateTime": {
|
||||
"DateTime": "${receipt_creation_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
|
||||
},
|
||||
|
||||
<#-- Header Metadata inclusion -->
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl">
|
||||
,
|
||||
"ShipFrom":
|
||||
{
|
||||
"ActorID": "${receipt.original_code}"
|
||||
},
|
||||
"ShipTo" :
|
||||
{
|
||||
"ActorID": "${receipt.physical_depot_code}"
|
||||
},
|
||||
"ShipToAcked": true,
|
||||
|
||||
<#if receipt.carrier_informations.carrier_code != "">
|
||||
"Carrier" : {"ActorID": "${receipt.carrier_informations.carrier_code}"},
|
||||
</#if>
|
||||
|
||||
<#-- If receipt got lines -->
|
||||
<#if receipt.line_list??>
|
||||
"Lines" : [
|
||||
<#list receipt.line_list as line>
|
||||
|
||||
<#-- if receipt type = 030 (transfert) -->
|
||||
<#if receipt.receipt_type = "030">
|
||||
|
||||
<#list line.line_detail as detail>
|
||||
{
|
||||
"LineID": "${line.receipt_line_number}${detail.receipt_detail_number}",
|
||||
<#-- Line Metadata inclusion -->
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl">,
|
||||
"RequestedContent":
|
||||
{
|
||||
"Goods":
|
||||
{
|
||||
"ItemID": "${line.item_code!"0"}",
|
||||
"LVBranchID": "${line.item_lv_code!"0"}",
|
||||
<#if (detail.priority_date?length != 0) && (detail.priority_date?starts_with("00") == false)>
|
||||
<#assign line_detail_priority_date = detail.priority_date?datetime(rfx_date_format_default)?iso_utc />
|
||||
"PriorityDate": "${line_detail_priority_date}",
|
||||
</#if>
|
||||
|
||||
<#-- Line Segmentation Keys inclusion -->
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineSegmentationKeys.ftl">
|
||||
|
||||
},
|
||||
"Quantity" :
|
||||
{
|
||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||
"Value": "${detail.confirmation_lv_quantity!0}"
|
||||
}
|
||||
}
|
||||
}<#sep>,</#sep>
|
||||
</#list>
|
||||
<#-- receipt type different from transfert non transfert -->
|
||||
<#else>
|
||||
{
|
||||
"LineID": "${line.receipt_line_number}",
|
||||
<#-- Line Metadata inclusion -->
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl">,
|
||||
"RequestedContent":
|
||||
{
|
||||
"Goods":
|
||||
{
|
||||
"ItemID": "${line.item_code!"0"}",
|
||||
"LVBranchID": "${line.item_lv_code!"0"}",
|
||||
<#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 />
|
||||
"PriorityDate": "${line_without_detail_priority_date}",
|
||||
</#if>
|
||||
|
||||
<#-- Line Segmentation Keys inclusion -->
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineSegmentationKeys.ftl">
|
||||
|
||||
<#else>
|
||||
<#stop "Reception non transfert avec detail">
|
||||
</#if>
|
||||
},
|
||||
"Quantity" :
|
||||
{
|
||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||
"Value": "${line.order_quantity_in_lv!0}"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</#if>
|
||||
<#sep>,</#sep>
|
||||
</#list>
|
||||
],
|
||||
</#if>
|
||||
|
||||
"RequestedMilestones" :
|
||||
{
|
||||
"RequestedDeliveryDateTime" :
|
||||
{
|
||||
"DateTime": "${receipt_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</#if>
|
||||
|
||||
<#-- If receipt got lines -->
|
||||
<#if receipt.line_list??>
|
||||
"Lines" : [
|
||||
<#list receipt.line_list as line>
|
||||
|
||||
<#-- if receipt type = 030 (transfert) -->
|
||||
<#if receipt.receipt_type = "030">
|
||||
|
||||
<#list line.line_detail as detail>
|
||||
{
|
||||
"LineID": "${line.receipt_line_number}${detail.receipt_detail_number}",
|
||||
<#-- Line Metadata inclusion -->
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl">,
|
||||
"RequestedContent":
|
||||
{
|
||||
"Goods":
|
||||
{
|
||||
"ItemID": "${line.item_code!"0"}",
|
||||
"LVBranchID": "${line.item_lv_code!"0"}",
|
||||
<#if (detail.priority_date?length != 0) && (detail.priority_date?starts_with("00") == false)>
|
||||
<#assign line_detail_priority_date = detail.priority_date?datetime(rfx_date_format_default)?iso_utc />
|
||||
"PriorityDate": "${line_detail_priority_date}",
|
||||
</#if>
|
||||
|
||||
<#-- Line Segmentation Keys inclusion -->
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineSegmentationKeys.ftl">
|
||||
|
||||
},
|
||||
"Quantity" :
|
||||
{
|
||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||
"Value": "${detail.confirmation_lv_quantity!0}"
|
||||
}
|
||||
}
|
||||
}<#sep>,</#sep>
|
||||
</#list>
|
||||
<#-- receipt type different from transfert non transfert -->
|
||||
<#else>
|
||||
{
|
||||
"LineID": "${line.receipt_line_number}",
|
||||
<#-- Line Metadata inclusion -->
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl">,
|
||||
"RequestedContent":
|
||||
{
|
||||
"Goods":
|
||||
{
|
||||
"ItemID": "${line.item_code!"0"}",
|
||||
"LVBranchID": "${line.item_lv_code!"0"}",
|
||||
<#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 />
|
||||
"PriorityDate": "${line_without_detail_priority_date}",
|
||||
</#if>
|
||||
|
||||
<#-- Line Segmentation Keys inclusion -->
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineSegmentationKeys.ftl">
|
||||
|
||||
<#else>
|
||||
<#stop "Reception non transfert avec detail">
|
||||
</#if>
|
||||
},
|
||||
"Quantity" :
|
||||
{
|
||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||
"Value": "${line.order_quantity_in_lv!0}"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</#if>
|
||||
<#sep>,</#sep>
|
||||
</#list>
|
||||
],
|
||||
</#if>
|
||||
|
||||
"RequestedMilestones" :
|
||||
{
|
||||
"RequestedDeliveryDateTime" :
|
||||
{
|
||||
"DateTime": "${receipt_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@ -3,12 +3,12 @@
|
||||
<#--
|
||||
|
||||
"MetaData": [
|
||||
{
|
||||
"Key": "OrderType",
|
||||
"Value": { "String" : "${order.optional_attributes.reason_code}"}
|
||||
}
|
||||
],
|
||||
{
|
||||
"Key": "OrderType",
|
||||
"Value": { "String" : "${order.optional_attributes.reason_code}"}
|
||||
}
|
||||
],
|
||||
-->
|
||||
|
||||
|
||||
"MetaData": [ ],
|
||||
"MetaData": [ ],
|
||||
@ -1,4 +1,4 @@
|
||||
<#-- use protobuf of class HsrReceiptList to find Reflex Wms fields names -->
|
||||
|
||||
|
||||
"MetaData": [ ],
|
||||
"MetaData": [ ],
|
||||
@ -1,19 +1,19 @@
|
||||
<#-- use protobuf of class HsrReceiptList to find Reflex WMS fields names -->
|
||||
|
||||
<#--
|
||||
"SegmentationKeys": [ {
|
||||
"Key": "BatchNumber",
|
||||
<#if line.batch_1 == "">
|
||||
"Value": { "String" : "no batch"}
|
||||
<#else>
|
||||
"Value": { "String" : "${line.batch_1}"}
|
||||
</#if>
|
||||
},
|
||||
{
|
||||
"Key": "Grade",
|
||||
"Value": { "String" : "${line.grade_code_to_prepare}
|
||||
}
|
||||
]
|
||||
"SegmentationKeys": [ {
|
||||
"Key": "BatchNumber",
|
||||
<#if line.batch_1 == "">
|
||||
"Value": { "String" : "no batch"}
|
||||
<#else>
|
||||
"Value": { "String" : "${line.batch_1}"}
|
||||
</#if>
|
||||
},
|
||||
{
|
||||
"Key": "Grade",
|
||||
"Value": { "String" : "${line.grade_code_to_prepare}
|
||||
}
|
||||
]
|
||||
|
||||
-->
|
||||
"SegmentationKeys": [ ]
|
||||
"SegmentationKeys": [ ]
|
||||
@ -1,12 +1,12 @@
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${receipt.receipt_reference}"
|
||||
},
|
||||
"Payload": {
|
||||
}
|
||||
}
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${receipt.receipt_reference}"
|
||||
},
|
||||
"Payload": {
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@ -2,19 +2,19 @@
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#assign preparation_status_datetime = order.creation_datetime?datetime(rfx_date_format_default)?iso_utc />
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${order.originator_reference}",
|
||||
"RefDate": {
|
||||
"DateTime": "${preparation_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
|
||||
"Payload": {}
|
||||
|
||||
}
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${order.originator_reference}",
|
||||
"RefDate": {
|
||||
"DateTime": "${preparation_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
|
||||
"Payload": {}
|
||||
|
||||
}
|
||||
]
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "projectCst.ftl">
|
||||
[
|
||||
{
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${receipt.receipt_reference}"
|
||||
},
|
||||
"Payload": {
|
||||
}
|
||||
}
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${receipt.receipt_reference}"
|
||||
},
|
||||
"Payload": {
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${order.originator_reference}"
|
||||
},
|
||||
"Payload": {
|
||||
}
|
||||
}
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${order.originator_reference}"
|
||||
},
|
||||
"Payload": {
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@ -6,4 +6,4 @@
|
||||
<#return (datetimeUTC)>
|
||||
</#function>
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user