You've already forked reflex-wms-connector
Compare commits
228 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 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 | |||
| 892812e85e | |||
| 3ededd9c62 | |||
| f25f664b9a | |||
| feee703166 | |||
| c183b1398e | |||
| e5981b5b0d | |||
| ceac740066 | |||
| 9aa9500f0b | |||
| 585ac07746 | |||
| 4a806b3977 | |||
| eedd7cb16a | |||
| 387721fd82 | |||
| d334812615 | |||
| 071b5e47b0 | |||
| ba9c557ae5 | |||
| a512e4c23a | |||
| 884ad540fe | |||
| 3a9620e3ee | |||
| d5573b6dba | |||
| 162b73e75f | |||
| bb4315bba1 | |||
| 869dc5e2f7 | |||
| 252302e688 | |||
| 56cd76fe0e | |||
| 262e22d970 | |||
| ed809f872d | |||
| c4910785e0 | |||
| 5688244be2 | |||
| de5e94be3c | |||
| 646256d879 | |||
| 60355d1ba5 | |||
| 737763dc7f | |||
| 098b2d4e1d | |||
| 7b55a4bcd0 | |||
| b369dd8adf | |||
| fd1cfcc2c5 | |||
| ca30958d35 | |||
| 824a52a588 | |||
| 60cadad51f | |||
| 123d1dce90 | |||
| 4073c63a75 | |||
| b8aea218ce | |||
| 380b6ea116 | |||
| 59db159c29 | |||
| c7fbfe21fb | |||
| 12e29c6644 | |||
| fb1980d07a | |||
| 736054e237 | |||
| 4eb68902bf | |||
| fc8290648f | |||
| 378c1ba75f | |||
| d94a74d399 | |||
| 61753efabe | |||
| c6a91f1980 | |||
| 39ab7c4ce7 | |||
| e808925e0a | |||
| c103fc7f5a | |||
| 1a9454cd2f | |||
| aaf8fc5bb6 | |||
| 7acf529870 | |||
| 47326a6b0c | |||
| cb0385a64f | |||
| a882ac4b86 | |||
| d2d9443fc7 | |||
| a5fa0dbfd9 | |||
| ca2dfe3fb2 | |||
| 980a44c1be | |||
| 6faa6bb4fc | |||
| 8b4103e50d | |||
| bff543d852 | |||
| 0b71455e6f | |||
| 18f1bb3749 | |||
| 8211fcebf0 | |||
| fcfb9206c0 | |||
| 59afa9fd65 | |||
| 07188a5c20 | |||
| 137982fcc0 | |||
| 64c35417b3 | |||
| b6bf4d2be8 | |||
| 86a4180718 | |||
| 108e30d129 | |||
| dd1d4980a8 | |||
| 8f212cf7c9 | |||
| c2e0cb7a15 | |||
| 7505c15a4a | |||
| 705ad9be63 | |||
| 7e2c22b4c9 | |||
| 27f2e18f0f | |||
| 783d7efd04 | |||
| e319d273bb | |||
| cb1793bf22 | |||
| eac8ddc598 | |||
| ba43f65277 | |||
| b3cfa5c66d | |||
| 882709f01b | |||
| 38ef2bd3df | |||
| cd75521f81 | |||
| 943a02d5f3 | |||
| 68e6840512 | |||
| 26facb3d6a | |||
| 7a3223a1ac | |||
| 7d32478c1b | |||
| 88307561d2 | |||
| 2bdc02a1d4 | |||
| e709d7d78a | |||
| 03f53c0fd0 | |||
| ac731180db | |||
| 97d08b554c | |||
| 4636ca6c42 | |||
| 8f066d7f62 | |||
| dfdfd8c60e | |||
| 41447dbc35 | |||
| ae338b00d1 | |||
| 14243be12f | |||
| c5c5f2bef7 | |||
| edc5142c3f | |||
| c79ab16480 | |||
| 97474cf5e4 | |||
| 0115159507 | |||
| 5222b56cc3 | |||
| c27aec2730 | |||
| b286711d56 | |||
| ba7ce14568 | |||
| 02eb8cbe4e | |||
| dbde25f5d3 | |||
| fbba0ede34 | |||
| adaedeec31 | |||
| fe66e643c0 | |||
| 43553eb1e4 | |||
| 1ed9617af7 | |||
| 1de8a56410 | |||
| 30ae93b9e7 | |||
| 64e03640d1 | |||
| 270f90a9b3 | |||
| b5c85220b5 | |||
| 2409cf3a01 | |||
| 957df51487 | |||
| d09fa33577 | |||
| 3bcdec1d5d | |||
| b4ea1e7798 | |||
| 80aecb3aa7 | |||
| e02218f7b1 | |||
| 9bb625bade | |||
| 6270992346 | |||
| e093ea7c07 | |||
| 3d9ec5b813 | |||
| 6b4f7e2ccc | |||
| 0485a637af | |||
| 293a4fb65c | |||
| a544f6700d | |||
| 04ec57377a |
@@ -6,7 +6,7 @@
|
||||
|
||||
<#include "HfRpConfig.ftl">
|
||||
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
<#assign organisationRP = organisation>
|
||||
|
||||
@@ -16,44 +16,44 @@
|
||||
<#-- *********************************************** 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??>
|
||||
<#if cloudEventMsg.messageSet??>
|
||||
<#assign idSnapshot = cloudEventMsg.messageSet />
|
||||
<#else>
|
||||
<#assign idSnapshot = cloudEventMsg.id />
|
||||
</#if>
|
||||
|
||||
</#if>
|
||||
|
||||
<#list reflexStockPicturesInterface.detailled_stock_list as stock>
|
||||
<#if stock.stock_type_code != "200">
|
||||
<#stop "stock type different from 200">
|
||||
<#break>
|
||||
</#if>
|
||||
</#list>
|
||||
[
|
||||
{
|
||||
<#stop>
|
||||
<#break>
|
||||
</#if>
|
||||
</#list>
|
||||
[
|
||||
{
|
||||
<#if sum_elt??>
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorSnapshotCompleted>
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorSnapshotCompleted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HfDtlStockLs_ActorSnapshotCompleted.ftl">
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HfDtlStockLs_ActorSnapshotCompleted.ftl">
|
||||
<#else>
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.StockSnapshotted>
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.StockSnapshotted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HfDtlStockLs_StockSnapshotted.ftl">
|
||||
</#if>
|
||||
</#if>
|
||||
}
|
||||
]
|
||||
]
|
||||
|
||||
<#break>
|
||||
|
||||
|
||||
<#case "D">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#stop "event not supported">
|
||||
<#break>
|
||||
|
||||
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
</#switch>
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
<#list reflexStockPicturesInterface.detailled_stock_list as stock>
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
"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}"
|
||||
},
|
||||
"DateTime": "${generation_date}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
},
|
||||
"ID": "${stock.physical_depot_code}-${idSnapshot}",
|
||||
"Quantity":
|
||||
{
|
||||
@@ -20,19 +20,23 @@
|
||||
"LVID": "${quantity_in_base_lv_RP_Cst}"
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
"Goods": {
|
||||
"ItemID": "${stock.item_code}",
|
||||
"ItemID": "${stock.item_code?trim?json_string}",
|
||||
"LVBranchID": "${stock.item_logistical_variant_code}",
|
||||
<#assign priority_date = stock.priority_date?datetime(rfx_date_format_default)?iso_utc />
|
||||
"PriorityDate" : "${priority_date}",
|
||||
|
||||
<#assign priority_date = stock.priority_date?datetime(rfx_date_format_default)?iso_utc />
|
||||
<#if (stock.priority_date!="") && (stock.priority_date?starts_with("00")== false) >
|
||||
"PriorityDate" : "${priority_date}",
|
||||
<#else>
|
||||
"PriorityDate": "1970-01-01T00:00:00Z",
|
||||
</#if>
|
||||
|
||||
<#-- Segmentation keys inclusion -->
|
||||
<#include "RFXtoRP_HfDtlStockLs_StockSnapshotted_SegmentationKeys.ftl">
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}<#sep>,</#sep>
|
||||
</#list>
|
||||
</#list>
|
||||
]
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<#-- *********************************************** Parameter global ******************** -->
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
<#assign organisationRP = organisation>
|
||||
<#include "HfExpGrpList.ftl">
|
||||
@@ -15,14 +15,14 @@
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign file = JsonUtil.jsonToMap(dataRfx)>
|
||||
|
||||
<#assign temp = ExpiryGroupList64>
|
||||
<#assign temp = ExpiryGroupList64>
|
||||
<#list file.expiry_group_list as expiry_group>
|
||||
<#assign temp = JsonUtil.update(temp,cloudEventMsg.action,expiry_group.exipiry_group_code,Date_Tye_Code_KV[expiry_group.priority_date_type_code])>
|
||||
</#list>
|
||||
<#assign output = JsonUtil.print(temp)>
|
||||
${output}
|
||||
${output}
|
||||
<#break>
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop>
|
||||
<#stop >
|
||||
</#switch>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<#-- *********************************************** Parameter global ******************** -->
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
<#assign organisationRP = organisation>
|
||||
|
||||
@@ -9,10 +9,12 @@
|
||||
<#case "C">
|
||||
<#case "U">
|
||||
<#case "D">
|
||||
<#stop "no generic FTL file available yet for LV types">
|
||||
|
||||
<#stop "no generic FTL file available yet for LV types">
|
||||
|
||||
<#break>
|
||||
|
||||
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
</#switch>
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
[
|
||||
{
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${carrier.carrier_code}"
|
||||
"RefID": "${carrier.carrier_code?trim?json_string}"
|
||||
},
|
||||
|
||||
|
||||
"Payload": {
|
||||
"Name": "${carrier.carrier_designation?json_string}",
|
||||
"ManagedStock": false,
|
||||
"IsCarrier": true,
|
||||
<#-- ***Partner ID could be added here *** -->
|
||||
<#-- "PartnerID": "${}", -->
|
||||
|
||||
|
||||
<#--
|
||||
<#include "RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl">,
|
||||
-->
|
||||
|
||||
|
||||
|
||||
"Address":
|
||||
{
|
||||
<#-- if Reflex WMS address is structured -->
|
||||
<#if carrier.carrier_structured_address?? >
|
||||
<#if carrier.carrier_structured_address?? >
|
||||
|
||||
"Name": "${carrier.carrier_structured_address.name_or_company?json_string}",
|
||||
"StreetAddressOne" : "${carrier.carrier_structured_address.street_and_PO?json_string}",
|
||||
"StreetAddressTwo" : "${carrier.carrier_structured_address.additionnal_data?json_string}",
|
||||
"StreetAddressTwo" : "${carrier.carrier_structured_address.additionnal_data?json_string}",
|
||||
"PostalCode" : "${carrier.carrier_structured_address.postal_code?json_string}",
|
||||
"City" : "${carrier.carrier_structured_address.post_code_area_name?json_string}",
|
||||
"CountryCode" : "${carrier.carrier_structured_address.country_code?json_string}",
|
||||
@@ -35,17 +35,20 @@
|
||||
|
||||
<#-- if Reflex WMS address is not structured -->
|
||||
<#else>
|
||||
"Name": "${carrier.address.company_name?json_string}",
|
||||
"StreetAddressOne" : "${carrier.address.address_1?json_string}",
|
||||
"StreetAddressTwo" : "${carrier.address.address_2?json_string}",
|
||||
"StreetAddressThree" : "${carrier.address.address_3?json_string}"
|
||||
</#if>
|
||||
<#if carrier.address??>
|
||||
"Name": "${carrier.address.company_name?json_string}",
|
||||
"StreetAddressOne" : "${carrier.address.address_1?json_string}",
|
||||
"StreetAddressTwo" : "${carrier.address.address_2?json_string}",
|
||||
"StreetAddressThree" : "${carrier.address.address_3?json_string}"
|
||||
</#if>
|
||||
</#if>
|
||||
},
|
||||
|
||||
"Phones": ["${carrier.address.telephone?json_string}",
|
||||
<#if carrier.address??>
|
||||
"Phones": ["${carrier.address.telephone?json_string}",
|
||||
"${carrier.address.other_number?json_string}"
|
||||
],
|
||||
</#if>
|
||||
"Typology": "TYPOLOGY_CARRIER"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
[
|
||||
{
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${carrier.carrier_code}"
|
||||
"RefID": "${carrier.carrier_code?trim?json_string}"
|
||||
},
|
||||
|
||||
|
||||
"Payload": {}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${actor.code}"
|
||||
"RefID": "${actor.code?trim?json_string}"
|
||||
},
|
||||
|
||||
"Payload": {
|
||||
@@ -17,7 +17,7 @@
|
||||
<#--
|
||||
<#include "RFXtoRP_HsaCons_ActorCreated_Metadata.ftl">,
|
||||
-->
|
||||
|
||||
|
||||
"Address":
|
||||
{
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
"Name": "${actor.consignee_structured_address.name_or_company?json_string}",
|
||||
"StreetAddressOne" : "${actor.consignee_structured_address.street_and_PO?json_string}",
|
||||
"StreetAddressTwo" : "${actor.consignee_structured_address.additionnal_data?json_string}",
|
||||
"StreetAddressTwo" : "${actor.consignee_structured_address.additionnal_data?json_string}",
|
||||
"PostalCode" : "${actor.consignee_structured_address.postal_code?json_string}",
|
||||
"City" : "${actor.consignee_structured_address.post_code_area_name?json_string}",
|
||||
"CountryCode" : "${actor.consignee_structured_address.country_code?json_string}",
|
||||
@@ -34,19 +34,21 @@
|
||||
"State": "${actor.consignee_structured_address.country_designation?json_string}"
|
||||
|
||||
<#-- if Reflex WMS is not structured -->
|
||||
<#else>
|
||||
<#else>
|
||||
<#if actor.address?? >
|
||||
|
||||
"Name": "${actor.address.company_name?json_string}",
|
||||
"StreetAddressOne" : "${actor.address.address_1?json_string}",
|
||||
"StreetAddressTwo" : "${actor.address.address_2?json_string}",
|
||||
"StreetAddressThree" : "${actor.address.address_3?json_string}"
|
||||
|
||||
</#if>
|
||||
},
|
||||
|
||||
"Phones": ["${actor.address.telephone?json_string}",
|
||||
"Name": "${actor.address.company_name?json_string}",
|
||||
"StreetAddressOne" : "${actor.address.address_1?json_string}",
|
||||
"StreetAddressTwo" : "${actor.address.address_2?json_string}",
|
||||
"StreetAddressThree" : "${actor.address.address_3?json_string}"
|
||||
</#if>
|
||||
</#if>
|
||||
},
|
||||
<#if actor.address?? >
|
||||
"Phones": ["${actor.address.telephone?json_string}",
|
||||
"${actor.address.other_number?json_string}"
|
||||
],
|
||||
],
|
||||
</#if>
|
||||
"Typology": "TYPOLOGY_UNKNOWN"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
[
|
||||
{
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${actor.code}"
|
||||
"RefID": "${actor.code?trim?json_string}"
|
||||
},
|
||||
|
||||
|
||||
"Payload": {}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
<#assign organisationRP = organisation>
|
||||
|
||||
@@ -9,66 +9,68 @@
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign reflexMvtStockInterface = JsonUtil.jsonToMap(dataRfx)>
|
||||
|
||||
<#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">
|
||||
|
||||
}
|
||||
]
|
||||
<#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 ignored quantity = 0">
|
||||
<#-- 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") && reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!="">
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsReceived>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaIpgMove_GoodsReceived.ftl">
|
||||
}
|
||||
]
|
||||
<#else>
|
||||
<#if reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!="">
|
||||
<#-- Case of IPG move type volontarilly ignored-->
|
||||
<#stop " Reference receipt is empty">
|
||||
<#else>
|
||||
<#stop>
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
<#else>
|
||||
<#-- cases of an IPG move with quantity = 0 (weight modification)-->
|
||||
<#stop>
|
||||
</#if>
|
||||
<#break>
|
||||
|
||||
|
||||
<#case "D">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#stop "event not supported - Case D ">
|
||||
<#break>
|
||||
|
||||
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
</#switch>
|
||||
|
||||
@@ -3,38 +3,42 @@
|
||||
[
|
||||
<#assign receipt_confirmation_datetime = RfxDateTimetoUTC(reflexMvtStockInterface.ipg_move_creation_datetime,time_zone_offset_rfx) />
|
||||
<#assign priority_date = reflexMvtStockInterface.ipg_priority_date?datetime(rfx_date_format_default)?iso_utc />
|
||||
{
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${reflexMvtStockInterface.hd_number}"
|
||||
},
|
||||
"RefID": "${reflexMvtStockInterface.hd_number?trim?json_string}"
|
||||
},
|
||||
"Payload": {
|
||||
"ReceivedContents" :[
|
||||
{
|
||||
"DateTime": {
|
||||
"DateTime": "${receipt_confirmation_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
},
|
||||
"Goods": {
|
||||
"ItemID": "${reflexMvtStockInterface.item_code}",
|
||||
"LVBranchID": "${reflexMvtStockInterface.lv_code}",
|
||||
"ItemID": "${reflexMvtStockInterface.item_code?trim?json_string}",
|
||||
"LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}",
|
||||
"PriorityDate": "${priority_date}",
|
||||
|
||||
|
||||
<#-- Goods received Segmentation Keys inclusion -->
|
||||
<#include "RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl">
|
||||
},
|
||||
"ExecutionflowID": "${reflexMvtStockInterface.receipt_reference}",
|
||||
"LineID": "${reflexMvtStockInterface.receipt_line_number}",
|
||||
"ActorID": "${reflexMvtStockInterface.physical_depot_code}",
|
||||
"Quantity": {
|
||||
<#if reflexMvtStockInterface.receipt_reference!="">
|
||||
"ExecutionflowID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}",
|
||||
<#else>
|
||||
"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}",
|
||||
"Value": ${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs}
|
||||
"Value": ${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
]
|
||||
|
||||
@@ -12,42 +12,46 @@
|
||||
"300":"STOCK_MOVEMENT_TYPE_REQUALIFICATION",
|
||||
"400":"STOCK_MOVEMENT_TYPE_FIX",
|
||||
"410":"STOCK_MOVEMENT_TYPE_FIX",
|
||||
"420":"STOCK_MOVEMENT_TYPE_REQUALIFICATION"}>
|
||||
"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 />
|
||||
|
||||
[
|
||||
{
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"Payload": {
|
||||
"Goods": {
|
||||
"ItemID": "${reflexMvtStockInterface.item_code}",
|
||||
"PriorityDate": "${ipg_priority_datetime}",
|
||||
|
||||
"ItemID": "${reflexMvtStockInterface.item_code?trim?json_string}",
|
||||
<#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 -->
|
||||
<#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": {
|
||||
|
||||
|
||||
"DateTime": {
|
||||
"DateTime": "${generation_date}",
|
||||
"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}",
|
||||
"Type": "${MoveType_KV[reflexMvtStockInterface.ipg_move_type]!reflexMvtStockInterface.ipg_move_type}",
|
||||
"Reason": "${reflexMvtStockInterface.miscellaneous_receipts_despatches_code}",
|
||||
"ExternalInfo" : "${reflexMvtStockInterface.stock_move_reference}",
|
||||
"Reason": "${reflexMvtStockInterface.miscellaneous_receipts_despatches_code?json_string}",
|
||||
"ExternalInfo" : "${reflexMvtStockInterface.stock_move_reference?json_string}",
|
||||
<#if reflexMvtStockInterface.ipg_move_operation_year_number!= 0>
|
||||
"OperationReference": "${reflexMvtStockInterface.ipg_move_operation_year_number} - ${reflexMvtStockInterface.ipg_move_operation_number}",
|
||||
</#if>
|
||||
|
||||
</#if>
|
||||
|
||||
"Quantity":
|
||||
{
|
||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
[
|
||||
{
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${lv.item_code}"
|
||||
"RefID": "${lv.item_code?trim?json_string}"
|
||||
},
|
||||
"Payload": {
|
||||
"RemovedLogisticVariantIDs":["${lv.logistical_variant_code}"]
|
||||
}
|
||||
"RemovedLogisticVariantIDs":["${lv.logistical_variant_code}"]
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,37 +1,37 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
[
|
||||
{
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${lv.item_code}"
|
||||
"RefID": "${lv.item_code?trim?json_string}"
|
||||
},
|
||||
"Payload": {
|
||||
"LogisticVariants": [
|
||||
{
|
||||
"LVID": "${lv.logistical_variant_code}",
|
||||
"Name" : "${lv.lv_type_code}",
|
||||
<#if lv.id_list??>
|
||||
{
|
||||
"LVID": "${lv.logistical_variant_code?json_string}",
|
||||
"Name" : "${lv.lv_type_code?json_string}",
|
||||
<#if lv.id_list??>
|
||||
"Codes": [
|
||||
<#list lv.id_list as id>
|
||||
{
|
||||
"Key": "${id.logistical_variant_ID_type_code}",
|
||||
"Value": "${id.logistical_variant_ID_code}"
|
||||
"Key": "${id.logistical_variant_ID_type_code?json_string!""}",
|
||||
"Value": "${id.logistical_variant_ID_code?json_string!""}"
|
||||
}<#sep>,</#sep>
|
||||
</#list>
|
||||
],
|
||||
</#if>
|
||||
|
||||
<#-- LV Metadata inclusion -->
|
||||
</#list>
|
||||
],
|
||||
</#if>
|
||||
|
||||
<#-- LV Metadata inclusion -->
|
||||
<#include "RFXtoRP_HsaItmLv_LogisticVariantUpdated_Metadata.ftl">,
|
||||
|
||||
|
||||
"IsBaseLogisticVariant": ${lv.base_lv},
|
||||
|
||||
|
||||
<#if lv.base_lv != "true">
|
||||
"RefLV": "${lv.subpackaging_lv_code}",
|
||||
"RefLV": "${lv.subpackaging_lv_code?json_string}",
|
||||
</#if>
|
||||
|
||||
|
||||
"QuantityInRefLV": ${lv.quantity_in_subpackaging_lv},
|
||||
|
||||
"NetWeight": {
|
||||
@@ -39,35 +39,35 @@
|
||||
"Unit": "${weight_unit_rfx}"
|
||||
},
|
||||
"GrossWeight": {
|
||||
"Value": ${lv.gross_weight},
|
||||
"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>
|
||||
|
||||
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,102 +1,104 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "HfExpGrpList.ftl">
|
||||
[
|
||||
{
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${item.item_code}"
|
||||
"RefID": "${item.item_code?trim?json_string}"
|
||||
},
|
||||
"Payload": {
|
||||
"DescriptionsByLanguage": [{
|
||||
"ShortDescription": "${item.short_designation?json_string}",
|
||||
"LongDescription": "${item.designation?json_string}",
|
||||
"TechnicalDetails": "${item.item_description?json_string}",
|
||||
"TechnicalDetails": "${item.item_description?json_string}",
|
||||
"LanguageCodeISO6391": "${text_language_rfx}"
|
||||
}
|
||||
],
|
||||
}
|
||||
],
|
||||
"ExpiryConstraint": {
|
||||
"Type": "${ExpiryGroupList[item.expiry_group_code]!"UNKNOWN_DATE"}"
|
||||
"Type": "${ExpiryGroupList[item.expiry_group_code]!"UNKNOWN_DATE"}"
|
||||
},
|
||||
|
||||
<#-- Item metadata inclusion -->
|
||||
|
||||
<#-- 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??>
|
||||
<#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??>
|
||||
|
||||
<#list item.logistical_variant_list as logistical_variant>
|
||||
{
|
||||
"LVID": "${logistical_variant.logistical_variant_code?json_string}",
|
||||
"Name" : "${logistical_variant.lv_type_code?json_string}",
|
||||
|
||||
<#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}"
|
||||
"Key": "${id.logistical_variant_ID_type_code?json_string!""}",
|
||||
"Value": "${id.logistical_variant_ID_code?json_string!""}"
|
||||
}<#sep>,</#sep>
|
||||
</#list>
|
||||
],
|
||||
</#if>
|
||||
|
||||
<#-- LV Metadata inclusion -->
|
||||
<#include "RFXtoRP_HsaItm_ItemCreated_LogisticVariantMetadata.ftl">,
|
||||
|
||||
"IsBaseLogisticVariant": ${logistical_variant.base_lv},
|
||||
|
||||
<#if logistical_variant.base_lv != "true">
|
||||
"RefLV": "${logistical_variant.subpackaging_lv_code}",
|
||||
</#list>
|
||||
],
|
||||
</#if>
|
||||
|
||||
|
||||
<#-- LV Metadata inclusion -->
|
||||
<#include "RFXtoRP_HsaItm_ItemCreated_LogisticVariantMetadata.ftl">,
|
||||
|
||||
<#if logistical_variant.base_lv?? && logistical_variant.base_lv!="">
|
||||
"IsBaseLogisticVariant": ${logistical_variant.base_lv},
|
||||
</#if>
|
||||
|
||||
<#if logistical_variant.base_lv != "true">
|
||||
"RefLV": "${logistical_variant.subpackaging_lv_code?json_string}",
|
||||
</#if>
|
||||
|
||||
"QuantityInRefLV": ${logistical_variant.quantity_in_subpackaging_lv},
|
||||
|
||||
|
||||
"NetWeight": {
|
||||
"Value": ${logistical_variant.net_weight},
|
||||
"Unit": "${weight_unit_rfx}"
|
||||
},
|
||||
"GrossWeight": {
|
||||
"Value": ${logistical_variant.gross_weight},
|
||||
"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>
|
||||
|
||||
</#if>
|
||||
|
||||
}
|
||||
<#sep>,</#sep>
|
||||
|
||||
</#list>
|
||||
]
|
||||
<#sep>,</#sep>
|
||||
|
||||
</#list>
|
||||
]
|
||||
</#if>
|
||||
<#-- End of LV loop -->
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
[
|
||||
{
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${item.item_code}"
|
||||
"RefID": "${item.item_code?trim?json_string}"
|
||||
},
|
||||
"Payload": {}
|
||||
"Payload": {}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<#-- project : projectId in ReflexPlatform -->
|
||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
<#assign organisationRP = organisation>
|
||||
|
||||
@@ -14,62 +14,62 @@
|
||||
<#case "U">
|
||||
<#-- Action = CREATE or UPDATE -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign preparationStatusInterface = JsonUtil.jsonToMap(dataRfx) />
|
||||
<#assign preparationStatusInterface = JsonUtil.jsonToMap(dataRfx) />
|
||||
[
|
||||
<#--**Pick batch runned (100) **-->
|
||||
<#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") >
|
||||
<#--**Pick batch runned (200) **-->
|
||||
<#if preparationStatusInterface.preparation_order_originator_reference?? && preparationStatusInterface.preparation_order_originator_reference!="">
|
||||
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "200" >
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationStarted>
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationExpected>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaProStatus_PreparationStarted.ftl">
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaProStatus_PreparationExpected.ftl">
|
||||
}
|
||||
<#else>
|
||||
<#-- **Preparation to package (500) and preparation completed (550)** -->
|
||||
<#if preparationStatusInterface.preparation_status_type == "100" && (preparationStatusInterface.preparation_status_code == "500" || preparationStatusInterface.preparation_status_code == "550")>
|
||||
<#-- ** 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.ExecutionflowPreparationCompleted>
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationStarted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaProStatus_PreparationCompleted.ftl">
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaProStatus_PreparationStarted.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" >
|
||||
<#-- ****Preparation dispatched (600)** -->
|
||||
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "600" >
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationCompleted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaProStatus_ExecutionflowCancelled.ftl">
|
||||
"datas" :
|
||||
<#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>
|
||||
<#stop "Reflex WMS status not supported on Reflex Platform">
|
||||
<#stop>
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
<#else>
|
||||
<#stop "PRO reference is empty">
|
||||
</#if>
|
||||
]
|
||||
]
|
||||
<#break>
|
||||
|
||||
|
||||
<#case "D">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#stop "event not supported (case D)">
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
<#assign preparation_status_datetime = RfxDateTimetoUTC(preparationStatusInterface.preparation_status_datetime,time_zone_offset_rfx) />
|
||||
|
||||
[
|
||||
{
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${preparationStatusInterface.preparation_order_originator_reference}",
|
||||
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
||||
"RefDate": {
|
||||
"DateTime": "${preparation_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
|
||||
@@ -2,19 +2,19 @@
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#assign preparation_status_datetime = RfxDateTimetoUTC(preparationStatusInterface.preparation_status_datetime,time_zone_offset_rfx) />
|
||||
[
|
||||
{
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${preparationStatusInterface.preparation_order_originator_reference}",
|
||||
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
||||
"RefDate": {
|
||||
"DateTime": "${preparation_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
"Payload": {}
|
||||
|
||||
|
||||
}
|
||||
]
|
||||
|
||||
@@ -2,19 +2,19 @@
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#assign preparation_status_datetime = RfxDateTimetoUTC(preparationStatusInterface.preparation_status_datetime,time_zone_offset_rfx) />
|
||||
[
|
||||
{
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${preparationStatusInterface.preparation_order_originator_reference}",
|
||||
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
||||
"RefDate": {
|
||||
"DateTime": "${preparation_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
"Payload": {}
|
||||
|
||||
|
||||
}
|
||||
]
|
||||
|
||||
@@ -2,19 +2,19 @@
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#assign preparation_status_datetime = RfxDateTimetoUTC(preparationStatusInterface.preparation_status_datetime,time_zone_offset_rfx) />
|
||||
[
|
||||
{
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${preparationStatusInterface.preparation_order_originator_reference}",
|
||||
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
||||
"RefDate": {
|
||||
"DateTime": "${preparation_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
"Payload": {}
|
||||
|
||||
|
||||
}
|
||||
]
|
||||
|
||||
@@ -2,19 +2,19 @@
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#assign preparation_status_datetime = RfxDateTimetoUTC(preparationStatusInterface.preparation_status_datetime,time_zone_offset_rfx) />
|
||||
[
|
||||
{
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${preparationStatusInterface.preparation_order_originator_reference}",
|
||||
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
||||
"RefDate": {
|
||||
"DateTime": "${preparation_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
"Payload": {}
|
||||
|
||||
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,50 +1,54 @@
|
||||
[
|
||||
{
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${actor.code}"
|
||||
"RefID": "${actor.code?trim?json_string}"
|
||||
},
|
||||
|
||||
|
||||
"Payload": {
|
||||
"Name": "${actor.designation?json_string}",
|
||||
"ManagedStock": false,
|
||||
"IsCarrier": false,
|
||||
"IsCarrier": false,
|
||||
<#-- ***Partner ID could be added here *** -->
|
||||
<#-- "PartnerID": "${}", -->
|
||||
|
||||
|
||||
<#--
|
||||
<#include "RFXtoRP_HsaSup_ActorCreated_Metadata.ftl">,
|
||||
-->
|
||||
|
||||
|
||||
"Address":
|
||||
{
|
||||
<#-- if Reflex WMS address is structured -->
|
||||
<#if actor.supplier_structured_address?? >
|
||||
<#if actor.supplier_structured_address?? >
|
||||
|
||||
"Name": "${actor.supplier_structured_address.name_or_company?json_string}",
|
||||
"StreetAddressOne" : "${actor.supplier_structured_address.street_and_PO?json_string}",
|
||||
"StreetAddressTwo" : "${actor.supplier_structured_address.additionnal_data?json_string}",
|
||||
"StreetAddressTwo" : "${actor.supplier_structured_address.additionnal_data?json_string}",
|
||||
"PostalCode" : "${actor.supplier_structured_address.postal_code?json_string}",
|
||||
"City" : "${actor.supplier_structured_address.post_code_area_name?json_string}",
|
||||
"CountryCode" : "${actor.supplier_structured_address.country_code?json_string}",
|
||||
"ProvinceCode": "${actor.supplier_structured_address.territorial_div_code?json_string}",
|
||||
"State": "${actor.supplier_structured_address.country_designation?json_string}"
|
||||
|
||||
|
||||
<#-- if Reflex WMS address is not structured -->
|
||||
<#else>
|
||||
"Name": "${actor.optional_attributes.company_name?json_string}",
|
||||
"StreetAddressOne" : "${actor.optional_attributes.address_1?json_string}",
|
||||
"StreetAddressTwo" : "${actor.optional_attributes.address_2?json_string}",
|
||||
"StreetAddressThree" : "${actor.optional_attributes.address_3?json_string}"
|
||||
<#if actor.optional_attributes?? >
|
||||
"Name": "${actor.optional_attributes.company_name?json_string}",
|
||||
"StreetAddressOne" : "${actor.optional_attributes.address_1?json_string}",
|
||||
"StreetAddressTwo" : "${actor.optional_attributes.address_2?json_string}",
|
||||
"StreetAddressThree" : "${actor.optional_attributes.address_3?json_string}"
|
||||
</#if>
|
||||
</#if>
|
||||
|
||||
|
||||
},
|
||||
"Phones": ["${actor.optional_attributes.telephone?json_string}",
|
||||
"${actor.optional_attributes.other_number?json_string}"
|
||||
],
|
||||
<#if actor.optional_attributes?? >
|
||||
"Phones": ["${actor.optional_attributes.telephone?json_string}",
|
||||
"${actor.optional_attributes.other_number?json_string}"
|
||||
],
|
||||
</#if>
|
||||
"Typology": "TYPOLOGY_UNKNOWN"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
[
|
||||
{
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${actor.code}"
|
||||
"RefID": "${actor.code?trim?json_string}"
|
||||
},
|
||||
|
||||
|
||||
"Payload": {}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,37 +1,37 @@
|
||||
[
|
||||
{
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${depot.physical_depot_code}"
|
||||
"RefID": "${depot.physical_depot_code?trim?json_string}"
|
||||
},
|
||||
|
||||
|
||||
"Payload": {
|
||||
"Name": "${depot.physical_depot_designation?json_string}",
|
||||
"ManagedStock": true,
|
||||
"IsCarrier": false,
|
||||
<#-- ***Partner ID could be added here *** -->
|
||||
<#-- "PartnerID": "${}", -->
|
||||
|
||||
|
||||
<#--
|
||||
<#include "RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl">,
|
||||
-->
|
||||
|
||||
|
||||
"Address":
|
||||
{
|
||||
<#-- if Reflex WMS address is structured -->
|
||||
<#if depot.physical_depot_structured_address?? >
|
||||
<#if depot.physical_depot_structured_address?? >
|
||||
|
||||
"Name": "${depot.physical_depot_structured_address.name_or_company?json_string}",
|
||||
"StreetAddressOne" : "${depot.physical_depot_structured_address.street_and_PO?json_string}",
|
||||
"StreetAddressTwo" : "${depot.physical_depot_structured_address.additionnal_data?json_string}",
|
||||
"StreetAddressTwo" : "${depot.physical_depot_structured_address.additionnal_data?json_string}",
|
||||
"PostalCode" : "${depot.physical_depot_structured_address.postal_code?json_string}",
|
||||
"City" : "${depot.physical_depot_structured_address.post_code_area_name?json_string}",
|
||||
"CountryCode" : "${depot.physical_depot_structured_address.country_code?json_string}",
|
||||
"ProvinceCode": "${depot.physical_depot_structured_address.territorial_div_code?json_string}",
|
||||
"State": "${depot.physical_depot_structured_address.country_designation?json_string}"
|
||||
|
||||
|
||||
<#-- if Reflex WMS address is not structured -->
|
||||
<#else>
|
||||
"Name": "${depot.physical_depot_address.company_name?json_string}",
|
||||
@@ -39,12 +39,12 @@
|
||||
"StreetAddressTwo" : "${depot.physical_depot_address.address_2?json_string}",
|
||||
"StreetAddressThree" : "${depot.physical_depot_address.address_3?json_string}"
|
||||
</#if>
|
||||
|
||||
|
||||
},
|
||||
"Phones": ["${depot.physical_depot_address.telephone?json_string}",
|
||||
"Phones": ["${depot.physical_depot_address.telephone?json_string}",
|
||||
"${depot.physical_depot_address.other_number?json_string}"
|
||||
],
|
||||
"Typology": "TYPOLOGY_UNKNOWN"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
[
|
||||
{
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${depot.physical_depot_code}"
|
||||
"RefID": "${depot.physical_depot_code?trim?json_string}"
|
||||
},
|
||||
|
||||
|
||||
"Payload": {}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -2,57 +2,92 @@
|
||||
<#-- input : message RFX -->
|
||||
<#-- project : projectId in ReflexPlatform -->
|
||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
<#assign organisationRP = organisation>
|
||||
|
||||
<#assign aDateTime = .now>
|
||||
|
||||
<#switch cloudEventMsg.action>
|
||||
<#case "C">
|
||||
<#--<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign 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">
|
||||
}
|
||||
|
||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list??) as preparation_line>
|
||||
<#case "C">
|
||||
<#--<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign preparationOrder = JsonUtil.jsonToMap(dataRfx)>
|
||||
|
||||
<#if preparationOrder.total_lv_validated !=0>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsPrepared>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl">
|
||||
},
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl">
|
||||
}
|
||||
|
||||
<#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>
|
||||
<#if despatched_ipg.consignment_unit_id != "">
|
||||
,
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl">
|
||||
}
|
||||
</#if>
|
||||
|
||||
<#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>
|
||||
]
|
||||
<#break>
|
||||
|
||||
<#case "D">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#stop "event not supported (Case D)">
|
||||
<#break>
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
</#switch>
|
||||
]
|
||||
<#else>
|
||||
<#stop "no confirmed quantity for the preparation - preparation closed">
|
||||
</#if>
|
||||
|
||||
|
||||
<#break>
|
||||
<#case "D">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#stop "event not supported (Case D)">
|
||||
<#break>
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
</#switch>
|
||||
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,85 +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 = 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>
|
||||
]
|
||||
25
RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl
Normal file
25
RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl
Normal file
@@ -0,0 +1,25 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ReflexUtils.ftl">
|
||||
[
|
||||
<#assign dispatched3_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_line3>
|
||||
<#list preparation_line3.despatched_ipg_list?filter(j ->j.carton_number!="000000000000000000") as despatched_ipg3>
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${despatched_ipg3.carton_number}",
|
||||
"RefDate": {
|
||||
"DateTime": "${dispatched3_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
"Payload": { }
|
||||
}<#sep>,</#sep>
|
||||
</#list>
|
||||
<#if preparation_line3.despatched_ipg_list?filter(j ->j.carton_number!="000000000000000000")?size!=0 >
|
||||
<#sep>,</#sep>
|
||||
</#if>
|
||||
</#list>
|
||||
]
|
||||
@@ -2,26 +2,22 @@
|
||||
<#include "ReflexUtils.ftl">
|
||||
[
|
||||
<#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>
|
||||
{
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
<#if despatched_ipg.carton_number != "000000000000000000">
|
||||
"RefID": "${despatched_ipg.carton_number}",
|
||||
<#else>
|
||||
"RefID": "${despatched_ipg.hd_number}",
|
||||
</#if>
|
||||
"RefDate": {
|
||||
"DateTime": "${dispatched_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
"Payload": { }
|
||||
}<#sep>,</#sep>
|
||||
</#list>
|
||||
<#sep>,</#sep>
|
||||
</#list>
|
||||
</#list>
|
||||
]
|
||||
|
||||
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_line2>
|
||||
<#list preparation_line2.despatched_ipg_list as despatched_ipg2>
|
||||
<#assign packing_datetime = RfxDateTimetoUTC(preparation_line2.confirmation_datetime,time_zone_offset_rfx) />
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefDate": {
|
||||
"AuthorTimeZone": "${time_zone_rfx}",
|
||||
"DateTime": "${packing_datetime}"
|
||||
},
|
||||
<#if despatched_ipg2.carton_number != "000000000000000000">
|
||||
"RefID": "${despatched_ipg2.carton_number}"
|
||||
<#else>
|
||||
"RefID": "${despatched_ipg2.hd_number}"
|
||||
</#if>
|
||||
},
|
||||
|
||||
"Payload": {
|
||||
"Information" :{
|
||||
<#if despatched_ipg2.carton_number != "000000000000000000">
|
||||
"ContainerType": "${despatched_ipg2.carton_type_code}"
|
||||
<#if preparation_line2.despatched_cartons_list?? >
|
||||
<#list preparation_line2.despatched_cartons_list?filter(l ->l.carton_number==despatched_ipg2.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_ipg2.hd_type_code?json_string}"
|
||||
<#if preparation_line2.despatched_hds_list??>
|
||||
<#list preparation_line2.despatched_hds_list?filter(j ->j.handling_device_number==despatched_ipg2.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_line2.item_code?trim?json_string}",
|
||||
"LVBranchID": "${preparation_line2.item_lv_code?json_string}",
|
||||
<#if (despatched_ipg2.ipg_manufacture_date?length != 0) && (despatched_ipg2.ipg_manufacture_date?starts_with("00") == false)>
|
||||
<#assign priority_date = despatched_ipg2.ipg_manufacture_date?datetime(rfx_date_format_default)?iso_utc />
|
||||
"PriorityDate": "${priority_date}",
|
||||
<#else>
|
||||
<#if (despatched_ipg2.ipg_receipt_date?length != 0) && (despatched_ipg2.ipg_receipt_date?starts_with("00")== false)>
|
||||
<#assign priority_date = despatched_ipg2.ipg_receipt_date?datetime(rfx_date_format_default)?iso_utc />
|
||||
"PriorityDate": "${priority_date}",
|
||||
<#else>
|
||||
<#if (despatched_ipg2.ipg_best_before_date?length != 0) && (despatched_ipg2.ipg_best_before_date?starts_with("00")== false)>
|
||||
<#assign priority_date = despatched_ipg2.ipg_best_before_date?datetime(rfx_date_format_default)?iso_utc />
|
||||
"PriorityDate": "${priority_date}",
|
||||
<#else>
|
||||
<#if (despatched_ipg2.ipg_sell_by_date?length != 0) && (despatched_ipg2.ipg_sell_by_date?starts_with("00")== false)>
|
||||
<#assign priority_date = despatched_ipg2.ipg_sell_by_date?datetime(rfx_date_format_default)?iso_utc />
|
||||
"PriorityDate": "${priority_date}",
|
||||
<#else>
|
||||
<#if (despatched_ipg2.ipg_use_by_date?length != 0) && (despatched_ipg2.ipg_use_by_date?starts_with("00")== false)>
|
||||
<#assign priority_date = despatched_ipg2.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_line2.preparation_order_originator_reference?trim?json_string}",
|
||||
<#if (preparation_line2.pro_originator_reference_line_number!0) != 0>
|
||||
"LineID": "${preparation_line2.pro_originator_reference_line_number}",
|
||||
<#else>
|
||||
"LineID": "${preparation_line2.pro_line_number!0}",
|
||||
</#if>
|
||||
"ActorID": "${preparationOrder.physical_depot_code?trim?json_string}",
|
||||
"Quantity": {
|
||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||
"Value": ${despatched_ipg2.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?? >
|
||||
,
|
||||
"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>
|
||||
]
|
||||
@@ -1,20 +1,27 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ReflexUtils.ftl">
|
||||
[
|
||||
|
||||
{
|
||||
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${despatched_ipg.consignment_unit_id}"
|
||||
"RefID": "${despatched_ipg.consignment_unit_id?trim?json_string}"
|
||||
},
|
||||
"Payload": {
|
||||
<#if despatched_ipg.carton_number != "000000000000000000">
|
||||
<#if despatched_ipg.carton_number != "000000000000000000">
|
||||
"HandlingunitID": "${despatched_ipg.carton_number}"
|
||||
<#else>
|
||||
"HandlingunitID": "${despatched_ipg.hd_number}"
|
||||
</#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>
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
@@ -3,7 +3,7 @@
|
||||
<#-- project : projectId in ReflexPlatform -->
|
||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
<#assign organisationRP = organisation>
|
||||
|
||||
@@ -14,45 +14,54 @@
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign order = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
<#assign preparation_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">
|
||||
|
||||
<#-- Only if preparation order not confirmed -->
|
||||
<#if order.preparation_order_confirmed == "false" >
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl">
|
||||
<#else>
|
||||
<#stop "preparation order already confirmed">
|
||||
</#if>
|
||||
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
|
||||
<#-- check preparation type code (internal order and reservation are ignored) -->
|
||||
<#if preparation_order.preparation_type_code == "010" || preparation_order.preparation_type_code == "030">
|
||||
<#-- Only if preparation order not confirmed -->
|
||||
<#if preparation_order.preparation_order_confirmed == "false" >
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl">
|
||||
<#else>
|
||||
<#stop "preparation order already confirmed">
|
||||
</#if>
|
||||
|
||||
<#else>
|
||||
<#stop "preparation order type not supported">
|
||||
</#if>
|
||||
<#else>
|
||||
<#stop "preparation order type not supported">
|
||||
</#if>
|
||||
<#stop "PRO reference is empty">
|
||||
</#if>
|
||||
}
|
||||
|
||||
]
|
||||
|
||||
]
|
||||
<#break>
|
||||
|
||||
|
||||
<#case "D">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign order = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPro_ExecutionflowCancelled.ftl">
|
||||
}
|
||||
]
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPro_ExecutionflowCancelled.ftl">
|
||||
}
|
||||
<#else>
|
||||
<#stop "PRO reference is empty">
|
||||
</#if>
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
|
||||
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
</#switch>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#assign preparation_status_datetime = RfxDateTimetoUTC(order.modification_datetime,time_zone_offset_rfx) />
|
||||
<#assign preparation_status_datetime = RfxDateTimetoUTC(preparation_order.modification_datetime,time_zone_offset_rfx) />
|
||||
[
|
||||
{
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${order.originator_reference}",
|
||||
"RefID": "${preparation_order.originator_reference?trim?json_string}",
|
||||
"RefDate": {
|
||||
"DateTime": "${preparation_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
|
||||
@@ -1,105 +1,124 @@
|
||||
<#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) />
|
||||
{
|
||||
<#assign planned_final_delivery_start_datetime = RfxDateTimetoUTC(preparation_order.planned_final_delivery_start_datetime,time_zone_offset_rfx) />
|
||||
<#assign pro_creation_datetime = RfxDateTimetoUTC(preparation_order.creation_datetime,time_zone_offset_rfx) />
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${order.originator_reference}",
|
||||
"RefID": "${preparation_order.originator_reference?trim?json_string}",
|
||||
"RefDate": {
|
||||
"DateTime": "${pro_creation_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
"Payload": {
|
||||
"CreationDateTime": {
|
||||
"DateTime": "${pro_creation_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
},
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
},
|
||||
<#-- Header Metadata inclusion -->
|
||||
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_HeaderMetadata.ftl">,
|
||||
|
||||
"ShipFrom": {
|
||||
"ActorID": "${order.physical_depot_code}"
|
||||
<#-- Add transport grade code
|
||||
<#if preparation_order.transport_grade_code!="">
|
||||
"CarrierService":"${preparation_order.transport_grade_code?trim?json_string}",
|
||||
</#if> -->
|
||||
"ShipFrom": {
|
||||
"ActorID": "${preparation_order.physical_depot_code?trim?json_string}"
|
||||
},
|
||||
"ShipFromAcked": true,
|
||||
"ShipFromAcked": true,
|
||||
"ShipTo": {
|
||||
<#if order.address.type_code == "" && order.address.title_code == "" && order.address.first_name == "" && order.address.last_name == "" && order.address.mail_address == "" && order.address.contact_type_code == "" && order.address.mobile_phone_number == "" && order.address.land_line_phone_number == "" && order.address.fax_number == "" && order.address.address_type_code == "" && order.address.name_or_company_name == "" && order.address.additional_address_data_1 == "" && order.address.additional_address_data_2 == "" && order.address.post_code_area_name == "" && order.address.territorial_division_code == "" && order.address.postal_code == "" && order.address.iso_country_code == "">
|
||||
"ActorID": "${order.end_consignee_code}"
|
||||
<#else>
|
||||
"Actor":
|
||||
{
|
||||
"Name" : "${order.address.name_or_company_name!""}",
|
||||
<#if
|
||||
<#-- preparation_order.address.type_code == "" &&
|
||||
preparation_order.address.title_code == "" &&
|
||||
preparation_order.address.first_name == "" &&
|
||||
preparation_order.address.last_name == "" &&
|
||||
preparation_order.address.mail_address == "" &&
|
||||
preparation_order.address.contact_type_code == "" &&
|
||||
preparation_order.address.mobile_phone_number == "" &&
|
||||
preparation_order.address.land_line_phone_number == "" &&
|
||||
preparation_order.address.fax_number == "" && -->
|
||||
preparation_order.address.address_type_code == "" &&
|
||||
preparation_order.address.name_or_company_name == "" &&
|
||||
preparation_order.address.additional_address_data_1 == "" &&
|
||||
preparation_order.address.additional_address_data_2 == "" &&
|
||||
preparation_order.address.post_code_area_name == "" &&
|
||||
preparation_order.address.territorial_division_code == "" &&
|
||||
preparation_order.address.postal_code == "" &&
|
||||
preparation_order.address.iso_country_code == "">
|
||||
"ActorID": "${preparation_order.end_consignee_code}"
|
||||
<#else>
|
||||
"Actor":
|
||||
{
|
||||
"Name" : "${preparation_order.address.name_or_company_name?json_string!""}",
|
||||
"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!""}"
|
||||
"City" : "${preparation_order.address.post_code_area_name?json_string!""}",
|
||||
"CountryCode" : "${preparation_order.address.iso_country_code!""}",
|
||||
"PostalCode" : "${preparation_order.address.postal_code!""}",
|
||||
"StreetAddressOne" : "${preparation_order.address.street_and_number_and_po_box?json_string!""}",
|
||||
"StreetAddressTwo" : "${preparation_order.address.additional_address_data_1?json_string!""}",
|
||||
"StreetAddressThree" : "${preparation_order.address.additional_address_data_2?json_string!""}"
|
||||
}
|
||||
},
|
||||
"Contact" :
|
||||
{
|
||||
"FirstName" : "${order.address.first_name!""}",
|
||||
"LastName" : "${order.address.last_name!""}",
|
||||
"Emails" : ["${order.address.mail_address!""}"],
|
||||
"Phones" : ["${order.address.mobile_phone_number!""}","${order.address.land_line_phone_number!""}", "${order.address.fax_number!""}" ]
|
||||
}
|
||||
|
||||
</#if>
|
||||
"FirstName" : "${preparation_order.address.first_name?json_string!""}",
|
||||
"LastName" : "${preparation_order.address.last_name?json_string!""}",
|
||||
"Emails" : ${splitEmailsIntoArray(preparation_order.address.mail_address!""?json_string)},
|
||||
"Phones" : ["${preparation_order.address.mobile_phone_number?json_string!""}","${preparation_order.address.land_line_phone_number?json_string!""}", "${preparation_order.address.fax_number?json_string!""}" ]
|
||||
}
|
||||
</#if>
|
||||
},
|
||||
|
||||
<#if order.line_list??>
|
||||
|
||||
<#if preparation_order.line_list??>
|
||||
"Lines" : [
|
||||
<#list order.line_list as line>
|
||||
{
|
||||
<#if (line.originator_reference_line_number!0) != 0>
|
||||
"LineID": "${line.originator_reference_line_number}",
|
||||
<#list preparation_order.line_list as preparation_order_line >
|
||||
{
|
||||
<#if (preparation_order_line.originator_reference_line_number!0) != 0>
|
||||
"LineID": "${preparation_order_line.originator_reference_line_number}",
|
||||
<#else>
|
||||
"LineID": "${line.preparation_order_line_number!0}",
|
||||
"LineID": "${preparation_order_line.preparation_order_line_number!0}",
|
||||
</#if>
|
||||
<#-- Line Metadata inclusion -->
|
||||
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_LineMetadata.ftl">,
|
||||
|
||||
"RequestedContent":
|
||||
{
|
||||
"Goods":
|
||||
|
||||
"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}",
|
||||
"ItemID": "${preparation_order_line.item_code?trim?json_string!"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)>
|
||||
<#assign forced_priority_date = preparation_order_line.optional_attributes.forced_priority_date?datetime(rfx_date_format_default)?iso_utc />
|
||||
"PriorityDate": "${forced_priority_date}",
|
||||
</#if>
|
||||
|
||||
|
||||
<#-- Segmentation Keys inclusion -->
|
||||
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_SegmentationKeys.ftl">
|
||||
|
||||
|
||||
},
|
||||
"Quantity" :
|
||||
"Quantity" :
|
||||
{
|
||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||
"Value": "${line.base_lv_quantity_to_prepare!0}"
|
||||
"Value": "${preparation_order_line.base_lv_quantity_to_prepare!0}"
|
||||
}
|
||||
}
|
||||
}<#sep>,</#sep>
|
||||
</#list>
|
||||
</#list>
|
||||
],
|
||||
</#if>
|
||||
|
||||
|
||||
"RequestedMilestones" :
|
||||
{
|
||||
"RequestedDeliveryDateTime" :
|
||||
"RequestedDeliveryDateTime" :
|
||||
{
|
||||
"DateTime": "${planned_final_delivery_start_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
}
|
||||
"DateTime": "${planned_final_delivery_start_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"MetaData": [
|
||||
{
|
||||
"Key": "OrderType",
|
||||
"Value": { "String" : "${order.optional_attributes.reason_code}"}
|
||||
"Value": { "String" : "${preparation_order.optional_attributes.reason_code}"}
|
||||
}
|
||||
],
|
||||
-->
|
||||
|
||||
@@ -4,18 +4,18 @@
|
||||
"SegmentationKeys": [
|
||||
{
|
||||
"Key": "Grade",
|
||||
"Value": { "String" : "${line.grade_code_to_prepare}"}
|
||||
"Value": { "String" : "${preparation_order_line.grade_code_to_prepare}"}
|
||||
},
|
||||
{
|
||||
"Key": "Owner",
|
||||
"Value": { "String" : "${line.owner_code_to_prepare}"}
|
||||
"Value": { "String" : "${preparation_order_line.owner_code_to_prepare}"}
|
||||
},
|
||||
{
|
||||
"Key": "BatchNumber",
|
||||
<#if reflexMvtStockInterface.batch_1 == "">
|
||||
"Value": { "String" : "no batch"}
|
||||
<#else>
|
||||
"Value": { "String" : "${line.batch_1}"}
|
||||
"Value": { "String" : "${preparation_order_line.batch_1}"}
|
||||
</#if>
|
||||
}
|
||||
]
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<#-- project : projectId in ReflexPlatform -->
|
||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
<#assign organisationRP = organisation>
|
||||
|
||||
@@ -12,82 +12,91 @@
|
||||
<#switch cloudEventMsg.action>
|
||||
<#case "C">
|
||||
<#-- *********************************************** Action = CREATE ******************** -->
|
||||
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
||||
|
||||
<#if receipt.receipt_type = "030">
|
||||
<#stop "ignored message because receipt type = transfert">
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#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">
|
||||
|
||||
},
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
|
||||
|
||||
}
|
||||
]
|
||||
</#if>
|
||||
<#else>
|
||||
[
|
||||
{
|
||||
<#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>
|
||||
<#stop "Receipt reference is empty">
|
||||
</#if>
|
||||
<#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>
|
||||
<#if receipt.receipt_type = "030">
|
||||
<#stop "ignored message because receipt type = transfert">
|
||||
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
||||
<#if receipt.receipt_confirmed == "true" >
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl">
|
||||
}
|
||||
<#else>
|
||||
{
|
||||
<#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 receipt.receipt_type = "030">
|
||||
<#stop "ignored message because receipt type = transfert">
|
||||
<#else>
|
||||
{
|
||||
<#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>
|
||||
</#if>
|
||||
<#else>
|
||||
<#stop "Receipt reference is empty">
|
||||
</#if>
|
||||
</#if>
|
||||
]
|
||||
]
|
||||
<#break>
|
||||
|
||||
|
||||
<#case "D">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#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>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl">
|
||||
|
||||
}
|
||||
]
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl">
|
||||
}
|
||||
<#else>
|
||||
<#stop "Receipt reference is empty">
|
||||
</#if>
|
||||
]
|
||||
<#break>
|
||||
|
||||
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
</#switch>
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
<#assign receipt_status_datetime = RfxDateTimetoUTC(receipt.modification_datetime,time_zone_offset_rfx) />
|
||||
|
||||
[
|
||||
{
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${receipt.receipt_reference}",
|
||||
"RefID": "${receipt.receipt_reference?trim?json_string}",
|
||||
"RefDate": {
|
||||
"DateTime": "${receipt_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
|
||||
@@ -1,87 +1,87 @@
|
||||
<#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) />
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${receipt.receipt_reference}",
|
||||
"RefID": "${receipt.receipt_reference?trim?json_string}",
|
||||
"RefDate": {
|
||||
"DateTime": "${receipt_creation_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
"Payload": {
|
||||
"CreationDateTime": {
|
||||
"DateTime": "${receipt_creation_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
},
|
||||
|
||||
},
|
||||
|
||||
<#-- Header Metadata inclusion -->
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl">,
|
||||
|
||||
"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 != "">
|
||||
"Carrier" : {"ActorID": "${receipt.carrier_informations.carrier_code}"},
|
||||
</#if>
|
||||
|
||||
|
||||
<#if receipt.line_list??>
|
||||
"Carrier" : {"ActorID": "${receipt.carrier_informations.carrier_code?trim?json_string}"},
|
||||
</#if>
|
||||
|
||||
|
||||
<#if receipt.line_list??>
|
||||
"Lines" : [
|
||||
<#list receipt.line_list as line>
|
||||
{
|
||||
"LineID": "${line.receipt_line_number}",
|
||||
<#-- Line Metadata inclusion -->
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl">,
|
||||
"RequestedContent":
|
||||
{
|
||||
"Goods":
|
||||
"RequestedContent":
|
||||
{
|
||||
"Goods":
|
||||
{
|
||||
"ItemID": "${line.item_code!"0"}",
|
||||
"LVBranchID": "${line.item_lv_code!"0"}",
|
||||
<#if line.line_without_detail??>
|
||||
"ItemID": "${line.item_code?trim?json_string!"0"}",
|
||||
"LVBranchID": "${line.item_lv_code?json_string!"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}",
|
||||
<#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>
|
||||
<#else>
|
||||
<#stop "line with detail">
|
||||
<#stop >
|
||||
</#if>
|
||||
<#-- Segmentation Keys inclusion -->
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl">
|
||||
},
|
||||
"Quantity" :
|
||||
"Quantity" :
|
||||
{
|
||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||
"Value": "${line.order_quantity_in_lv!0}"
|
||||
"Value": "${line.order_quantity_in_lv!0}"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
<#sep>,</#sep>
|
||||
</#list>
|
||||
</#list>
|
||||
],
|
||||
</#if>
|
||||
|
||||
|
||||
"RequestedMilestones" :
|
||||
{
|
||||
"RequestedDeliveryDateTime" :
|
||||
"RequestedDeliveryDateTime" :
|
||||
{
|
||||
"DateTime": "${receipt_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
"DateTime": "${receipt_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#assign receipt_status_datetime = RfxDateTimetoUTC(receipt.confirmation_datetime,time_zone_offset_rfx) />
|
||||
[
|
||||
{
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${receipt.receipt_reference}",
|
||||
"RefID": "${receipt.receipt_reference?trim?json_string}",
|
||||
"RefDate": {
|
||||
"DateTime": "${receipt_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
@@ -3,19 +3,19 @@
|
||||
<#assign receipt_status_datetime = RfxDateTimetoUTC(receipt.creation_datetime,time_zone_offset_rfx) />
|
||||
|
||||
[
|
||||
{
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${receipt.receipt_reference}",
|
||||
"RefID": "${receipt.receipt_reference?trim?json_string}",
|
||||
"RefDate": {
|
||||
"DateTime": "${receipt_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
"Payload": {}
|
||||
|
||||
|
||||
}
|
||||
]
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
[
|
||||
<#assign UUID = UUID.randomUUID()>
|
||||
<#assign strJsonBody = JsonUtil.espaceQuoteInJsonString(restResponseBody)>
|
||||
{
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${UUID}",
|
||||
@@ -12,7 +12,7 @@
|
||||
"DateTime": "${aDateTime?iso_utc}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
},
|
||||
"Payload": {
|
||||
<#assign severity = SeverityLevel.ERROR>
|
||||
"Severity": "${severity}",
|
||||
@@ -35,7 +35,7 @@
|
||||
"ContextPayload": "rfxresponse",
|
||||
"Type": "RP_EXECUTIONFLOW_EVENT",
|
||||
"Task": "${id.apiRestReflexID}",
|
||||
"OriginalID": "${id.refid}",
|
||||
"OriginalID": "${id.refid?trim?json_string}",
|
||||
"StackTrace": ""
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
[
|
||||
{
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${id.refid}"
|
||||
},
|
||||
|
||||
|
||||
"Payload": {
|
||||
"ShipFromAcked": true
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
]
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<#-- project : projectId in ReflexPlatform -->
|
||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||
|
||||
<#assign restResponsetMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign id = JsonUtil.jsonToMap(restResponsetMsg.id)>
|
||||
<#assign restResponsetMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign id = JsonUtil.jsonToMap(restResponsetMsg.id)>
|
||||
<#assign projectRP = project>
|
||||
<#assign organisationRP = organisation>
|
||||
|
||||
@@ -18,83 +18,115 @@
|
||||
<#case 201>
|
||||
<#-- *********************************************** ApiRestID = preparation_orders_post ******************** -->
|
||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||
<#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)>
|
||||
<#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" >
|
||||
[
|
||||
<#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)>
|
||||
<#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" >
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipFromAcked>
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipFromAcked>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_PrepOrder_ShipFromAcked.ftl">
|
||||
"datas" :
|
||||
<#include "RFXtoRP_PrepOrder_ShipFromAcked.ftl">
|
||||
}
|
||||
]
|
||||
<#else>
|
||||
[
|
||||
<#else>
|
||||
[
|
||||
{
|
||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||
"datas" :
|
||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||
},
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
||||
}
|
||||
]
|
||||
]
|
||||
</#if>
|
||||
<#break>
|
||||
<#break>
|
||||
<#default>
|
||||
[
|
||||
[
|
||||
{
|
||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||
<#if restResponsetMsg.body?? >
|
||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||
<#else>
|
||||
<#assign restResponseBody = "{}" />
|
||||
</#if>
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||
"datas" :
|
||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||
},
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
||||
}
|
||||
]
|
||||
</#switch>
|
||||
]
|
||||
</#switch>
|
||||
<#break>
|
||||
|
||||
|
||||
<#case "receipts_post">
|
||||
<#switch restResponsetMsg.status>
|
||||
<#case 200>
|
||||
<#case 201>
|
||||
<#-- *********************************************** ApiRestID = preparation_orders_post ******************** -->
|
||||
<#-- *********************************************** ApiRestID = receipts_post ******************** -->
|
||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||
<#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)>
|
||||
<#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" >
|
||||
[
|
||||
<#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)>
|
||||
<#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" >
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipToAcked>
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipToAcked>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_Receipt_ShipToAcked.ftl">
|
||||
"datas" :
|
||||
<#include "RFXtoRP_Receipt_ShipToAcked.ftl">
|
||||
}
|
||||
]
|
||||
<#else>
|
||||
[
|
||||
]
|
||||
<#else>
|
||||
[
|
||||
{
|
||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||
}
|
||||
]
|
||||
|
||||
"datas" :
|
||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||
},
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
||||
}
|
||||
]
|
||||
|
||||
</#if>
|
||||
<#break>
|
||||
<#default>
|
||||
[
|
||||
[
|
||||
{
|
||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||
<#if restResponsetMsg.body?? >
|
||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||
<#else>
|
||||
<#assign restResponseBody = "{}" />
|
||||
</#if>
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||
"datas" :
|
||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||
},
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
||||
}
|
||||
]
|
||||
</#switch>
|
||||
]
|
||||
</#switch>
|
||||
<#break>
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop>
|
||||
</#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 -->
|
||||
<#-- project : projectId in ReflexPlatform -->
|
||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ReflexUtils.ftl">
|
||||
|
||||
<#assign eventRP = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
<#include "RPtoRFX_PrepOrder_DefaultHeaderData.ftl">
|
||||
|
||||
<#assign aDateTime = .now>
|
||||
|
||||
|
||||
{
|
||||
"id" : {"refid" : "${executionflow.OrderID}"},
|
||||
"route" : "rest/public/v1/activities/{activity_code}/physical_depots/{physical_depot_code}/originators/{originator_code}/preparation_orders",
|
||||
@@ -18,9 +15,9 @@
|
||||
"preparation_type_code": "${preparation_type_code}",
|
||||
"end_consignee_code": "${executionflow.ShipTo.ActorID!""}",
|
||||
<#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>
|
||||
"requested_delivery_start_datetime": "${aDateTime?iso_utc}",
|
||||
"requested_delivery_start_datetime": "${DateTimeUTCtoRfxLocale(.now?iso_utc?string,time_zone_rfx)}",
|
||||
</#if>
|
||||
"requested_delivery_date_type": "${requested_delivery_date_type}",
|
||||
"consolidated_delivery": "${consolidated_delivery_flag}",
|
||||
@@ -28,6 +25,7 @@
|
||||
"intermediate_consignee": "false",
|
||||
"protected": "${protected_flag}",
|
||||
"automatic_generation": "${automatic_generation_flag}",
|
||||
"deactivate": "false",
|
||||
"optional_attributes": {
|
||||
"apt_with_end_consignee": "${apt_with_end_consignee_flag}",
|
||||
"apt_with_intermediate": "false",
|
||||
@@ -35,13 +33,13 @@
|
||||
},
|
||||
<#if executionflow.ShipTo.ActorID == "">
|
||||
"address": {
|
||||
"first_name": "${executionflow.ShipTo.Contact.FirstName!""}",
|
||||
"last_name" :"${executionflow.ShipTo.Contact.Lastname!""}",
|
||||
"first_name": "${executionflow.ShipTo.Contact.FirstName!""?json_string}",
|
||||
"last_name" :"${executionflow.ShipTo.Contact.Lastname!""?json_string}",
|
||||
"mail_address": "${executionflow.ShipTo.Actor.Emails[0]!""}",
|
||||
"mobile_phone_number": "${executionflow.ShipTo.Actor.Phones[0]!""}",
|
||||
"street_and_number_and_po_box": "${executionflow.ShipTo.Actor.Address.StreetAddressOne?json_string!""}",
|
||||
"additional_address_data_1": "${executionflow.ShipTo.Actor.Address.StreetAddressTwo?json_string!""}",
|
||||
"additional_address_data_2": "${executionflow.ShipTo.Actor.Address.StreetAddressThree?json_string!""}",
|
||||
"street_and_number_and_po_box": "${executionflow.ShipTo.Actor.Address.StreetAddressOne!""?json_string}",
|
||||
"additional_address_data_1": "${executionflow.ShipTo.Actor.Address.StreetAddressTwo!""?json_string}",
|
||||
"additional_address_data_2": "${executionflow.ShipTo.Actor.Address.StreetAddressThree!""?json_string}",
|
||||
"postal_code": "${executionflow.ShipTo.Actor.Address.PostalCode!""}",
|
||||
"iso_country_code": "${executionflow.ShipTo.Actor.Address.CountryCode!""}"
|
||||
},
|
||||
@@ -66,13 +64,13 @@
|
||||
"grade_code_to_prepare" :"${grade_code_to_prepare}",
|
||||
"input_order_data": "false",
|
||||
"batch_1": "${batch_1}",
|
||||
"base_lv_quantity": "true",
|
||||
"any_lv": "false"
|
||||
<#--
|
||||
"stock_reservation": "false",
|
||||
"forced_priority_date_min_lead_time": "false",
|
||||
"temp_substitution_possible": "false",
|
||||
"substitution_possible": "false",
|
||||
"base_lv_quantity": "true",
|
||||
"substitution_possible": "false"
|
||||
-->
|
||||
|
||||
}<#sep>,</#sep>
|
||||
|
||||
@@ -2,14 +2,22 @@
|
||||
|
||||
<#-- How to use MD Header map
|
||||
Example :
|
||||
<#assign pick_sequence_code = Header_MetaData_Map["OrderType"]!""/>
|
||||
<#assign pick_sequence_code = Header_MetaData_Map["OrderType"].String!""/>
|
||||
|
||||
If your MD is :
|
||||
Boolean : .Bool
|
||||
Float : .Float
|
||||
Timestamp : .Timestamp.DateTime or .Timestamp.AuthorTimeZone
|
||||
Int : .Int
|
||||
String : .String
|
||||
-->
|
||||
|
||||
|
||||
<#assign activity_code = "PEN"/>
|
||||
<#assign originator_code = "50000189"/>
|
||||
<#assign preparation_type_code = "010"/>
|
||||
<#assign requested_delivery_date_type = "010"/>
|
||||
|
||||
<#assign activity_code = ""/>
|
||||
<#assign originator_code = ""/>
|
||||
<#assign preparation_type_code = ""/>
|
||||
<#assign requested_delivery_date_type = ""/>
|
||||
<#assign consolidated_delivery_flag ="false"/>
|
||||
<#assign pick_sequence_code = ""/>
|
||||
<#assign protected_flag ="false"/>
|
||||
|
||||
@@ -3,7 +3,14 @@
|
||||
|
||||
<#-- How to use MD or SK map
|
||||
Example :
|
||||
<#assign owner_code_to_prepare = SegmentationKeys_Map["Owner"]!""/>
|
||||
<#assign owner_code_to_prepare = SegmentationKeys_Map["Owner"].String!""/>
|
||||
|
||||
If your SK is :
|
||||
Boolean : .Bool
|
||||
Float : .Float
|
||||
Timestamp : .Timestamp.DateTime or .Timestamp.AuthorTimeZone
|
||||
Int : .Int
|
||||
String : .String
|
||||
-->
|
||||
|
||||
<#assign owner_code_to_prepare = SegmentationKeys_Map["myOwner"]!""/>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<#include "RPtoRFX_Receipt_DefaultHeaderData.ftl">
|
||||
<#assign aDateTime = .now>
|
||||
|
||||
{
|
||||
"id" : {"refid" : "${executionflow.OrderID}"},
|
||||
"route" : "rest/public/v1/activities/{activity_code}/physical_depots/{physical_depot_code}/originators/{originator_code}/receipts",
|
||||
@@ -19,30 +19,26 @@
|
||||
"carrier_code" : "${executionflow.Carrier.ActorID!""}",
|
||||
|
||||
<#if executionflow.RequestedMilestones?? && executionflow.RequestedMilestones.RequestedDeliveryDateTime??>
|
||||
"receipt_datetime": "${executionflow.RequestedMilestones.RequestedDeliveryDateTime.DateTime}",
|
||||
"receipt_datetime": "${DateTimeUTCtoRfxLocale(executionflow.RequestedMilestones.RequestedDeliveryDateTime.DateTime,time_zone_rfx)}",
|
||||
<#else>
|
||||
"receipt_datetime": "${aDateTime?iso_utc}",
|
||||
"receipt_datetime": "${DateTimeUTCtoRfxLocale(.now?iso_utc?string,time_zone_rfx)}",
|
||||
</#if>
|
||||
|
||||
<#--
|
||||
"carrier_appointment_made": "false",
|
||||
"receipt_in_cross_docking": "false",
|
||||
"dock_occupation_duration": 10,
|
||||
-->
|
||||
"carrier_appointment_made": "false",
|
||||
"receipt_in_cross_docking": "false",
|
||||
"dock_occupation_duration": 1,
|
||||
|
||||
<#if executionflow.Lines??>
|
||||
"line_list": [
|
||||
<#list executionflow.Lines as line>
|
||||
"line_list": [
|
||||
<#list executionflow.Lines as line>
|
||||
|
||||
<#-- ******* line MetaData and Segmentationkeys to maps ******** -->
|
||||
<#if line.MetaData??>
|
||||
<#assign Line_MetaData_Map = JsonUtil.sequenceToMap(line.MetaData, "Key", "Value") />
|
||||
</#if>
|
||||
<#if line.RequestedContent.Goods.SegmentationKeys??>
|
||||
<#assign SegmentationKeys_Map = JsonUtil.sequenceToMap(line.RequestedContent.Goods.SegmentationKeys, "Key", "Value") />
|
||||
</#if>
|
||||
<#if line.MetaData??>
|
||||
<#assign Line_MetaData_Map = JsonUtil.sequenceToMap(line.MetaData, "Key", "Value") />
|
||||
</#if>
|
||||
<#if line.RequestedContent.Goods.SegmentationKeys??>
|
||||
<#assign SegmentationKeys_Map = JsonUtil.sequenceToMap(line.RequestedContent.Goods.SegmentationKeys, "Key", "Value") />
|
||||
</#if>
|
||||
<#include "RPtoRFX_Receipt_DefaultLineData.ftl">
|
||||
|
||||
{
|
||||
"receipt_reference_line_no": ${line.LineID?number},
|
||||
"item_code": "${line.RequestedContent.Goods.ItemID!""}",
|
||||
@@ -50,20 +46,17 @@
|
||||
"level_1_quantity": ${line.RequestedMetrics.QuantityInBaseLV.Value!0},
|
||||
"owner_code": "${owner_code}",
|
||||
"grade_code": "${grade_code}",
|
||||
"batch_1": "${batch_1!""}",
|
||||
|
||||
<#--
|
||||
"batch_1": "${batch_1!""}",
|
||||
"optional_attributes": {
|
||||
"held_for_check": "false",
|
||||
<#--"held_for_check": "false",
|
||||
"held _for_repacking": "false",
|
||||
"hold_for_specific_code": "false",
|
||||
"hold_code": "false"
|
||||
},
|
||||
-->
|
||||
"quality_control_attributes": {
|
||||
<#--"qcf_to_create_for_receipt_line": "false",-->
|
||||
"hold_code": "false", -->
|
||||
"hold_for_specific_code": "false"
|
||||
}
|
||||
<#--"quality_control_attributes": {
|
||||
"qcf_to_create_for_receipt_line": "false",
|
||||
"exclude_item_from_inspection": "false"
|
||||
}
|
||||
} -->
|
||||
|
||||
}<#sep>,</#sep>
|
||||
</#list>
|
||||
|
||||
@@ -2,11 +2,18 @@
|
||||
|
||||
<#-- How to use MD Header map
|
||||
Example :
|
||||
<#assign receipt_type = Header_MetaData_Map["OrderType"]!""/>
|
||||
<#assign receipt_type = Header_MetaData_Map["OrderType"].String!""/>
|
||||
|
||||
If your MD is :
|
||||
Boolean : .Bool
|
||||
Float : .Float
|
||||
Timestamp : .Timestamp.DateTime or .Timestamp.AuthorTimeZone
|
||||
Int : .Int
|
||||
String : .String
|
||||
-->
|
||||
|
||||
<#assign activity_code = "PEN"/>
|
||||
<#assign originator_code = "STANDARD"/>
|
||||
<#assign receipt_type = "010"/>
|
||||
<#assign receipt_reason_code = "REC"/>
|
||||
<#assign work_mode_code = "LPA"/>
|
||||
<#assign activity_code = ""/>
|
||||
<#assign originator_code = ""/>
|
||||
<#assign receipt_type = ""/>
|
||||
<#assign receipt_reason_code = ""/>
|
||||
<#assign work_mode_code = ""/>
|
||||
|
||||
@@ -3,10 +3,17 @@
|
||||
|
||||
<#-- How to use MD or SK map
|
||||
Example :
|
||||
<#assign owner_code = SegmentationKeys_Map["Owner"]!""/>
|
||||
<#assign owner_code = SegmentationKeys_Map["Owner"].String!""/>
|
||||
|
||||
If your SK is :
|
||||
Boolean : .Bool
|
||||
Float : .Float
|
||||
Timestamp : .Timestamp.DateTime or .Timestamp.AuthorTimeZone
|
||||
Int : .Int
|
||||
String : .String
|
||||
-->
|
||||
|
||||
|
||||
<#assign owner_code = "PEN"/>
|
||||
<#assign grade_code = "STD"/>
|
||||
<#assign batch_1 = "STD"/>
|
||||
<#assign owner_code = ""/>
|
||||
<#assign grade_code = ""/>
|
||||
<#assign batch_1 = ""/>
|
||||
@@ -2,8 +2,30 @@
|
||||
<#-- Concat reflex timestamp with reflex time zone and format this date in ISO UTC format -->
|
||||
<#-- --------------------------------------------------------------------------------------- -->
|
||||
<#function RfxDateTimetoUTC rfxdatetime offset >
|
||||
<#assign datetimeUTC = JsonUtil.createUTCDateTime(rfxdatetime,time_zone_rfx , "yyyy-MM-dd'T'HH:mm:ss") />
|
||||
<#return (datetimeUTC)>
|
||||
<#return ((rfxdatetime + offset)?datetime.iso?iso_utc)>
|
||||
</#function>
|
||||
|
||||
|
||||
<#function DateTimeUTCtoRfxLocale dateutc locale >
|
||||
<#return dateutc?datetime.iso?iso_nz(locale)>
|
||||
</#function>
|
||||
|
||||
<#-- --------------------------------------------------------------------------------------- -->
|
||||
<#-- Split email reflex into json array string -->
|
||||
<#-- Example : splitemail "john.doe@hardis-group.com,; name@hardis-group.com" -->
|
||||
<#-- return "["john.doe@hardis-group.com","name@hardis-group.com"]" -->
|
||||
<#-- --------------------------------------------------------------------------------------- -->
|
||||
<#function splitEmailsIntoArray emails >
|
||||
<#local str = "[">
|
||||
<#list emails?split(";|,| |à|/","r")?filter(l -> l != "") as email>
|
||||
<#if email?matches("^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$")>
|
||||
<#if str != "[">
|
||||
<#local str += ",">
|
||||
</#if>
|
||||
<#local str += "\"">
|
||||
<#local str += email>
|
||||
<#local str += "\"">
|
||||
</#if>
|
||||
</#list>
|
||||
<#local str += "]">
|
||||
<#return (str)>
|
||||
</#function>
|
||||
Reference in New Issue
Block a user