From 550c0047daf79220162adc2639bd072e30fcd387 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 16 Sep 2024 15:25:10 +0200 Subject: [PATCH] modifs --- RFXtoRP_HsaCarrier_ActorCreated.ftl | 6 +++++- RFXtoRP_HsaCons_ActorCreated.ftl | 6 +++++- RFXtoRP_HsaIpgMove_GoodsReceived.ftl | 14 ++++++++++++-- RFXtoRP_HsaIpgMove_StockMoved.ftl | 6 +++++- RFXtoRP_HsaSup_ActorCreated.ftl | 6 +++++- RFXtoRP_HsrPrepa_CarrierUpdated.ftl | 6 +++++- 6 files changed, 37 insertions(+), 7 deletions(-) diff --git a/RFXtoRP_HsaCarrier_ActorCreated.ftl b/RFXtoRP_HsaCarrier_ActorCreated.ftl index b83f099..44c4c11 100644 --- a/RFXtoRP_HsaCarrier_ActorCreated.ftl +++ b/RFXtoRP_HsaCarrier_ActorCreated.ftl @@ -4,7 +4,11 @@ "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${carrier.carrier_code?trim?json_string}" + <#if uniqueness?? && uniqueness!="" > + "RefID": "${carrier.carrier_code?trim?json_string}" + <#else> + "RefID": "CA${carrier.carrier_code?trim?json_string}" + }, "Payload": { diff --git a/RFXtoRP_HsaCons_ActorCreated.ftl b/RFXtoRP_HsaCons_ActorCreated.ftl index d6cee37..9730ecd 100644 --- a/RFXtoRP_HsaCons_ActorCreated.ftl +++ b/RFXtoRP_HsaCons_ActorCreated.ftl @@ -4,7 +4,11 @@ "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${actor.code?trim?json_string}" + <#if uniqueness?? && uniqueness!="" > + "RefID": "${actor.code?trim?json_string}" + <#else> + "RefID": "C${actor.code?trim?json_string}" + }, "Payload": { diff --git a/RFXtoRP_HsaIpgMove_GoodsReceived.ftl b/RFXtoRP_HsaIpgMove_GoodsReceived.ftl index c2de1cd..0575947 100644 --- a/RFXtoRP_HsaIpgMove_GoodsReceived.ftl +++ b/RFXtoRP_HsaIpgMove_GoodsReceived.ftl @@ -32,10 +32,20 @@ <#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 uniqueness?? && uniqueness!="" > + "ExecutionflowID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}", + <#else> + "ExecutionflowID": "D${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}", + + "LineID": "${reflexMvtStockInterface.receipt_line_number}", - "ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}", + <#if uniqueness?? && uniqueness!="" > + "ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}", + <#else> + "ActorID": "D${reflexMvtStockInterface.physical_depot_code?trim?json_string}", + + "Quantity": { "LVID": "${quantity_in_base_lv_RP_Cst}", "Value": ${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs} diff --git a/RFXtoRP_HsaIpgMove_StockMoved.ftl b/RFXtoRP_HsaIpgMove_StockMoved.ftl index 9d7e808..513f146 100644 --- a/RFXtoRP_HsaIpgMove_StockMoved.ftl +++ b/RFXtoRP_HsaIpgMove_StockMoved.ftl @@ -42,7 +42,11 @@ "LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}" }, - "ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}", + <#if uniqueness?? && uniqueness!="" > + "ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}", + <#else> + "ActorID": "D${reflexMvtStockInterface.physical_depot_code?trim?json_string}", + "Movement": { "DateTime": { diff --git a/RFXtoRP_HsaSup_ActorCreated.ftl b/RFXtoRP_HsaSup_ActorCreated.ftl index 9fc6f33..89ae6ba 100644 --- a/RFXtoRP_HsaSup_ActorCreated.ftl +++ b/RFXtoRP_HsaSup_ActorCreated.ftl @@ -4,7 +4,11 @@ "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${actor.code?trim?json_string}" + <#if uniqueness?? && uniqueness!="" > + "RefID": "${actor.code?trim?json_string}" + <#else> + "RefID": "S${actor.code?trim?json_string}" + }, "Payload": { diff --git a/RFXtoRP_HsrPrepa_CarrierUpdated.ftl b/RFXtoRP_HsrPrepa_CarrierUpdated.ftl index ca87415..31b33f0 100644 --- a/RFXtoRP_HsrPrepa_CarrierUpdated.ftl +++ b/RFXtoRP_HsrPrepa_CarrierUpdated.ftl @@ -18,7 +18,11 @@ }, "Payload":{ "Carrier": { - "ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}" + <#if uniqueness?? && uniqueness!="" > + "ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}" + <#else> + "ActorID":"CA${preparationOrder.load_data.carrier_code?trim?json_string}" + } <#-- Add transport grade code <#if preparationOrder.transport_grade_code!="">