This commit is contained in:
Laurie MONTANT 2024-10-07 14:52:28 +02:00
parent 25011e68e6
commit 65601133f1
20 changed files with 155 additions and 137 deletions

View File

@ -1,7 +1,126 @@
<#-- --------------------------------------------------------------------------------------- --> <#-- --------------------------------------------------------------------------------------- -->
<#-- Prefix 3 cars --> <#-- Actor Prefix 4 cars -->
<#-- --------------------------------------------------------------------------------------- --> <#-- --------------------------------------------------------------------------------------- -->
<#assign prefixdepot = "" >
<#assign prefixcarrier = "" > <#-- For Depot -->
<#assign prefixsupplier = "" > <#function RFXtoRPprefixDepot depot>
<#assign prefixconsignee = "" > <#if uniqueness?? && uniqueness!="" >
<#local actor = depot>
<#else>
<#if text_language_rfx ="fr">
<#local actor = "DEP_"+depot>
<#else>
<#if text_language_rfx ="it">
<#local actor = "DEP_"+depot>
<#else>
<#if text_language_rfx ="es">
<#local actor = "DEP_"+depot>
<#else>
<#if text_language_rfx ="pl">
<#local actor = "MAG_"+depot>
<#else>
<#if text_language_rfx ="nl">
<#local actor = "DEP_"+depot>
<#else>
<#local actor = "DEP_"+depot>
</#if>
</#if>
</#if>
</#if>
</#if>
</#if>
<#return (actor)>
</#function>
<#-- For Supplier -->
<#function RFXtoRPprefixSupplier supplier>
<#if uniqueness?? && uniqueness!="" >
<#local actor = supplier>
<#else>
<#if text_language_rfx ="fr">
<#local actor = "FOU_"+supplier>
<#else>
<#if text_language_rfx ="it">
<#local actor = "FOR_"+supplier>
<#else>
<#if text_language_rfx ="es">
<#local actor = "PRO_"+supplier>
<#else>
<#if text_language_rfx ="pl">
<#local actor = "DOS_"+supplier>
<#else>
<#if text_language_rfx ="nl">
<#local actor = "LEV_"+supplier>
<#else>
<#local actor = "SUP_"+supplier>
</#if>
</#if>
</#if>
</#if>
</#if>
</#if>
<#return (actor)>
</#function>
<#-- For Carrier -->
<#function RFXtoRPprefixCarrier carrier>
<#if uniqueness?? && uniqueness!="" >
<#local actor = carrier>
<#else>
<#if text_language_rfx ="fr">
<#local actor = "TRA_"+carrier>
<#else>
<#if text_language_rfx ="it">
<#local actor = "VET_"+carrier>
<#else>
<#if text_language_rfx ="es">
<#local actor = "TRA_"+carrier>
<#else>
<#if text_language_rfx ="pl">
<#local actor = "PRZ_"+carrier>
<#else>
<#if text_language_rfx ="nl">
<#local actor = "VER_"+carrier>
<#else>
<#local actor = "CAR_"+carrier>
</#if>
</#if>
</#if>
</#if>
</#if>
</#if>
<#return (actor)>
</#function>
<#-- For Consignee -->
<#function RFXtoRPprefixConsignee consignee>
<#if uniqueness?? && uniqueness!="" >
<#local actor = consignee>
<#else>
<#if text_language_rfx ="fr">
<#local actor = "DES_"+consignee>
<#else>
<#if text_language_rfx ="it">
<#local actor = "DES_"+consignee>
<#else>
<#if text_language_rfx ="es">
<#local actor = "DES_"+consignee>
<#else>
<#if text_language_rfx ="pl">
<#local actor = "ODB_"+consignee>
<#else>
<#if text_language_rfx ="nl">
<#local actor = "ONT_"+consignee>
<#else>
<#local actor = "CON_"+consignee>
</#if>
</#if>
</#if>
</#if>
</#if>
</#if>
<#return (actor)>
</#function>

View File

@ -8,11 +8,7 @@
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"ID": { "ID": {
<#if uniqueness?? && uniqueness!="" > "ActorID": "${RFXtoRPprefixDepot(stock.physical_depot_code)}"
"ActorID": "${stock.physical_depot_code}"
<#else>
"ActorID": "${prefixdepot}${stock.physical_depot_code}"
</#if>
}, },
"Payload": { "Payload": {
<#assign generation_date = RfxDateTimetoUTC(stock.generation_date,time_zone_offset_rfx) /> <#assign generation_date = RfxDateTimetoUTC(stock.generation_date,time_zone_offset_rfx) />

View File

@ -8,12 +8,7 @@
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"Payload": { "Payload": {
<#if uniqueness?? && uniqueness!="" > "ActorID": "${RFXtoRPprefixDepot(stock.physical_depot_code)}",
"ActorID": "${stock.physical_depot_code}",
<#else>
"ActorID": "${prefixdepot}${stock.physical_depot_code}",
</#if>
<#assign generation_date = RfxDateTimetoUTC(stock.generation_date,time_zone_offset_rfx) /> <#assign generation_date = RfxDateTimetoUTC(stock.generation_date,time_zone_offset_rfx) />
"Snapshot": { "Snapshot": {
"DateTime": { "DateTime": {

View File

@ -7,11 +7,7 @@
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"ID": { "ID": {
<#if uniqueness?? && uniqueness!="" > "RefID": "${RFXtoRPprefixCarrier(carrier.carrier_code?trim?json_string)}"
"RefID": "${carrier.carrier_code?trim?json_string}"
<#else>
"RefID": "${prefixcarrier}${carrier.carrier_code?trim?json_string}"
</#if>
}, },
"Payload": { "Payload": {
"Name": "${carrier.carrier_designation?json_string}", "Name": "${carrier.carrier_designation?json_string}",

View File

@ -7,13 +7,8 @@
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"ID": { "ID": {
<#if uniqueness?? && uniqueness!="" > "RefID": "${RFXtoRPprefixCarrier(carrier.carrier_code?trim?json_string)}"
"RefID": "${carrier.carrier_code?trim?json_string}"
<#else>
"RefID": "${prefixcarrier}${carrier.carrier_code?trim?json_string}"
</#if>
}, },
"Payload": {} "Payload": {}
} }
] ]

View File

@ -7,13 +7,8 @@
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"ID": { "ID": {
<#if uniqueness?? && uniqueness!="" > "RefID": "${RFXtoRPprefixConsignee(actor.code?trim?json_string)}"
"RefID": "${actor.code?trim?json_string}"
<#else>
"RefID": "${prefixconsignee}${actor.code?trim?json_string}"
</#if>
}, },
"Payload": { "Payload": {
"Name": "${actor.designation?json_string}", "Name": "${actor.designation?json_string}",
"ManagedStock": false, "ManagedStock": false,

View File

@ -7,11 +7,7 @@
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"ID": { "ID": {
<#if uniqueness?? && uniqueness!="" > "RefID": "${RFXtoRPprefixConsignee(actor.code?trim?json_string)}"
"RefID": "${actor.code?trim?json_string}"
<#else>
"RefID": "${prefixconsignee}${actor.code?trim?json_string}"
</#if>
}, },
"Payload": {} "Payload": {}
} }

View File

@ -37,11 +37,7 @@
"ExecutionflowID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}", "ExecutionflowID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}",
</#if> </#if>
"LineID": "${reflexMvtStockInterface.receipt_line_number}", "LineID": "${reflexMvtStockInterface.receipt_line_number}",
<#if uniqueness?? && uniqueness!="" > "ActorID": "${RFXtoRPprefixDepot(reflexMvtStockInterface.physical_depot_code?trim?json_string)}",
"ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}",
<#else>
"ActorID": "${prefixdepot}${reflexMvtStockInterface.physical_depot_code?trim?json_string}",
</#if>
"Quantity": { "Quantity": {
"LVID": "${quantity_in_base_lv_RP_Cst}", "LVID": "${quantity_in_base_lv_RP_Cst}",
"Value": ${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs} "Value": ${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs}

View File

@ -42,11 +42,7 @@
"LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}" "LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}"
}, },
<#if uniqueness?? && uniqueness!="" > "ActorID": "${RFXtoRPprefixDepot(reflexMvtStockInterface.physical_depot_code?trim?json_string)}",
"ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}",
<#else>
"ActorID": "${prefixdepot}${reflexMvtStockInterface.physical_depot_code?trim?json_string}",
</#if>
"Movement": { "Movement": {
"DateTime": { "DateTime": {

View File

@ -7,11 +7,7 @@
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"ID": { "ID": {
<#if uniqueness?? && uniqueness!="" > "RefID": "${RFXtoRPprefixSupplier(actor.code?trim?json_string)}"
"RefID": "${actor.code?trim?json_string}"
<#else>
"RefID": "${prefixsupplier}${actor.code?trim?json_string}"
</#if>
}, },
"Payload": { "Payload": {
"Name": "${actor.designation?json_string}", "Name": "${actor.designation?json_string}",

View File

@ -7,11 +7,7 @@
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"ID": { "ID": {
<#if uniqueness?? && uniqueness!="" > "RefID": "${RFXtoRPprefixSupplier(actor.code?trim?json_string)}"
"RefID": "${actor.code?trim?json_string}"
<#else>
"RefID": "${prefixsupplier}${actor.code?trim?json_string}"
</#if>
}, },
"Payload": {} "Payload": {}
} }

View File

@ -7,11 +7,7 @@
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"ID": { "ID": {
<#if uniqueness?? && uniqueness!="" > "RefID": "${RFXtoRPprefixDepot(depot.physical_depot_code?trim?json_string)}"
"RefID": "${depot.physical_depot_code?trim?json_string}"
<#else>
"RefID": "${prefixdepot}${depot.physical_depot_code?trim?json_string}"
</#if>
}, },
"Payload": { "Payload": {
"Name": "${depot.physical_depot_designation?json_string}", "Name": "${depot.physical_depot_designation?json_string}",

View File

@ -7,11 +7,7 @@
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"ID": { "ID": {
<#if uniqueness?? && uniqueness!="" > "RefID": "${RFXtoRPprefixDepot(depot.physical_depot_code?trim?json_string)}"
"RefID": "${depot.physical_depot_code?trim?json_string}"
<#else>
"RefID": "${prefixdepot}${depot.physical_depot_code?trim?json_string}"
</#if>
}, },
"Payload": {} "Payload": {}
} }

View File

@ -19,11 +19,7 @@
}, },
"Payload":{ "Payload":{
"Carrier": { "Carrier": {
<#if uniqueness?? && uniqueness!="" > "ActorID": "${RFXtoRPprefixCarrier(preparationOrder.load_data.carrier_code?trim?json_string)}"
"ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}"
<#else>
"ActorID":"${prefixcarrier}${preparationOrder.load_data.carrier_code?trim?json_string}"
</#if>
} }
<#-- Add transport grade code <#-- Add transport grade code
<#if preparationOrder.transport_grade_code!=""> <#if preparationOrder.transport_grade_code!="">

View File

@ -118,20 +118,15 @@
<#else> <#else>
"LineID": "${preparation_line.pro_line_number!0}", "LineID": "${preparation_line.pro_line_number!0}",
</#if> </#if>
<#if uniqueness?? && uniqueness!="" > "ActorID": "${RFXtoRPprefixDepot(preparationOrder.physical_depot_code?trim?json_string)}",
"ActorID": "${preparationOrder.physical_depot_code?trim?json_string}", "Quantity": {
<#else> "LVID": "${quantity_in_base_lv_RP_Cst}",
"ActorID": "${prefixdepot}${preparationOrder.physical_depot_code?trim?json_string}", "Value": ${despatched_ipg.quantity_lvs}
</#if>
"Quantity": {
"LVID": "${quantity_in_base_lv_RP_Cst}",
"Value": ${despatched_ipg.quantity_lvs}
} }
} }
] ]
} }
}<#sep>,</#sep> }<#sep>,</#sep>
</#list> </#list>
<#sep>,</#sep> <#sep>,</#sep>

View File

@ -19,11 +19,7 @@
}, },
"Payload":{ "Payload":{
"Carrier": { "Carrier": {
<#if uniqueness?? && uniqueness!="" > "ActorID": "${RFXtoRPprefixCarrier(preparationOrder.load_data.carrier_code?trim?json_string)}"
"ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}"
<#else>
"ActorID":"${prefixcarrier}${preparationOrder.load_data.carrier_code?trim?json_string}"
</#if>
} }
} }
} }

View File

@ -32,13 +32,8 @@
<#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" > <#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" >
, ,
"HUCarrier":{ "HUCarrier":{
<#if uniqueness?? && uniqueness!="" > "ActorID": "${RFXtoRPprefixCarrier(preparationOrder.load_data.carrier_code?trim?json_string)}"
"ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}" }
<#else>
"ActorID":"${prefixcarrier}${preparationOrder.load_data.carrier_code?trim?json_string}"
</#if>
}
</#if> </#if>
} }
} }

View File

@ -15,20 +15,13 @@
} }
}, },
"Payload": { "Payload": {
"HandlingunitID": "${despatched_ipg.hd_number}" "HandlingunitID": "${despatched_ipg.hd_number}"
<#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" >
<#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" > ,
, "HUCarrier":{
"HUCarrier":{ "ActorID": "${RFXtoRPprefixCarrier(preparationOrder.load_data.carrier_code?trim?json_string)}"
<#if uniqueness?? && uniqueness!="" > }
"ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}" </#if>
<#else>
"ActorID":"${prefixcarrier}${preparationOrder.load_data.carrier_code?trim?json_string}"
</#if>
}
</#if>
} }
} }
] ]

View File

@ -27,11 +27,7 @@
"CarrierService":"${preparation_order.transport_grade_code?trim?json_string}", "CarrierService":"${preparation_order.transport_grade_code?trim?json_string}",
</#if> --> </#if> -->
"ShipFrom": { "ShipFrom": {
<#if uniqueness?? && uniqueness!="" > "ActorID": "${RFXtoRPprefixDepot(preparation_order.physical_depot_code?trim?json_string)}"
"ActorID": "${preparation_order.physical_depot_code?trim?json_string}"
<#else>
"ActorID": "${prefixdepot}${preparation_order.physical_depot_code?trim?json_string}"
</#if>
}, },
"ShipFromAcked": true, "ShipFromAcked": true,
"ShipTo": { "ShipTo": {
@ -53,11 +49,7 @@
preparation_order.address.territorial_division_code == "" && preparation_order.address.territorial_division_code == "" &&
preparation_order.address.postal_code == "" && preparation_order.address.postal_code == "" &&
preparation_order.address.iso_country_code == ""> preparation_order.address.iso_country_code == "">
<#if uniqueness?? && uniqueness!="" > "ActorID": "${RFXtoRPprefixConsignee(preparation_order.end_consignee_code)}"
"ActorID": "${preparation_order.end_consignee_code}"
<#else>
"ActorID": "${prefixconsignee}${preparation_order.end_consignee_code}"
</#if>
<#else> <#else>
"Actor": "Actor":
{ {
@ -93,7 +85,6 @@
</#if> </#if>
<#-- Line Metadata inclusion --> <#-- Line Metadata inclusion -->
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_LineMetadata.ftl">, <#include "RFXtoRP_HsrPro_ExecutionflowDetected_LineMetadata.ftl">,
"RequestedContent": "RequestedContent":
{ {
"Goods": "Goods":
@ -104,10 +95,8 @@
<#assign forced_priority_date = preparation_order_line.optional_attributes.forced_priority_date?datetime(rfx_date_format_default)?iso_utc /> <#assign forced_priority_date = preparation_order_line.optional_attributes.forced_priority_date?datetime(rfx_date_format_default)?iso_utc />
"PriorityDate": "${forced_priority_date}", "PriorityDate": "${forced_priority_date}",
</#if> </#if>
<#-- Segmentation Keys inclusion --> <#-- Segmentation Keys inclusion -->
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_SegmentationKeys.ftl"> <#include "RFXtoRP_HsrPro_ExecutionflowDetected_SegmentationKeys.ftl">
}, },
"Quantity" : "Quantity" :
{ {
@ -119,7 +108,6 @@
</#list> </#list>
], ],
</#if> </#if>
"RequestedMilestones" : "RequestedMilestones" :
{ {
"RequestedDeliveryDateTime" : "RequestedDeliveryDateTime" :

View File

@ -26,29 +26,16 @@
"ShipFrom": "ShipFrom":
{ {
<#if uniqueness?? && uniqueness!="" > "ActorID": "${RFXtoRPprefixSupplier(receipt.original_code?trim?json_string)}"
"ActorID": "${receipt.original_code?trim?json_string}"
<#else>
"ActorID": "${prefixsupplier}${receipt.original_code?trim?json_string}"
</#if>
}, },
"ShipTo" : "ShipTo" :
{ {
<#if uniqueness?? && uniqueness!="" > "ActorID": "${RFXtoRPprefixDepot(receipt.physical_depot_code?trim?json_string)}"
"ActorID": "${receipt.physical_depot_code?trim?json_string}"
<#else>
"ActorID": "${prefixdepot}${receipt.physical_depot_code?trim?json_string}"
</#if>
}, },
"ShipToAcked": true, "ShipToAcked": true,
<#if receipt.carrier_informations.carrier_code != ""> <#if receipt.carrier_informations.carrier_code != "">
<#if uniqueness?? && uniqueness!="" > "Carrier": "${RFXtoRPprefixCarrier(receipt.carrier_informations.carrier_code?trim?json_string)}",
"Carrier" : {"ActorID": "${receipt.carrier_informations.carrier_code?trim?json_string}"},
<#else>
"Carrier" : {"ActorID": "${prefixcarrier}${receipt.carrier_informations.carrier_code?trim?json_string}"},
</#if>
</#if> </#if>
<#if receipt.line_list??> <#if receipt.line_list??>