You've already forked reflex-wms-connector
Compare commits
128 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 15bd095feb | |||
| c0dd029d1f | |||
| 2e0d61310b | |||
| f62ccadba5 | |||
| 2c29166ccb | |||
| 4534155f2e | |||
| 5948467818 | |||
| c63e4ff5c8 | |||
| 457cfc85c2 | |||
| 6809b32410 | |||
| 37a5e64e83 | |||
| 2f31833bc3 | |||
| cff0f18d8a | |||
| 22b78b4ffe | |||
| 25bf3110e9 | |||
| 0a32ead29a | |||
| 46a9dc8996 | |||
| 1eb262c91c | |||
| 2588fda3a8 | |||
| d060d3eb10 | |||
| 28e99e9a2b | |||
| 78b0b467a3 | |||
| eca09f2e9e | |||
| cfb8e2ab5a | |||
| d1512d4269 | |||
| 264f9131d0 | |||
| fd9f248619 | |||
| 0fff71b759 | |||
| 196ab387ac | |||
| 5cafa068a7 | |||
| 6f287e878a | |||
| c3a23254b1 | |||
| c47672b8cc | |||
| 12483253f1 | |||
| f0f6e39407 | |||
| fb0bab260a | |||
| 040ba2a392 | |||
| 753de14f97 | |||
| 9cdcd2784d | |||
| cfe6bddf8d | |||
| 0cb3cc7dd0 | |||
| 59a7783203 | |||
| 03362d6a8b | |||
| f7125548db | |||
| 92e37e8baa | |||
| 6b633663e9 | |||
| c801c574ab | |||
| 6282266c6d | |||
| be2229d184 | |||
| 0067755ee4 | |||
| 03953258d6 | |||
| cb9d61bfe9 | |||
| 591b49cd88 | |||
| cc5357369d | |||
| c03129855e | |||
| 0211b91069 | |||
| 53afac0ccf | |||
| 349642fe25 | |||
| 4802c74fb8 | |||
| c6370e2eb7 | |||
| e5f775605f | |||
| 8575ad0de2 | |||
| c7d7aaec16 | |||
| 60c6f812d1 | |||
| c2f6537e0c | |||
| f5970127b0 | |||
| 33c7ab08a7 | |||
| fb8f9ca651 | |||
| 86afce4b0d | |||
| 16c7d6b686 | |||
| 9cffad8ffb | |||
| fc919c2199 | |||
| 48052a8112 | |||
| 5af4faf052 | |||
| dc362f6826 | |||
| 3ef86f9e5c | |||
| 97b3eb3d97 | |||
| 3b98560221 | |||
| 7eee45993e | |||
| 76c17efbec | |||
| 1038471fd0 | |||
| 3365a94098 | |||
| e055eab522 | |||
| c95bdc7f00 | |||
| 319cb6cc51 | |||
| 1f289e229c | |||
| fba36b5d77 | |||
| 76c071fab7 | |||
| 3ed530fb09 | |||
| da8939ec74 | |||
| 4193d6e48c | |||
| d038e1f6ce | |||
| f4b1864337 | |||
| 37f5fbf364 | |||
| a18f41ed78 | |||
| b6aa1d544e | |||
| 3ededd9c62 | |||
| f25f664b9a | |||
| feee703166 | |||
| c183b1398e | |||
| e5981b5b0d | |||
| ceac740066 | |||
| 9aa9500f0b | |||
| 585ac07746 | |||
| 4a806b3977 | |||
| eedd7cb16a | |||
| 387721fd82 | |||
| d334812615 | |||
| 071b5e47b0 | |||
| ba9c557ae5 | |||
| 869dc5e2f7 | |||
| 252302e688 | |||
| 56cd76fe0e | |||
| 262e22d970 | |||
| ed809f872d | |||
| ca30958d35 | |||
| 824a52a588 | |||
| 60cadad51f | |||
| 123d1dce90 | |||
| 4073c63a75 | |||
| b8aea218ce | |||
| 380b6ea116 | |||
| 59db159c29 | |||
| c7fbfe21fb | |||
| 12e29c6644 | |||
| fb1980d07a | |||
| 736054e237 | |||
| 4eb68902bf |
@@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
<#list reflexStockPicturesInterface.detailled_stock_list as stock>
|
<#list reflexStockPicturesInterface.detailled_stock_list as stock>
|
||||||
<#if stock.stock_type_code != "200">
|
<#if stock.stock_type_code != "200">
|
||||||
<#stop "stock type different from 200">
|
<#stop>
|
||||||
<#break>
|
<#break>
|
||||||
</#if>
|
</#if>
|
||||||
</#list>
|
</#list>
|
||||||
|
|||||||
@@ -22,12 +22,14 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"Goods": {
|
"Goods": {
|
||||||
"ItemID": "${stock.item_code}",
|
"ItemID": "${stock.item_code?trim?json_string}",
|
||||||
"LVBranchID": "${stock.item_logistical_variant_code}",
|
"LVBranchID": "${stock.item_logistical_variant_code}",
|
||||||
<#assign priority_date = stock.priority_date?datetime(rfx_date_format_default)?iso_utc />
|
<#assign priority_date = stock.priority_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
<#if (stock.priority_date!="") && (stock.priority_date?starts_with("00")== false) >
|
<#if (stock.priority_date!="") && (stock.priority_date?starts_with("00")== false) >
|
||||||
"PriorityDate" : "${priority_date}",
|
"PriorityDate" : "${priority_date}",
|
||||||
</#if>
|
<#else>
|
||||||
|
"PriorityDate": "1970-01-01T00:00:00Z",
|
||||||
|
</#if>
|
||||||
|
|
||||||
<#-- Segmentation keys inclusion -->
|
<#-- Segmentation keys inclusion -->
|
||||||
<#include "RFXtoRP_HfDtlStockLs_StockSnapshotted_SegmentationKeys.ftl">
|
<#include "RFXtoRP_HfDtlStockLs_StockSnapshotted_SegmentationKeys.ftl">
|
||||||
|
|||||||
@@ -24,5 +24,5 @@ ${output}
|
|||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop>
|
<#stop >
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|||||||
@@ -9,7 +9,9 @@
|
|||||||
<#case "C">
|
<#case "C">
|
||||||
<#case "U">
|
<#case "U">
|
||||||
<#case "D">
|
<#case "D">
|
||||||
|
|
||||||
<#stop "no generic FTL file available yet for LV types">
|
<#stop "no generic FTL file available yet for LV types">
|
||||||
|
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${carrier.carrier_code}"
|
"RefID": "${carrier.carrier_code?trim?json_string}"
|
||||||
},
|
},
|
||||||
|
|
||||||
"Payload": {
|
"Payload": {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${carrier.carrier_code}"
|
"RefID": "${carrier.carrier_code?trim?json_string}"
|
||||||
},
|
},
|
||||||
|
|
||||||
"Payload": {}
|
"Payload": {}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${actor.code}"
|
"RefID": "${actor.code?trim?json_string}"
|
||||||
},
|
},
|
||||||
|
|
||||||
"Payload": {
|
"Payload": {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${actor.code}"
|
"RefID": "${actor.code?trim?json_string}"
|
||||||
},
|
},
|
||||||
|
|
||||||
"Payload": {}
|
"Payload": {}
|
||||||
|
|||||||
@@ -12,55 +12,56 @@
|
|||||||
<#assign reflexMvtStockInterface = JsonUtil.jsonToMap(dataRfx)>
|
<#assign reflexMvtStockInterface = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
|
||||||
<#-- exclusion of the cases of an IPG move with quantity = 0 (weight modification) -->
|
<#-- exclusion of the cases of an IPG move with quantity = 0 (weight modification) -->
|
||||||
|
|
||||||
<#if reflexMvtStockInterface.ipg_move_quantity_in_base_lvs != 0>
|
<#if reflexMvtStockInterface.ipg_move_quantity_in_base_lvs != 0>
|
||||||
|
<#-- IPG moves translated into Stock moves -->
|
||||||
<#-- IPG moves translated into Stock moves -->
|
<#if reflexMvtStockInterface.ipg_move_type == "130" ||
|
||||||
<#if reflexMvtStockInterface.ipg_move_type == "130" ||
|
reflexMvtStockInterface.ipg_move_type == "200" ||
|
||||||
reflexMvtStockInterface.ipg_move_type == "200" ||
|
reflexMvtStockInterface.ipg_move_type == "210" ||
|
||||||
reflexMvtStockInterface.ipg_move_type == "210" ||
|
reflexMvtStockInterface.ipg_move_type == "220" ||
|
||||||
reflexMvtStockInterface.ipg_move_type == "220" ||
|
reflexMvtStockInterface.ipg_move_type == "230" ||
|
||||||
reflexMvtStockInterface.ipg_move_type == "230" ||
|
reflexMvtStockInterface.ipg_move_type == "240" ||
|
||||||
reflexMvtStockInterface.ipg_move_type == "240" ||
|
reflexMvtStockInterface.ipg_move_type == "260" ||
|
||||||
reflexMvtStockInterface.ipg_move_type == "260" ||
|
reflexMvtStockInterface.ipg_move_type == "290" ||
|
||||||
reflexMvtStockInterface.ipg_move_type == "290" ||
|
reflexMvtStockInterface.ipg_move_type == "300" ||
|
||||||
reflexMvtStockInterface.ipg_move_type == "300" ||
|
reflexMvtStockInterface.ipg_move_type == "400" ||
|
||||||
reflexMvtStockInterface.ipg_move_type == "400" ||
|
reflexMvtStockInterface.ipg_move_type == "410" ||
|
||||||
reflexMvtStockInterface.ipg_move_type == "410" ||
|
reflexMvtStockInterface.ipg_move_type == "420"
|
||||||
reflexMvtStockInterface.ipg_move_type == "420"
|
>
|
||||||
>
|
[
|
||||||
[
|
{
|
||||||
{
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.StockMoved>
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.StockMoved>
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"datas" :
|
||||||
"datas" :
|
<#include "RFXtoRP_HsaIpgMove_StockMoved.ftl">
|
||||||
<#include "RFXtoRP_HsaIpgMove_StockMoved.ftl">
|
}
|
||||||
|
]
|
||||||
}
|
|
||||||
]
|
|
||||||
<#else>
|
<#else>
|
||||||
<#-- IPG moves translated into goods received (all type of receipt) -->
|
<#-- IPG moves translated into goods received (all type of receipt) -->
|
||||||
<#if reflexMvtStockInterface.ipg_move_type == "100" ||
|
<#if (reflexMvtStockInterface.ipg_move_type == "100" ||
|
||||||
reflexMvtStockInterface.ipg_move_type == "110" ||
|
reflexMvtStockInterface.ipg_move_type == "110" ||
|
||||||
reflexMvtStockInterface.ipg_move_type == "120"
|
reflexMvtStockInterface.ipg_move_type == "120") >
|
||||||
>
|
<#if reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!="">
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsReceived>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsReceived>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaIpgMove_GoodsReceived.ftl">
|
<#include "RFXtoRP_HsaIpgMove_GoodsReceived.ftl">
|
||||||
|
}
|
||||||
}
|
]
|
||||||
]
|
<#else>
|
||||||
<#else>
|
<#-- Case of IPG move type volontarilly ignored-->
|
||||||
<#-- Case of IPG move type volontarilly ignored-->
|
<#stop " Reference receipt is empty">
|
||||||
<#stop "Move type not supported">
|
</#if>
|
||||||
</#if>
|
<#else>
|
||||||
</#if>
|
<#stop>
|
||||||
<#else>
|
</#if>
|
||||||
<#-- cases of an IPG move with quantity = 0 (weight modification)-->
|
|
||||||
<#stop "move ignored quantity = 0">
|
|
||||||
</#if>
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#-- cases of an IPG move with quantity = 0 (weight modification)-->
|
||||||
|
<#stop>
|
||||||
|
</#if>
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#case "D">
|
<#case "D">
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${reflexMvtStockInterface.hd_number}"
|
"RefID": "${reflexMvtStockInterface.hd_number?trim?json_string}"
|
||||||
},
|
},
|
||||||
"Payload": {
|
"Payload": {
|
||||||
"ReceivedContents" :[
|
"ReceivedContents" :[
|
||||||
@@ -18,17 +18,21 @@
|
|||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
},
|
},
|
||||||
"Goods": {
|
"Goods": {
|
||||||
"ItemID": "${reflexMvtStockInterface.item_code}",
|
"ItemID": "${reflexMvtStockInterface.item_code?trim?json_string}",
|
||||||
"LVBranchID": "${reflexMvtStockInterface.lv_code}",
|
"LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}",
|
||||||
"PriorityDate": "${priority_date}",
|
"PriorityDate": "${priority_date}",
|
||||||
|
|
||||||
<#-- Goods received Segmentation Keys inclusion -->
|
<#-- Goods received Segmentation Keys inclusion -->
|
||||||
<#include "RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl">
|
<#include "RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl">
|
||||||
},
|
},
|
||||||
"ExecutionflowID": "${reflexMvtStockInterface.receipt_reference}",
|
<#if reflexMvtStockInterface.receipt_reference!="">
|
||||||
"LineID": "${reflexMvtStockInterface.receipt_line_number}",
|
"ExecutionflowID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}",
|
||||||
"ActorID": "${reflexMvtStockInterface.physical_depot_code}",
|
<#else>
|
||||||
"Quantity": {
|
"ExecutionflowID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}",
|
||||||
|
</#if>
|
||||||
|
"LineID": "${reflexMvtStockInterface.receipt_line_number}",
|
||||||
|
"ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}",
|
||||||
|
"Quantity": {
|
||||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||||
"Value": ${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs}
|
"Value": ${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,26 +23,30 @@
|
|||||||
},
|
},
|
||||||
"Payload": {
|
"Payload": {
|
||||||
"Goods": {
|
"Goods": {
|
||||||
"ItemID": "${reflexMvtStockInterface.item_code}",
|
"ItemID": "${reflexMvtStockInterface.item_code?trim?json_string}",
|
||||||
"PriorityDate": "${ipg_priority_datetime}",
|
<#if (reflexMvtStockInterface.ipg_priority_date!="") && (reflexMvtStockInterface.ipg_priority_date?starts_with("00")== false) >
|
||||||
|
"PriorityDate": "${ipg_priority_datetime}",
|
||||||
|
<#else>
|
||||||
|
"PriorityDate": "1970-01-01T00:00:00Z",
|
||||||
|
</#if>
|
||||||
|
|
||||||
<#-- Segmentation keys inclusions -->
|
<#-- Segmentation keys inclusions -->
|
||||||
<#include "RFXtoRP_HsaIpgMove_StockMoved_SegmentationKeys.ftl">,
|
<#include "RFXtoRP_HsaIpgMove_StockMoved_SegmentationKeys.ftl">,
|
||||||
|
|
||||||
|
|
||||||
"LVBranchID": "${reflexMvtStockInterface.lv_code}"
|
"LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}"
|
||||||
},
|
},
|
||||||
"ActorID": "${reflexMvtStockInterface.physical_depot_code}",
|
"ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}",
|
||||||
"Movement": {
|
"Movement": {
|
||||||
|
|
||||||
"DateTime": {
|
"DateTime": {
|
||||||
"DateTime": "${generation_date}",
|
"DateTime": "${generation_date}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
},
|
},
|
||||||
"Author": "ReflexWMS-${reflexMvtStockInterface.ipg_move_creation_user_code}",
|
"Author": "ReflexWMS-${reflexMvtStockInterface.ipg_move_creation_user_code?json_string}",
|
||||||
"ExternalMoveRef" : "${reflexMvtStockInterface.ipg_move_year_number} - ${reflexMvtStockInterface.ipg_move_number}",
|
"ExternalMoveRef" : "${reflexMvtStockInterface.ipg_move_year_number} - ${reflexMvtStockInterface.ipg_move_number}",
|
||||||
"Type": "${MoveType_KV[reflexMvtStockInterface.ipg_move_type]!reflexMvtStockInterface.ipg_move_type}",
|
"Type": "${MoveType_KV[reflexMvtStockInterface.ipg_move_type]!reflexMvtStockInterface.ipg_move_type}",
|
||||||
"Reason": "${reflexMvtStockInterface.miscellaneous_receipts_despatches_code}",
|
"Reason": "${reflexMvtStockInterface.miscellaneous_receipts_despatches_code?json_string}",
|
||||||
"ExternalInfo" : "${reflexMvtStockInterface.stock_move_reference?json_string}",
|
"ExternalInfo" : "${reflexMvtStockInterface.stock_move_reference?json_string}",
|
||||||
<#if reflexMvtStockInterface.ipg_move_operation_year_number!= 0>
|
<#if reflexMvtStockInterface.ipg_move_operation_year_number!= 0>
|
||||||
"OperationReference": "${reflexMvtStockInterface.ipg_move_operation_year_number} - ${reflexMvtStockInterface.ipg_move_operation_number}",
|
"OperationReference": "${reflexMvtStockInterface.ipg_move_operation_year_number} - ${reflexMvtStockInterface.ipg_move_operation_number}",
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${lv.item_code}"
|
"RefID": "${lv.item_code?trim?json_string}"
|
||||||
},
|
},
|
||||||
"Payload": {
|
"Payload": {
|
||||||
"RemovedLogisticVariantIDs":["${lv.logistical_variant_code}"]
|
"RemovedLogisticVariantIDs":["${lv.logistical_variant_code}"]
|
||||||
|
|||||||
@@ -5,19 +5,19 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${lv.item_code}"
|
"RefID": "${lv.item_code?trim?json_string}"
|
||||||
},
|
},
|
||||||
"Payload": {
|
"Payload": {
|
||||||
"LogisticVariants": [
|
"LogisticVariants": [
|
||||||
{
|
{
|
||||||
"LVID": "${lv.logistical_variant_code}",
|
"LVID": "${lv.logistical_variant_code?json_string}",
|
||||||
"Name" : "${lv.lv_type_code}",
|
"Name" : "${lv.lv_type_code?json_string}",
|
||||||
<#if lv.id_list??>
|
<#if lv.id_list??>
|
||||||
"Codes": [
|
"Codes": [
|
||||||
<#list lv.id_list as id>
|
<#list lv.id_list as id>
|
||||||
{
|
{
|
||||||
"Key": "${id.logistical_variant_ID_type_code}",
|
"Key": "${id.logistical_variant_ID_type_code?json_string!""}",
|
||||||
"Value": "${id.logistical_variant_ID_code}"
|
"Value": "${id.logistical_variant_ID_code?json_string!""}"
|
||||||
}<#sep>,</#sep>
|
}<#sep>,</#sep>
|
||||||
</#list>
|
</#list>
|
||||||
],
|
],
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
"IsBaseLogisticVariant": ${lv.base_lv},
|
"IsBaseLogisticVariant": ${lv.base_lv},
|
||||||
|
|
||||||
<#if lv.base_lv != "true">
|
<#if lv.base_lv != "true">
|
||||||
"RefLV": "${lv.subpackaging_lv_code}",
|
"RefLV": "${lv.subpackaging_lv_code?json_string}",
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
"QuantityInRefLV": ${lv.quantity_in_subpackaging_lv},
|
"QuantityInRefLV": ${lv.quantity_in_subpackaging_lv},
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${item.item_code}"
|
"RefID": "${item.item_code?trim?json_string}"
|
||||||
},
|
},
|
||||||
"Payload": {
|
"Payload": {
|
||||||
"DescriptionsByLanguage": [{
|
"DescriptionsByLanguage": [{
|
||||||
@@ -32,15 +32,15 @@
|
|||||||
|
|
||||||
<#list item.logistical_variant_list as logistical_variant>
|
<#list item.logistical_variant_list as logistical_variant>
|
||||||
{
|
{
|
||||||
"LVID": "${logistical_variant.logistical_variant_code}",
|
"LVID": "${logistical_variant.logistical_variant_code?json_string}",
|
||||||
"Name" : "${logistical_variant.lv_type_code}",
|
"Name" : "${logistical_variant.lv_type_code?json_string}",
|
||||||
|
|
||||||
<#if logistical_variant.id_list??>
|
<#if logistical_variant.id_list??>
|
||||||
"Codes": [
|
"Codes": [
|
||||||
<#list logistical_variant.id_list as id>
|
<#list logistical_variant.id_list as id>
|
||||||
{
|
{
|
||||||
"Key": "${id.logistical_variant_ID_type_code}",
|
"Key": "${id.logistical_variant_ID_type_code?json_string!""}",
|
||||||
"Value": "${id.logistical_variant_ID_code}"
|
"Value": "${id.logistical_variant_ID_code?json_string!""}"
|
||||||
}<#sep>,</#sep>
|
}<#sep>,</#sep>
|
||||||
</#list>
|
</#list>
|
||||||
],
|
],
|
||||||
@@ -49,10 +49,12 @@
|
|||||||
<#-- LV Metadata inclusion -->
|
<#-- LV Metadata inclusion -->
|
||||||
<#include "RFXtoRP_HsaItm_ItemCreated_LogisticVariantMetadata.ftl">,
|
<#include "RFXtoRP_HsaItm_ItemCreated_LogisticVariantMetadata.ftl">,
|
||||||
|
|
||||||
"IsBaseLogisticVariant": ${logistical_variant.base_lv},
|
<#if logistical_variant.base_lv?? && logistical_variant.base_lv!="">
|
||||||
|
"IsBaseLogisticVariant": ${logistical_variant.base_lv},
|
||||||
|
</#if>
|
||||||
|
|
||||||
<#if logistical_variant.base_lv != "true">
|
<#if logistical_variant.base_lv != "true">
|
||||||
"RefLV": "${logistical_variant.subpackaging_lv_code}",
|
"RefLV": "${logistical_variant.subpackaging_lv_code?json_string}",
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
"QuantityInRefLV": ${logistical_variant.quantity_in_subpackaging_lv},
|
"QuantityInRefLV": ${logistical_variant.quantity_in_subpackaging_lv},
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${item.item_code}"
|
"RefID": "${item.item_code?trim?json_string}"
|
||||||
},
|
},
|
||||||
"Payload": {}
|
"Payload": {}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,55 +17,55 @@
|
|||||||
<#assign preparationStatusInterface = JsonUtil.jsonToMap(dataRfx) />
|
<#assign preparationStatusInterface = JsonUtil.jsonToMap(dataRfx) />
|
||||||
[
|
[
|
||||||
<#--**Pick batch runned (200) **-->
|
<#--**Pick batch runned (200) **-->
|
||||||
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "200" >
|
<#if preparationStatusInterface.preparation_order_originator_reference?? && preparationStatusInterface.preparation_order_originator_reference!="">
|
||||||
{
|
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "200" >
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationExpected>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsaProStatus_PreparationExpected.ftl">
|
|
||||||
}
|
|
||||||
<#else>
|
|
||||||
<#-- ** Collection started (300) and Preparation in progress (400)** -->
|
|
||||||
<#if preparationStatusInterface.preparation_status_type == "100" && (preparationStatusInterface.preparation_status_code == "300" || preparationStatusInterface.preparation_status_code == "400") >
|
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationStarted>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationExpected>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaProStatus_PreparationStarted.ftl">
|
<#include "RFXtoRP_HsaProStatus_PreparationExpected.ftl">
|
||||||
}
|
}
|
||||||
<#else>
|
<#else>
|
||||||
<#-- **Preparation to package (500) and preparation completed (550)** -->
|
<#-- ** Collection started (300) and Preparation in progress (400)** -->
|
||||||
<#if preparationStatusInterface.preparation_status_type == "100" && (preparationStatusInterface.preparation_status_code == "500" || preparationStatusInterface.preparation_status_code == "550")>
|
<#if preparationStatusInterface.preparation_status_type == "100" && (preparationStatusInterface.preparation_status_code == "300" || preparationStatusInterface.preparation_status_code == "400") >
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationCompleted>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationStarted>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaProStatus_PreparationCompleted.ftl">
|
<#include "RFXtoRP_HsaProStatus_PreparationStarted.ftl">
|
||||||
}
|
}
|
||||||
<#else>
|
<#else>
|
||||||
<#-- ****Preparation dispatched (600)** -->
|
<#-- ****Preparation dispatched (600)** -->
|
||||||
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "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>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationCompleted>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaProStatus_ExecutionflowCancelled.ftl">
|
<#include "RFXtoRP_HsaProStatus_PreparationCompleted.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#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>
|
<#else>
|
||||||
<#stop "Reflex WMS status not supported on Reflex Platform">
|
<#stop>
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#stop "PRO reference is empty">
|
||||||
</#if>
|
</#if>
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${preparationStatusInterface.preparation_order_originator_reference}",
|
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${preparation_status_datetime}",
|
"DateTime": "${preparation_status_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${preparationStatusInterface.preparation_order_originator_reference}",
|
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${preparation_status_datetime}",
|
"DateTime": "${preparation_status_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${preparationStatusInterface.preparation_order_originator_reference}",
|
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${preparation_status_datetime}",
|
"DateTime": "${preparation_status_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${preparationStatusInterface.preparation_order_originator_reference}",
|
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${preparation_status_datetime}",
|
"DateTime": "${preparation_status_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${preparationStatusInterface.preparation_order_originator_reference}",
|
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${preparation_status_datetime}",
|
"DateTime": "${preparation_status_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${actor.code}"
|
"RefID": "${actor.code?trim?json_string}"
|
||||||
},
|
},
|
||||||
|
|
||||||
"Payload": {
|
"Payload": {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${actor.code}"
|
"RefID": "${actor.code?trim?json_string}"
|
||||||
},
|
},
|
||||||
|
|
||||||
"Payload": {}
|
"Payload": {}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${depot.physical_depot_code}"
|
"RefID": "${depot.physical_depot_code?trim?json_string}"
|
||||||
},
|
},
|
||||||
|
|
||||||
"Payload": {
|
"Payload": {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${depot.physical_depot_code}"
|
"RefID": "${depot.physical_depot_code?trim?json_string}"
|
||||||
},
|
},
|
||||||
|
|
||||||
"Payload": {}
|
"Payload": {}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<#-- input : message RFX -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in ReflexPlatform -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
|
<#include "ReflexUtils.ftl">
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
<#assign organisationRP = organisation>
|
<#assign organisationRP = organisation>
|
||||||
@@ -16,38 +16,71 @@
|
|||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign preparationOrder = JsonUtil.jsonToMap(dataRfx)>
|
<#assign preparationOrder = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
|
||||||
<#if preparationOrder.total_lv_validated !=0>
|
<#if preparationOrder.total_lv_validated !=0>
|
||||||
[
|
[
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.GoodsPrepared>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrPrepa_GoodsPrepared.ftl">
|
|
||||||
},
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl">
|
|
||||||
}
|
|
||||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list??) as preparation_line>
|
|
||||||
<#list preparation_line.despatched_ipg_list as despatched_ipg>
|
|
||||||
<#if despatched_ipg.consignment_unit_id != "">
|
|
||||||
,
|
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsPrepared>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl">
|
<#include "RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl">
|
||||||
}
|
}
|
||||||
</#if>
|
|
||||||
|
|
||||||
|
<#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="">
|
||||||
|
,
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCarrierUpdated>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrPrepa_CarrierUpdated.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.OrderCarrierUpdated>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl">
|
||||||
|
}
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") as preparation_line>
|
||||||
|
<#list preparation_line.despatched_ipg_list as despatched_ipg>
|
||||||
|
<#assign HUadded_packing_datetime = RfxDateTimetoUTC(preparation_line.confirmation_datetime,time_zone_offset_rfx) />
|
||||||
|
<#if despatched_ipg.consignment_unit_id!="">
|
||||||
|
,
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl">
|
||||||
|
}
|
||||||
|
</#if>
|
||||||
|
<#if despatched_ipg.carton_number != "000000000000000000" && despatched_ipg.carton_number!=despatched_ipg.hd_number >
|
||||||
|
,
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitHUsAdded>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrPrepa_HandlingunitHUsAdded.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl">
|
||||||
|
}
|
||||||
|
</#if>
|
||||||
|
</#list>
|
||||||
</#list>
|
</#list>
|
||||||
</#list>
|
]
|
||||||
]
|
<#else>
|
||||||
<#else>
|
<#stop "no confirmed quantity for the preparation - preparation closed">
|
||||||
<#stop "no confirmed quantity for the preparation - preparation closed">
|
</#if>
|
||||||
</#if>
|
|
||||||
|
|
||||||
<#break>
|
<#break>
|
||||||
<#case "D">
|
<#case "D">
|
||||||
|
|||||||
26
RFXtoRP_HsrPrepa_CarrierUpdated.ftl
Normal file
26
RFXtoRP_HsrPrepa_CarrierUpdated.ftl
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
[
|
||||||
|
<#list preparationOrder.preparation_line_lst?filter(l ->l.preparation_order_originator_reference!="") as preparation_line>
|
||||||
|
<#assign OrderOriginReference = preparation_line.preparation_order_originator_reference?trim?json_string>
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID":{
|
||||||
|
"RefID": "${OrderOriginReference}"
|
||||||
|
},
|
||||||
|
"Payload":{
|
||||||
|
"Carrier": {
|
||||||
|
"ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}"
|
||||||
|
}
|
||||||
|
<#-- Add transport grade code
|
||||||
|
<#if preparationOrder.transport_grade_code!="">
|
||||||
|
,
|
||||||
|
"CarrierService":"${preparationOrder.transport_grade_code?trim?json_string}"
|
||||||
|
</#if> -->
|
||||||
|
}
|
||||||
|
}
|
||||||
|
<#sep>,</#sep>
|
||||||
|
</#list>
|
||||||
|
]
|
||||||
@@ -1,89 +0,0 @@
|
|||||||
<#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_HandlingUnitMetadata.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 = 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 = 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 = despatched_ipg.ipg_best_before_date?datetime(rfx_date_format_default)?iso_utc />
|
|
||||||
"PriorityDate": "${priority_date}",
|
|
||||||
<#else>
|
|
||||||
<#if (despatched_ipg.ipg_sell_by_date?length != 0) && (despatched_ipg.ipg_sell_by_date?starts_with("00")== false)>
|
|
||||||
<#assign priority_date = despatched_ipg.ipg_sell_by_date?datetime(rfx_date_format_default)?iso_utc />
|
|
||||||
"PriorityDate": "${priority_date}",
|
|
||||||
<#else>
|
|
||||||
<#if (despatched_ipg.ipg_use_by_date?length != 0) && (despatched_ipg.ipg_use_by_date?starts_with("00")== false)>
|
|
||||||
<#assign priority_date = despatched_ipg.ipg_use_by_date?datetime(rfx_date_format_default)?iso_utc />
|
|
||||||
"PriorityDate": "${priority_date}",
|
|
||||||
<#else>
|
|
||||||
<#if (preparationOrder.stock_despatch_at_preparation_datetime?length != 0) && (preparationOrder.stock_despatch_at_preparation_datetime?starts_with("00")== false)>
|
|
||||||
<#assign priority_date = preparationOrder.stock_despatch_at_preparation_datetime?datetime(rfx_date_format_default)?iso_utc />
|
|
||||||
"PriorityDate": "${priority_date}",
|
|
||||||
<#else>
|
|
||||||
"PriorityDate": "error_date",
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
|
|
||||||
<#-- Segmentation Keys inclusion -->
|
|
||||||
<#include "RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl">
|
|
||||||
},
|
|
||||||
"ExecutionflowID": "${preparation_line.preparation_order_originator_reference}",
|
|
||||||
<#if (preparation_line.pro_originator_reference_line_number!0) != 0>
|
|
||||||
"LineID": "${preparation_line.pro_originator_reference_line_number}",
|
|
||||||
<#else>
|
|
||||||
"LineID": "${preparation_line.pro_line_number!0}",
|
|
||||||
</#if>
|
|
||||||
"ActorID": "${preparationOrder.physical_depot_code}",
|
|
||||||
"Quantity": {
|
|
||||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
|
||||||
"Value": ${despatched_ipg.quantity_lvs}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
}<#sep>,</#sep>
|
|
||||||
</#list>
|
|
||||||
<#sep>,</#sep>
|
|
||||||
</#list>
|
|
||||||
]
|
|
||||||
26
RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl
Normal file
26
RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
[
|
||||||
|
<#assign dispatched3_datetime = RfxDateTimetoUTC(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_offset_rfx) />
|
||||||
|
<#assign generatedComa = false>
|
||||||
|
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list??) as preparation_line3>
|
||||||
|
<#list preparation_line3.despatched_ipg_list?filter(j ->j.carton_number!="000000000000000000") as despatched_ipg3>
|
||||||
|
|
||||||
|
<#if generatedComa >,</#if>
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
"RefID": "${despatched_ipg3.carton_number}",
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${dispatched3_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload": { }
|
||||||
|
}
|
||||||
|
<#assign generatedComa = true>
|
||||||
|
</#list>
|
||||||
|
</#list>
|
||||||
|
]
|
||||||
@@ -2,18 +2,14 @@
|
|||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
[
|
[
|
||||||
<#assign dispatched_datetime = RfxDateTimetoUTC(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_offset_rfx) />
|
<#assign dispatched_datetime = RfxDateTimetoUTC(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_offset_rfx) />
|
||||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list??) as preparation_line>
|
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") as preparation_line>
|
||||||
<#list preparation_line.despatched_ipg_list as despatched_ipg>
|
<#list preparation_line.despatched_ipg_list as despatched_ipg>
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
<#if despatched_ipg.carton_number != "000000000000000000">
|
|
||||||
"RefID": "${despatched_ipg.carton_number}",
|
|
||||||
<#else>
|
|
||||||
"RefID": "${despatched_ipg.hd_number}",
|
"RefID": "${despatched_ipg.hd_number}",
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${dispatched_datetime}",
|
"DateTime": "${dispatched_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
|||||||
132
RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl
Normal file
132
RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl
Normal file
@@ -0,0 +1,132 @@
|
|||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
[
|
||||||
|
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") as preparation_line>
|
||||||
|
<#list preparation_line.despatched_ipg_list as despatched_ipg>
|
||||||
|
<#assign packing_datetime = RfxDateTimetoUTC(preparation_line.confirmation_datetime,time_zone_offset_rfx) />
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
"RefDate": {
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}",
|
||||||
|
"DateTime": "${packing_datetime}"
|
||||||
|
},
|
||||||
|
<#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}"
|
||||||
|
<#if preparation_line.despatched_cartons_list?? >
|
||||||
|
<#list preparation_line.despatched_cartons_list?filter(l -> l?? && l.carton_number==despatched_ipg.carton_number) as dimensionCarton>
|
||||||
|
,
|
||||||
|
"Length": {
|
||||||
|
"Unit": "${length_unit_rfx}",
|
||||||
|
"Value": "${dimensionCarton.overall_depth}"
|
||||||
|
},
|
||||||
|
"Weight": {
|
||||||
|
"Unit": "${weight_unit_rfx}",
|
||||||
|
"Value": "${dimensionCarton.carton_gross_weight}"
|
||||||
|
},
|
||||||
|
"Height": {
|
||||||
|
"Unit": "${length_unit_rfx}",
|
||||||
|
"Value": "${dimensionCarton.overall_height}"
|
||||||
|
},
|
||||||
|
"Width": {
|
||||||
|
"Unit": "${length_unit_rfx}",
|
||||||
|
"Value": "${dimensionCarton.overall_width}"
|
||||||
|
}
|
||||||
|
</#list>
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
"ContainerType": "${despatched_ipg.hd_type_code?json_string}"
|
||||||
|
<#if preparation_line.despatched_hds_list??>
|
||||||
|
<#list preparation_line.despatched_hds_list?filter(j -> j?? && j.handling_device_number==despatched_ipg.hd_number) as dimensionHU>
|
||||||
|
,
|
||||||
|
"Length": {
|
||||||
|
"Unit": "${length_unit_rfx}",
|
||||||
|
"Value": "${dimensionHU.hd_type_depth}"
|
||||||
|
},
|
||||||
|
"Weight": {
|
||||||
|
"Unit": "${weight_unit_rfx}",
|
||||||
|
"Value": "${dimensionHU.hd_gross_weight}"
|
||||||
|
},
|
||||||
|
"Width": {
|
||||||
|
"Unit": "${length_unit_rfx}",
|
||||||
|
"Value": "${dimensionHU.hd_type_width}"
|
||||||
|
}
|
||||||
|
</#list>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
},
|
||||||
|
|
||||||
|
<#-- HU Metadata inclusin inclusion -->
|
||||||
|
<#include "RFXtoRP_HsrPrepa_GoodsPrepared_HandlingUnitMetadata.ftl">
|
||||||
|
,
|
||||||
|
"PreparedContents" :[
|
||||||
|
{
|
||||||
|
"Goods": {
|
||||||
|
"ItemID": "${preparation_line.item_code?trim?json_string}",
|
||||||
|
"LVBranchID": "${preparation_line.item_lv_code?json_string}",
|
||||||
|
<#if (despatched_ipg.ipg_manufacture_date?length != 0) && (despatched_ipg.ipg_manufacture_date?starts_with("00") == false)>
|
||||||
|
<#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 = 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 = despatched_ipg.ipg_best_before_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
|
"PriorityDate": "${priority_date}",
|
||||||
|
<#else>
|
||||||
|
<#if (despatched_ipg.ipg_sell_by_date?length != 0) && (despatched_ipg.ipg_sell_by_date?starts_with("00")== false)>
|
||||||
|
<#assign priority_date = despatched_ipg.ipg_sell_by_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
|
"PriorityDate": "${priority_date}",
|
||||||
|
<#else>
|
||||||
|
<#if (despatched_ipg.ipg_use_by_date?length != 0) && (despatched_ipg.ipg_use_by_date?starts_with("00")== false)>
|
||||||
|
<#assign priority_date = despatched_ipg.ipg_use_by_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
|
"PriorityDate": "${priority_date}",
|
||||||
|
<#else>
|
||||||
|
<#if (preparationOrder.stock_despatch_at_preparation_datetime?length != 0) && (preparationOrder.stock_despatch_at_preparation_datetime?starts_with("00")== false)>
|
||||||
|
<#assign priority_date = preparationOrder.stock_despatch_at_preparation_datetime?datetime(rfx_date_format_default)?iso_utc />
|
||||||
|
"PriorityDate": "${priority_date}",
|
||||||
|
<#else>
|
||||||
|
"PriorityDate": "1970-01-01T00:00:00Z",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
<#-- Segmentation Keys inclusion -->
|
||||||
|
<#include "RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl">
|
||||||
|
},
|
||||||
|
"ExecutionflowID": "${preparation_line.preparation_order_originator_reference?trim?json_string}",
|
||||||
|
<#if (preparation_line.pro_originator_reference_line_number!0) != 0>
|
||||||
|
"LineID": "${preparation_line.pro_originator_reference_line_number}",
|
||||||
|
<#else>
|
||||||
|
"LineID": "${preparation_line.pro_line_number!0}",
|
||||||
|
</#if>
|
||||||
|
"ActorID": "${preparationOrder.physical_depot_code?trim?json_string}",
|
||||||
|
"Quantity": {
|
||||||
|
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||||
|
"Value": ${despatched_ipg.quantity_lvs}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
}<#sep>,</#sep>
|
||||||
|
</#list>
|
||||||
|
<#sep>,</#sep>
|
||||||
|
</#list>
|
||||||
|
]
|
||||||
40
RFXtoRP_HsrPrepa_HandlingunitHUsAdded.ftl
Normal file
40
RFXtoRP_HsrPrepa_HandlingunitHUsAdded.ftl
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
"RefDate": {
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}",
|
||||||
|
"DateTime": "${HUadded_packing_datetime}"
|
||||||
|
},
|
||||||
|
"RefID": "${despatched_ipg.hd_number}"
|
||||||
|
},
|
||||||
|
|
||||||
|
"Payload": {
|
||||||
|
|
||||||
|
"IncludedHandlingunitIDs": [ "${despatched_ipg.carton_number}" ]
|
||||||
|
<#if preparation_line.despatched_hds_list?? && preparation_line.despatched_hds_list[0]??>
|
||||||
|
,
|
||||||
|
"Information": {
|
||||||
|
"ContainerType": "${preparation_line.despatched_hds_list[0].hd_type_code}",
|
||||||
|
"Length": {
|
||||||
|
"Unit": "${length_unit_rfx}",
|
||||||
|
"Value": ${preparation_line.despatched_hds_list[0].hd_type_depth}
|
||||||
|
},
|
||||||
|
"Weight": {
|
||||||
|
"Unit": "${weight_unit_rfx}",
|
||||||
|
"Value": ${preparation_line.despatched_hds_list[0].hd_gross_weight}
|
||||||
|
},
|
||||||
|
"Width": {
|
||||||
|
"Unit": "${length_unit_rfx}",
|
||||||
|
"Value": ${preparation_line.despatched_hds_list[0].hd_type_width}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
21
RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl
Normal file
21
RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
[
|
||||||
|
<#list preparationOrder.preparation_line_lst?filter(l ->l.preparation_order_originator_reference!="") as preparation_line>
|
||||||
|
<#assign OrderOriginReference = preparation_line.preparation_order_originator_reference?trim?json_string>
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID":{
|
||||||
|
"RefID": "${OrderOriginReference}"
|
||||||
|
},
|
||||||
|
"Payload":{
|
||||||
|
"Carrier": {
|
||||||
|
"ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
<#sep>,</#sep>
|
||||||
|
</#list>
|
||||||
|
]
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${despatched_ipg.consignment_unit_id}"
|
"RefID": "${despatched_ipg.consignment_unit_id?trim?json_string}"
|
||||||
},
|
},
|
||||||
"Payload": {
|
"Payload": {
|
||||||
<#if despatched_ipg.carton_number != "000000000000000000">
|
<#if despatched_ipg.carton_number != "000000000000000000">
|
||||||
@@ -15,6 +15,13 @@
|
|||||||
<#else>
|
<#else>
|
||||||
"HandlingunitID": "${despatched_ipg.hd_number}"
|
"HandlingunitID": "${despatched_ipg.hd_number}"
|
||||||
</#if>
|
</#if>
|
||||||
|
<#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" >
|
||||||
|
,
|
||||||
|
"HUCarrier":{
|
||||||
|
"ActorID": "${preparationOrder.load_data.carrier_code?json_string}"
|
||||||
|
}
|
||||||
|
|
||||||
|
</#if>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -16,24 +16,29 @@
|
|||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
|
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
{
|
|
||||||
<#-- check preparation type code (internal order and reservation are ignored) -->
|
|
||||||
<#if preparation_order.preparation_type_code == "010" || order.preparation_type_code == "030">
|
|
||||||
|
|
||||||
<#-- Only if preparation order not confirmed -->
|
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
|
||||||
<#if preparation_order.preparation_order_confirmed == "false" >
|
<#-- check preparation type code (internal order and reservation are ignored) -->
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
<#if preparation_order.preparation_type_code == "010" || preparation_order.preparation_type_code == "030">
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
<#-- Only if preparation order not confirmed -->
|
||||||
"datas" :
|
<#if preparation_order.preparation_order_confirmed == "false" >
|
||||||
<#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl">
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl">
|
||||||
|
}
|
||||||
|
<#else>
|
||||||
|
<#stop "preparation order already confirmed">
|
||||||
|
</#if>
|
||||||
|
|
||||||
<#else>
|
<#else>
|
||||||
<#stop "preparation order already confirmed">
|
|
||||||
</#if>
|
|
||||||
|
|
||||||
<#else>
|
|
||||||
<#stop "preparation order type not supported">
|
<#stop "preparation order type not supported">
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#stop "PRO reference is empty">
|
||||||
</#if>
|
</#if>
|
||||||
}
|
|
||||||
|
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
@@ -43,12 +48,16 @@
|
|||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
|
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
{
|
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
|
||||||
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrPro_ExecutionflowCancelled.ftl">
|
<#include "RFXtoRP_HsrPro_ExecutionflowCancelled.ftl">
|
||||||
}
|
}
|
||||||
|
<#else>
|
||||||
|
<#stop "PRO reference is empty">
|
||||||
|
</#if>
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${preparation_order.originator_reference}",
|
"RefID": "${preparation_order.originator_reference?trim?json_string}",
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${preparation_status_datetime}",
|
"DateTime": "${preparation_status_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${preparation_order.originator_reference}",
|
"RefID": "${preparation_order.originator_reference?trim?json_string}",
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${pro_creation_datetime}",
|
"DateTime": "${pro_creation_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
@@ -23,10 +23,10 @@
|
|||||||
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_HeaderMetadata.ftl">,
|
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_HeaderMetadata.ftl">,
|
||||||
<#-- Add transport grade code
|
<#-- Add transport grade code
|
||||||
<#if preparation_order.transport_grade_code!="">
|
<#if preparation_order.transport_grade_code!="">
|
||||||
"CarrierService":"${preparation_order.transport_grade_code}",
|
"CarrierService":"${preparation_order.transport_grade_code?trim?json_string}",
|
||||||
</#if> -->
|
</#if> -->
|
||||||
"ShipFrom": {
|
"ShipFrom": {
|
||||||
"ActorID": "${preparation_order.physical_depot_code}"
|
"ActorID": "${preparation_order.physical_depot_code?trim?json_string}"
|
||||||
},
|
},
|
||||||
"ShipFromAcked": true,
|
"ShipFromAcked": true,
|
||||||
"ShipTo": {
|
"ShipTo": {
|
||||||
@@ -68,7 +68,7 @@
|
|||||||
"FirstName" : "${preparation_order.address.first_name?json_string!""}",
|
"FirstName" : "${preparation_order.address.first_name?json_string!""}",
|
||||||
"LastName" : "${preparation_order.address.last_name?json_string!""}",
|
"LastName" : "${preparation_order.address.last_name?json_string!""}",
|
||||||
"Emails" : ${splitEmailsIntoArray(preparation_order.address.mail_address!""?json_string)},
|
"Emails" : ${splitEmailsIntoArray(preparation_order.address.mail_address!""?json_string)},
|
||||||
"Phones" : ["${preparation_order.address.mobile_phone_number!""}","${preparation_order.address.land_line_phone_number!""}", "${preparation_order.address.fax_number!""}" ]
|
"Phones" : ["${preparation_order.address.mobile_phone_number?json_string!""}","${preparation_order.address.land_line_phone_number?json_string!""}", "${preparation_order.address.fax_number?json_string!""}" ]
|
||||||
}
|
}
|
||||||
</#if>
|
</#if>
|
||||||
},
|
},
|
||||||
@@ -89,8 +89,8 @@
|
|||||||
{
|
{
|
||||||
"Goods":
|
"Goods":
|
||||||
{
|
{
|
||||||
"ItemID": "${preparation_order_line.item_code!"0"}",
|
"ItemID": "${preparation_order_line.item_code?trim?json_string!"0"}",
|
||||||
"LVBranchID": "${preparation_order_line.item_lv_code!"0"}",
|
"LVBranchID": "${preparation_order_line.item_lv_code?json_string!"0"}",
|
||||||
<#if (preparation_order_line.optional_attributes.forced_priority_date?length != 0) && (preparation_order_line.optional_attributes.forced_priority_date?starts_with("00") == false)>
|
<#if (preparation_order_line.optional_attributes.forced_priority_date?length != 0) && (preparation_order_line.optional_attributes.forced_priority_date?starts_with("00") == false)>
|
||||||
<#assign forced_priority_date = preparation_order_line.optional_attributes.forced_priority_date?datetime(rfx_date_format_default)?iso_utc />
|
<#assign forced_priority_date = preparation_order_line.optional_attributes.forced_priority_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
"PriorityDate": "${forced_priority_date}",
|
"PriorityDate": "${forced_priority_date}",
|
||||||
|
|||||||
@@ -15,58 +15,64 @@
|
|||||||
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
<#if receipt.receipt_reference ?? && receipt.receipt_reference!="">
|
||||||
|
<#if receipt.receipt_type = "030">
|
||||||
|
<#stop "ignored message because receipt type = transfert">
|
||||||
|
<#else>
|
||||||
|
[
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl">
|
||||||
|
|
||||||
<#if receipt.receipt_type = "030">
|
},
|
||||||
<#stop "ignored message because receipt type = transfert">
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
|
||||||
|
|
||||||
|
}
|
||||||
|
]
|
||||||
|
</#if>
|
||||||
<#else>
|
<#else>
|
||||||
[
|
<#stop "Receipt reference is empty">
|
||||||
{
|
</#if>
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl">
|
|
||||||
|
|
||||||
},
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
|
|
||||||
|
|
||||||
}
|
|
||||||
]
|
|
||||||
</#if>
|
|
||||||
<#break>
|
<#break>
|
||||||
<#case "U">
|
<#case "U">
|
||||||
<#-- *********************************************** Action = UPDATE ******************** -->
|
<#-- *********************************************** Action = UPDATE ******************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
<#if receipt.receipt_confirmed == "true" >
|
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
||||||
{
|
<#if receipt.receipt_confirmed == "true" >
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ReceiptCompleted>
|
{
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted>
|
||||||
"datas" :
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
<#include "RFXtoRP_HsrReceiptList_ReceiptCompleted.ftl">
|
"datas" :
|
||||||
}
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl">
|
||||||
<#else>
|
}
|
||||||
<#if receipt.receipt_type = "030">
|
|
||||||
<#stop "ignored message because receipt type = transfert">
|
|
||||||
<#else>
|
<#else>
|
||||||
{
|
<#if receipt.receipt_type = "030">
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
<#stop "ignored message because receipt type = transfert">
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
<#else>
|
||||||
"datas" :
|
{
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl">
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||||
},
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
{
|
"datas" :
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl">
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
},
|
||||||
"datas" :
|
{
|
||||||
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
}
|
"datas" :
|
||||||
</#if>
|
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
|
||||||
|
}
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#stop "Receipt reference is empty">
|
||||||
</#if>
|
</#if>
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
@@ -76,14 +82,17 @@
|
|||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
{
|
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
||||||
|
{
|
||||||
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl">
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl">
|
||||||
|
}
|
||||||
}
|
<#else>
|
||||||
|
<#stop "Receipt reference is empty">
|
||||||
|
</#if>
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${receipt.receipt_reference}",
|
"RefID": "${receipt.receipt_reference?trim?json_string}",
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${receipt_status_datetime}",
|
"DateTime": "${receipt_status_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${receipt.receipt_reference}",
|
"RefID": "${receipt.receipt_reference?trim?json_string}",
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${receipt_creation_datetime}",
|
"DateTime": "${receipt_creation_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
@@ -25,16 +25,16 @@
|
|||||||
|
|
||||||
"ShipFrom":
|
"ShipFrom":
|
||||||
{
|
{
|
||||||
"ActorID": "${receipt.original_code}"
|
"ActorID": "${receipt.original_code?trim?json_string}"
|
||||||
},
|
},
|
||||||
"ShipTo" :
|
"ShipTo" :
|
||||||
{
|
{
|
||||||
"ActorID": "${receipt.physical_depot_code}"
|
"ActorID": "${receipt.physical_depot_code?trim?json_string}"
|
||||||
},
|
},
|
||||||
"ShipToAcked": true,
|
"ShipToAcked": true,
|
||||||
|
|
||||||
<#if receipt.carrier_informations.carrier_code != "">
|
<#if receipt.carrier_informations.carrier_code != "">
|
||||||
"Carrier" : {"ActorID": "${receipt.carrier_informations.carrier_code}"},
|
"Carrier" : {"ActorID": "${receipt.carrier_informations.carrier_code?trim?json_string}"},
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
|
|
||||||
@@ -49,15 +49,15 @@
|
|||||||
{
|
{
|
||||||
"Goods":
|
"Goods":
|
||||||
{
|
{
|
||||||
"ItemID": "${line.item_code!"0"}",
|
"ItemID": "${line.item_code?trim?json_string!"0"}",
|
||||||
"LVBranchID": "${line.item_lv_code!"0"}",
|
"LVBranchID": "${line.item_lv_code?json_string!"0"}",
|
||||||
<#if line.line_without_detail??>
|
<#if line.line_without_detail??>
|
||||||
<#if (line.line_without_detail.priority_date?length != 0) && (line.line_without_detail.priority_date?starts_with("00") == false)>
|
<#if (line.line_without_detail.priority_date?length != 0) && (line.line_without_detail.priority_date?starts_with("00") == false)>
|
||||||
<#assign line_without_detail_priority_date = line.line_without_detail.priority_date?datetime(rfx_date_format_default)?iso_utc />
|
<#assign line_without_detail_priority_date = line.line_without_detail.priority_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
"PriorityDate": "${line_without_detail_priority_date}",
|
"PriorityDate": "${line_without_detail_priority_date}",
|
||||||
</#if>
|
</#if>
|
||||||
<#else>
|
<#else>
|
||||||
<#stop "line with detail">
|
<#stop >
|
||||||
</#if>
|
</#if>
|
||||||
<#-- Segmentation Keys inclusion -->
|
<#-- Segmentation Keys inclusion -->
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl">
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl">
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${receipt.receipt_reference}",
|
"RefID": "${receipt.receipt_reference?trim?json_string}",
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${receipt_status_datetime}",
|
"DateTime": "${receipt_status_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${receipt.receipt_reference}",
|
"RefID": "${receipt.receipt_reference?trim?json_string}",
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${receipt_status_datetime}",
|
"DateTime": "${receipt_status_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
"ContextPayload": "rfxresponse",
|
"ContextPayload": "rfxresponse",
|
||||||
"Type": "RP_EXECUTIONFLOW_EVENT",
|
"Type": "RP_EXECUTIONFLOW_EVENT",
|
||||||
"Task": "${id.apiRestReflexID}",
|
"Task": "${id.apiRestReflexID}",
|
||||||
"OriginalID": "${id.refid}",
|
"OriginalID": "${id.refid?trim?json_string}",
|
||||||
"StackTrace": ""
|
"StackTrace": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,6 +36,12 @@
|
|||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
</#if>
|
</#if>
|
||||||
@@ -52,6 +58,12 @@
|
|||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
</#switch>
|
</#switch>
|
||||||
@@ -81,7 +93,13 @@
|
|||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
||||||
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
</#if>
|
</#if>
|
||||||
@@ -98,6 +116,12 @@
|
|||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|||||||
20
RFXtoRP_RestResponseAllocationError.ftl
Normal file
20
RFXtoRP_RestResponseAllocationError.ftl
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
"RefID": "${id.refid?trim?json_string}",
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${aDateTime?iso_utc}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"Payload": {}
|
||||||
|
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -2,6 +2,8 @@
|
|||||||
<#-- input : message RFX -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in ReflexPlatform -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
|
||||||
<#assign eventRP = JsonUtil.jsonToMap(input)>
|
<#assign eventRP = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
|
|||||||
@@ -1,7 +1,18 @@
|
|||||||
<#include "RPtoRFX_PrepOrder_DefaultHeaderData.ftl">
|
<#include "RPtoRFX_PrepOrder_DefaultHeaderData.ftl">
|
||||||
|
<#-- Valeurs par défaut Adresse -->
|
||||||
<#assign aDateTime = .now>
|
<#-- Default values -->
|
||||||
|
<#assign typecode ="010">
|
||||||
|
<#assign titlecode ="1">
|
||||||
|
<#assign contacttypecode ="010">
|
||||||
|
<#assign adresstypecode ="010">
|
||||||
|
<#-- Si vous utilisez des acteurs non référencés, il faudra créer un destinataire "VIZ" dans Reflex WMS pour utiliser cette fonctionnalité -->
|
||||||
|
<#-- If you are using unreferenced actors, you will need to create a "VIZ" consignee in Reflex WMS to use this feature -->
|
||||||
|
<#assign defaultactor ="VIZ">
|
||||||
|
<#if executionflow.ShipTo.ActorID?? && executionflow.ShipTo.ActorID!="">
|
||||||
|
<#assign actorID = executionflow.ShipTo.ActorID >
|
||||||
|
<#else>
|
||||||
|
<#assign actorID = defaultactor >
|
||||||
|
</#if>
|
||||||
|
|
||||||
{
|
{
|
||||||
"id" : {"refid" : "${executionflow.OrderID}"},
|
"id" : {"refid" : "${executionflow.OrderID}"},
|
||||||
@@ -16,11 +27,11 @@
|
|||||||
{
|
{
|
||||||
"originator_reference": "${executionflow.OrderID}",
|
"originator_reference": "${executionflow.OrderID}",
|
||||||
"preparation_type_code": "${preparation_type_code}",
|
"preparation_type_code": "${preparation_type_code}",
|
||||||
"end_consignee_code": "${executionflow.ShipTo.ActorID!""}",
|
"end_consignee_code": "${actorID}",
|
||||||
<#if executionflow.RequestedMilestones?? && executionflow.RequestedMilestones.RequestedDeliveryDateTime??>
|
<#if executionflow.RequestedMilestones?? && executionflow.RequestedMilestones.RequestedDeliveryDateTime??>
|
||||||
"requested_delivery_start_datetime": "${executionflow.RequestedMilestones.RequestedDeliveryDateTime.DateTime}",
|
"requested_delivery_start_datetime": "${DateTimeUTCtoRfxLocale(executionflow.RequestedMilestones.RequestedDeliveryDateTime.DateTime,time_zone_rfx)}",
|
||||||
<#else>
|
<#else>
|
||||||
"requested_delivery_start_datetime": "${aDateTime?iso_utc}",
|
"requested_delivery_start_datetime": "${DateTimeUTCtoRfxLocale(.now?iso_utc?string,time_zone_rfx)}",
|
||||||
</#if>
|
</#if>
|
||||||
"requested_delivery_date_type": "${requested_delivery_date_type}",
|
"requested_delivery_date_type": "${requested_delivery_date_type}",
|
||||||
"consolidated_delivery": "${consolidated_delivery_flag}",
|
"consolidated_delivery": "${consolidated_delivery_flag}",
|
||||||
@@ -34,52 +45,62 @@
|
|||||||
"apt_with_intermediate": "false",
|
"apt_with_intermediate": "false",
|
||||||
"load_grouping": "${load_grouping}"
|
"load_grouping": "${load_grouping}"
|
||||||
},
|
},
|
||||||
<#if executionflow.ShipTo.ActorID == "">
|
<#if actorID == defaultactor >
|
||||||
"address": {
|
"address": {
|
||||||
|
"type_code": "${typecode}",
|
||||||
|
"title_code" : "${titlecode}",
|
||||||
|
"contact_type_code" : "${contacttypecode}",
|
||||||
|
"address_type_code" : "${adresstypecode}",
|
||||||
"first_name": "${executionflow.ShipTo.Contact.FirstName!""?json_string}",
|
"first_name": "${executionflow.ShipTo.Contact.FirstName!""?json_string}",
|
||||||
"last_name" :"${executionflow.ShipTo.Contact.Lastname!""?json_string}",
|
"last_name" :"${executionflow.ShipTo.Contact.LastName!""?json_string}",
|
||||||
"mail_address": "${executionflow.ShipTo.Actor.Emails[0]!""}",
|
"name_or_company_name" : "${executionflow.ShipTo.Contact.FirstName!""?json_string} ${executionflow.ShipTo.Contact.LastName!""?json_string}",
|
||||||
"mobile_phone_number": "${executionflow.ShipTo.Actor.Phones[0]!""}",
|
<#if executionflow.ShipTo.Contact.Emails?? && executionflow.ShipTo.Contact.Emails[0]!="">
|
||||||
|
"mail_address": "${executionflow.ShipTo.Contact.Emails[0]}",
|
||||||
|
</#if>
|
||||||
|
<#if executionflow.ShipTo.Contact.Phones?? && executionflow.ShipTo.Contact.Phones[0]!="">
|
||||||
|
"mobile_phone_number": "${executionflow.ShipTo.Contact.Phones[0]}",
|
||||||
|
</#if>
|
||||||
"street_and_number_and_po_box": "${executionflow.ShipTo.Actor.Address.StreetAddressOne!""?json_string}",
|
"street_and_number_and_po_box": "${executionflow.ShipTo.Actor.Address.StreetAddressOne!""?json_string}",
|
||||||
"additional_address_data_1": "${executionflow.ShipTo.Actor.Address.StreetAddressTwo!""?json_string}",
|
"additional_address_data_1": "${executionflow.ShipTo.Actor.Address.StreetAddressTwo!""?json_string}",
|
||||||
"additional_address_data_2": "${executionflow.ShipTo.Actor.Address.StreetAddressThree!""?json_string}",
|
"additional_address_data_2": "${executionflow.ShipTo.Actor.Address.StreetAddressThree!""?json_string}",
|
||||||
"postal_code": "${executionflow.ShipTo.Actor.Address.PostalCode!""}",
|
"postal_code": "${executionflow.ShipTo.Actor.Address.PostalCode!""}",
|
||||||
|
"post_code_area_name" : "${executionflow.ShipTo.Actor.Address.City!""}",
|
||||||
"iso_country_code": "${executionflow.ShipTo.Actor.Address.CountryCode!""}"
|
"iso_country_code": "${executionflow.ShipTo.Actor.Address.CountryCode!""}"
|
||||||
},
|
},
|
||||||
</#if>
|
</#if>
|
||||||
<#if executionflow.Lines??>
|
<#if executionflow.Lines??>
|
||||||
"line_list": [
|
"line_list": [
|
||||||
<#list executionflow.Lines as line>
|
<#list executionflow.Lines as line>
|
||||||
<#-- ******* line MetaData and Segmentationkeys to maps ******** -->
|
<#-- ******* line MetaData and Segmentationkeys to maps ******** -->
|
||||||
<#if line.MetaData??>
|
<#if line.MetaData??>
|
||||||
<#assign Line_MetaData_Map = JsonUtil.sequenceToMap(line.MetaData, "Key", "Value") />
|
<#assign Line_MetaData_Map = JsonUtil.sequenceToMap(line.MetaData, "Key", "Value") />
|
||||||
</#if>
|
</#if>
|
||||||
<#if line.RequestedContent.Goods.SegmentationKeys??>
|
<#if line.RequestedContent.Goods.SegmentationKeys??>
|
||||||
<#assign SegmentationKeys_Map = JsonUtil.sequenceToMap(line.RequestedContent.Goods.SegmentationKeys, "Key", "Value") />
|
<#assign SegmentationKeys_Map = JsonUtil.sequenceToMap(line.RequestedContent.Goods.SegmentationKeys, "Key", "Value") />
|
||||||
</#if>
|
</#if>
|
||||||
<#include "RPtoRFX_PrepOrder_DefaultLineData.ftl">
|
<#include "RPtoRFX_PrepOrder_DefaultLineData.ftl">
|
||||||
{
|
{
|
||||||
"originator_reference_line_number": ${line.LineID?number},
|
"originator_reference_line_number": ${line.LineID?number},
|
||||||
"item_code": "${line.RequestedContent.Goods.ItemID!""}",
|
"item_code": "${line.RequestedContent.Goods.ItemID!""}",
|
||||||
"item_lv_code": "${line.RequestedContent.Goods.LVBranchID!""}",
|
"item_lv_code": "${line.RequestedContent.Goods.LVBranchID!""}",
|
||||||
"base_lv_quantity_to_prepare": ${line.RequestedMetrics.QuantityInBaseLV.Value!0},
|
"base_lv_quantity_to_prepare": ${line.RequestedMetrics.QuantityInBaseLV.Value!0},
|
||||||
"owner_code_to_prepare" :"${owner_code_to_prepare}",
|
"owner_code_to_prepare" :"${owner_code_to_prepare}",
|
||||||
"grade_code_to_prepare" :"${grade_code_to_prepare}",
|
"grade_code_to_prepare" :"${grade_code_to_prepare}",
|
||||||
"input_order_data": "false",
|
"input_order_data": "false",
|
||||||
"batch_1": "${batch_1}",
|
"batch_1": "${batch_1}",
|
||||||
"base_lv_quantity": "true",
|
"base_lv_quantity": "true",
|
||||||
"any_lv": "false"
|
"any_lv": "false"
|
||||||
<#--
|
<#--
|
||||||
"stock_reservation": "false",
|
"stock_reservation": "false",
|
||||||
"forced_priority_date_min_lead_time": "false",
|
"forced_priority_date_min_lead_time": "false",
|
||||||
"temp_substitution_possible": "false",
|
"temp_substitution_possible": "false",
|
||||||
"substitution_possible": "false"
|
"substitution_possible": "false"
|
||||||
-->
|
-->
|
||||||
|
|
||||||
}<#sep>,</#sep>
|
}
|
||||||
</#list>
|
<#sep>,</#sep>
|
||||||
|
</#list>
|
||||||
</#if>
|
</#if>
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -23,8 +23,22 @@
|
|||||||
<#assign protected_flag ="false"/>
|
<#assign protected_flag ="false"/>
|
||||||
<#assign automatic_generation_flag ="false"/>
|
<#assign automatic_generation_flag ="false"/>
|
||||||
<#assign apt_with_end_consignee_flag="false"/>
|
<#assign apt_with_end_consignee_flag="false"/>
|
||||||
<#assign load_grouping = "DEFAUT"/>
|
|
||||||
|
<#-- A supprimer si utilisation de la table de correspondance-->
|
||||||
|
<#--To be deleted if using the correspondence table-->
|
||||||
|
<#assign load_grouping = "default">
|
||||||
|
|
||||||
|
|
||||||
|
<#-- Table de correspondance Transporteur/Code regroupement chargement,
|
||||||
|
affectation à un chargement si paramétrage regroupement chargement+plan de base distribution-->
|
||||||
|
<#--Carrier / Load Grouping Code Correspondence Table,
|
||||||
|
Assigning to a load if you set up Load Grouping+Distribution Master Plan-->
|
||||||
|
<#-- Example -->
|
||||||
|
<#--<#if executionflow.Carrier.ActorID == "TEST" >
|
||||||
|
<#assign load_grouping = "TEST">
|
||||||
|
<#else>
|
||||||
|
<#assign load_grouping = "default">
|
||||||
|
</#if>-->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<#include "RPtoRFX_Receipt_DefaultHeaderData.ftl">
|
<#include "RPtoRFX_Receipt_DefaultHeaderData.ftl">
|
||||||
<#assign aDateTime = .now>
|
|
||||||
{
|
{
|
||||||
"id" : {"refid" : "${executionflow.OrderID}"},
|
"id" : {"refid" : "${executionflow.OrderID}"},
|
||||||
"route" : "rest/public/v1/activities/{activity_code}/physical_depots/{physical_depot_code}/originators/{originator_code}/receipts",
|
"route" : "rest/public/v1/activities/{activity_code}/physical_depots/{physical_depot_code}/originators/{originator_code}/receipts",
|
||||||
@@ -19,9 +19,9 @@
|
|||||||
"carrier_code" : "${executionflow.Carrier.ActorID!""}",
|
"carrier_code" : "${executionflow.Carrier.ActorID!""}",
|
||||||
|
|
||||||
<#if executionflow.RequestedMilestones?? && executionflow.RequestedMilestones.RequestedDeliveryDateTime??>
|
<#if executionflow.RequestedMilestones?? && executionflow.RequestedMilestones.RequestedDeliveryDateTime??>
|
||||||
"receipt_datetime": "${executionflow.RequestedMilestones.RequestedDeliveryDateTime.DateTime}",
|
"receipt_datetime": "${DateTimeUTCtoRfxLocale(executionflow.RequestedMilestones.RequestedDeliveryDateTime.DateTime,time_zone_rfx)}",
|
||||||
<#else>
|
<#else>
|
||||||
"receipt_datetime": "${aDateTime?iso_utc}",
|
"receipt_datetime": "${DateTimeUTCtoRfxLocale(.now?iso_utc?string,time_zone_rfx)}",
|
||||||
</#if>
|
</#if>
|
||||||
"carrier_appointment_made": "false",
|
"carrier_appointment_made": "false",
|
||||||
"receipt_in_cross_docking": "false",
|
"receipt_in_cross_docking": "false",
|
||||||
|
|||||||
@@ -2,19 +2,21 @@
|
|||||||
<#-- Concat reflex timestamp with reflex time zone and format this date in ISO UTC format -->
|
<#-- Concat reflex timestamp with reflex time zone and format this date in ISO UTC format -->
|
||||||
<#-- --------------------------------------------------------------------------------------- -->
|
<#-- --------------------------------------------------------------------------------------- -->
|
||||||
<#function RfxDateTimetoUTC rfxdatetime offset >
|
<#function RfxDateTimetoUTC rfxdatetime offset >
|
||||||
<#assign datetimeUTC = JsonUtil.createUTCDateTime(rfxdatetime,time_zone_rfx , "yyyy-MM-dd'T'HH:mm:ss") />
|
<#return ((rfxdatetime + offset)?datetime.iso?iso_utc)>
|
||||||
<#return (datetimeUTC)>
|
</#function>
|
||||||
|
|
||||||
|
<#function DateTimeUTCtoRfxLocale dateutc locale >
|
||||||
|
<#return dateutc?datetime.iso?iso_nz(locale)>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
<#-- --------------------------------------------------------------------------------------- -->
|
<#-- --------------------------------------------------------------------------------------- -->
|
||||||
<#-- Split email reflex into json array string -->
|
<#-- Split email reflex into json array string -->
|
||||||
<#-- Example : splitemail "john.doe@hardis-group.com,; name@hardis-group.com" -->
|
<#-- Example : splitemail "john.doe@hardis-group.com,; name@hardis-group.com" -->
|
||||||
<#-- return "["john.doe@hardis-group.com","name@hardis-group.com"]" -->
|
<#-- return "["john.doe@hardis-group.com","name@hardis-group.com"]" -->
|
||||||
<#-- ${splitEmailsIntoArray(emailReflex)} -->
|
|
||||||
<#-- --------------------------------------------------------------------------------------- -->
|
<#-- --------------------------------------------------------------------------------------- -->
|
||||||
<#function splitEmailsIntoArray emails >
|
<#function splitEmailsIntoArray emails >
|
||||||
<#local str = "[">
|
<#local str = "[">
|
||||||
<#list emails?split(';|,| ',"r")?filter(l -> l != "") as email>
|
<#list emails?split(";|,| |à|/","r")?filter(l -> l != "") as email>
|
||||||
<#if email?matches("^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$")>
|
<#if email?matches("^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$")>
|
||||||
<#if str != "[">
|
<#if str != "[">
|
||||||
<#local str += ",">
|
<#local str += ",">
|
||||||
|
|||||||
Reference in New Issue
Block a user