modifs uniqueness

This commit is contained in:
Laurie MONTANT 2024-09-16 16:12:43 +02:00
parent d91d15c1c9
commit 956105fc38
17 changed files with 309 additions and 51 deletions

View File

@ -1,4 +1,6 @@
<#include "ReflexUtils.ftl"> <#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl">
[ [
<#list reflexStockPicturesInterface.detailled_stock_list as stock> <#list reflexStockPicturesInterface.detailled_stock_list as stock>
{ {
@ -6,7 +8,19 @@
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"ID": { "ID": {
"RefID": "${stock.physical_depot_code}" <#if text_language_rfx="fr">
<#if uniqueness?? && uniqueness!="" >
"ActorID": "${stock.physical_depot_code}"
<#else>
"ActorID": "DEP${stock.physical_depot_code}"
</#if>
<#else>
<#if uniqueness?? && uniqueness!="" >
"ActorID": "${stock.physical_depot_code}"
<#else>
"ActorID": "DEP${stock.physical_depot_code}"
</#if>
</#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) />
@ -15,7 +29,19 @@
"DateTime": "${generation_date}", "DateTime": "${generation_date}",
"AuthorTimeZone": "${time_zone_rfx}" "AuthorTimeZone": "${time_zone_rfx}"
}, },
<#if text_language_rfx="fr">
<#if uniqueness?? && uniqueness!="" >
"ID": "${stock.physical_depot_code}-${idSnapshot}", "ID": "${stock.physical_depot_code}-${idSnapshot}",
<#else>
"ID": "DEP${stock.physical_depot_code}-${idSnapshot}",
</#if>
<#else>
<#if uniqueness?? && uniqueness!="" >
"ID": "${stock.physical_depot_code}-${idSnapshot}",
<#else>
"ID": "DEP${stock.physical_depot_code}-${idSnapshot}",
</#if>
</#if>
"MessageNb": ${sum_elt} "MessageNb": ${sum_elt}
} }

View File

@ -1,4 +1,5 @@
<#include "ReflexUtils.ftl"> <#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl">
[ [
<#list reflexStockPicturesInterface.detailled_stock_list as stock> <#list reflexStockPicturesInterface.detailled_stock_list as stock>
{ {
@ -6,14 +7,40 @@
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"Payload": { "Payload": {
<#if text_language_rfx="fr">
<#if uniqueness?? && uniqueness!="" >
"ActorID": "${stock.physical_depot_code}", "ActorID": "${stock.physical_depot_code}",
<#else>
"ActorID": "DEP${stock.physical_depot_code}",
</#if>
<#else>
<#if uniqueness?? && uniqueness!="" >
"ActorID": "${stock.physical_depot_code}",
<#else>
"ActorID": "DEP${stock.physical_depot_code}",
</#if>
</#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": {
"DateTime": "${generation_date}", "DateTime": "${generation_date}",
"AuthorTimeZone": "${time_zone_rfx}" "AuthorTimeZone": "${time_zone_rfx}"
}, },
<#if text_language_rfx="fr">
<#if uniqueness?? && uniqueness!="" >
"ID": "${stock.physical_depot_code}-${idSnapshot}", "ID": "${stock.physical_depot_code}-${idSnapshot}",
<#else>
"ID": "DEP${stock.physical_depot_code}-${idSnapshot}",
</#if>
<#else>
<#if uniqueness?? && uniqueness!="" >
"ID": "${stock.physical_depot_code}-${idSnapshot}",
<#else>
"ID": "DEP${stock.physical_depot_code}-${idSnapshot}",
</#if>
</#if>
"Quantity": "Quantity":
{ {
"Value" : "${stock.quantity_in_base_lvs!"0"}", "Value" : "${stock.quantity_in_base_lvs!"0"}",

View File

@ -1,13 +1,22 @@
<#include "HfRpConfig.ftl">
[ [
{ {
"Header": { "Header": {
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"ID": { "ID": {
<#if text_language_rfx="fr">
<#if uniqueness?? && uniqueness!="" > <#if uniqueness?? && uniqueness!="" >
"RefID": "${carrier.carrier_code?trim?json_string}" "RefID": "${carrier.carrier_code?trim?json_string}"
<#else> <#else>
"RefID": "CA${carrier.carrier_code?trim?json_string}" "RefID": "TRA${carrier.carrier_code?trim?json_string}"
</#if>
<#else>
<#if uniqueness?? && uniqueness!="" >
"RefID": "${carrier.carrier_code?trim?json_string}"
<#else>
"RefID": "CAR${carrier.carrier_code?trim?json_string}"
</#if>
</#if> </#if>
}, },

View File

@ -1,10 +1,24 @@
<#include "HfRpConfig.ftl">
[ [
{ {
"Header": { "Header": {
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"ID": { "ID": {
<#if text_language_rfx="fr">
<#if uniqueness?? && uniqueness!="" >
"RefID": "${carrier.carrier_code?trim?json_string}" "RefID": "${carrier.carrier_code?trim?json_string}"
<#else>
"RefID": "TRA${carrier.carrier_code?trim?json_string}"
</#if>
<#else>
<#if uniqueness?? && uniqueness!="" >
"RefID": "${carrier.carrier_code?trim?json_string}"
<#else>
"RefID": "CAR${carrier.carrier_code?trim?json_string}"
</#if>
</#if>
}, },
"Payload": {} "Payload": {}

View File

@ -1,14 +1,24 @@
<#include "HfRpConfig.ftl">
[ [
{ {
"Header": { "Header": {
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"ID": { "ID": {
<#if text_language_rfx="fr">
<#if uniqueness?? && uniqueness!="" > <#if uniqueness?? && uniqueness!="" >
"RefID": "${actor.code?trim?json_string}" "RefID": "${actor.code?trim?json_string}"
<#else> <#else>
"RefID": "C${actor.code?trim?json_string}" "RefID": "DES${actor.code?trim?json_string}"
</#if> </#if>
<#else>
<#if uniqueness?? && uniqueness!="" >
"RefID": "${actor.code?trim?json_string}"
<#else>
"RefID": "CON${actor.code?trim?json_string}"
</#if>
</#if>
}, },
"Payload": { "Payload": {

View File

@ -1,10 +1,23 @@
<#include "HfRpConfig.ftl">
[ [
{ {
"Header": { "Header": {
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"ID": { "ID": {
<#if text_language_rfx="fr">
<#if uniqueness?? && uniqueness!="" >
"RefID": "${actor.code?trim?json_string}" "RefID": "${actor.code?trim?json_string}"
<#else>
"RefID": "DES${actor.code?trim?json_string}"
</#if>
<#else>
<#if uniqueness?? && uniqueness!="" >
"RefID": "${actor.code?trim?json_string}"
<#else>
"RefID": "CON${actor.code?trim?json_string}"
</#if>
</#if>
}, },
"Payload": {} "Payload": {}

View File

@ -29,21 +29,37 @@
<#-- Goods received Segmentation Keys inclusion --> <#-- Goods received Segmentation Keys inclusion -->
<#include "RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl"> <#include "RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl">
}, },
<#if reflexMvtStockInterface.receipt_reference!=""> <#if reflexMvtStockInterface.receipt_reference!="">
"ExecutionflowID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}", "ExecutionflowID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}",
<#else>
<#if text_language_rfx="fr">
<#if uniqueness?? && uniqueness!="" >
"ExecutionflowID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}",
<#else>
"ExecutionflowID": "DEP${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}",
</#if>
<#else> <#else>
<#if uniqueness?? && uniqueness!="" > <#if uniqueness?? && uniqueness!="" >
"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}",
<#else> <#else>
"ExecutionflowID": "D${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}", "ExecutionflowID": "DEP${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}",
</#if>
</#if> </#if>
</#if> </#if>
"LineID": "${reflexMvtStockInterface.receipt_line_number}", "LineID": "${reflexMvtStockInterface.receipt_line_number}",
<#if text_language_rfx="fr">
<#if uniqueness?? && uniqueness!="" > <#if uniqueness?? && uniqueness!="" >
"ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}", "ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}",
<#else> <#else>
"ActorID": "D${reflexMvtStockInterface.physical_depot_code?trim?json_string}", "ActorID": "DEP${reflexMvtStockInterface.physical_depot_code?trim?json_string}",
</#if>
<#else>
<#if uniqueness?? && uniqueness!="" >
"ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}",
<#else>
"ActorID": "DEP${reflexMvtStockInterface.physical_depot_code?trim?json_string}",
</#if>
</#if> </#if>
"Quantity": { "Quantity": {

View File

@ -42,11 +42,20 @@
"LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}" "LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}"
}, },
<#if text_language_rfx="fr">
<#if uniqueness?? && uniqueness!="" > <#if uniqueness?? && uniqueness!="" >
"ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}", "ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}",
<#else> <#else>
"ActorID": "D${reflexMvtStockInterface.physical_depot_code?trim?json_string}", "ActorID": "DEP${reflexMvtStockInterface.physical_depot_code?trim?json_string}",
</#if> </#if>
<#else>
<#if uniqueness?? && uniqueness!="" >
"ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}",
<#else>
"ActorID": "DEP${reflexMvtStockInterface.physical_depot_code?trim?json_string}",
</#if>
</#if>
"Movement": { "Movement": {
"DateTime": { "DateTime": {

View File

@ -1,13 +1,22 @@
<#include "HfRpConfig.ftl">
[ [
{ {
"Header": { "Header": {
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"ID": { "ID": {
<#if text_language_rfx="fr">
<#if uniqueness?? && uniqueness!="" > <#if uniqueness?? && uniqueness!="" >
"RefID": "${actor.code?trim?json_string}" "RefID": "${actor.code?trim?json_string}"
<#else> <#else>
"RefID": "S${actor.code?trim?json_string}" "RefID": "FOU${actor.code?trim?json_string}"
</#if>
<#else>
<#if uniqueness?? && uniqueness!="" >
"RefID": "${actor.code?trim?json_string}"
<#else>
"RefID": "SUP${actor.code?trim?json_string}"
</#if>
</#if> </#if>
}, },

View File

@ -1,10 +1,23 @@
<#include "HfRpConfig.ftl">
[ [
{ {
"Header": { "Header": {
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"ID": { "ID": {
<#if text_language_rfx="fr">
<#if uniqueness?? && uniqueness!="" >
"RefID": "${actor.code?trim?json_string}" "RefID": "${actor.code?trim?json_string}"
<#else>
"RefID": "FOU${actor.code?trim?json_string}"
</#if>
<#else>
<#if uniqueness?? && uniqueness!="" >
"RefID": "${actor.code?trim?json_string}"
<#else>
"RefID": "SUP${actor.code?trim?json_string}"
</#if>
</#if>
}, },
"Payload": {} "Payload": {}

View File

@ -1,10 +1,24 @@
<#include "HfRpConfig.ftl">
[ [
{ {
"Header": { "Header": {
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"ID": { "ID": {
<#if text_language_rfx="fr">
<#if uniqueness?? && uniqueness!="" >
"RefID": "${depot.physical_depot_code?trim?json_string}" "RefID": "${depot.physical_depot_code?trim?json_string}"
<#else>
"RefID": "DEP${depot.physical_depot_code?trim?json_string}"
</#if>
<#else>
<#if uniqueness?? && uniqueness!="" >
"RefID": "${depot.physical_depot_code?trim?json_string}"
<#else>
"RefID": "DEP${depot.physical_depot_code?trim?json_string}"
</#if>
</#if>
}, },
"Payload": {} "Payload": {}

View File

@ -18,11 +18,20 @@
}, },
"Payload":{ "Payload":{
"Carrier": { "Carrier": {
<#if text_language_rfx="fr">
<#if uniqueness?? && uniqueness!="" > <#if uniqueness?? && uniqueness!="" >
"ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}" "ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}"
<#else> <#else>
"ActorID":"CA${preparationOrder.load_data.carrier_code?trim?json_string}" "ActorID":"TRA${preparationOrder.load_data.carrier_code?trim?json_string}"
</#if> </#if>
<#else>
<#if uniqueness?? && uniqueness!="" >
"ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}"
<#else>
"ActorID":"CAR${preparationOrder.load_data.carrier_code?trim?json_string}"
</#if>
</#if>
} }
<#-- Add transport grade code <#-- Add transport grade code
<#if preparationOrder.transport_grade_code!=""> <#if preparationOrder.transport_grade_code!="">

View File

@ -116,7 +116,20 @@
<#else> <#else>
"LineID": "${preparation_line.pro_line_number!0}", "LineID": "${preparation_line.pro_line_number!0}",
</#if> </#if>
<#if text_language_rfx="fr">
<#if uniqueness?? && uniqueness!="" >
"ActorID": "${preparationOrder.physical_depot_code?trim?json_string}", "ActorID": "${preparationOrder.physical_depot_code?trim?json_string}",
<#else>
"ActorID": "DEP${preparationOrder.physical_depot_code?trim?json_string}",
</#if>
<#else>
<#if uniqueness?? && uniqueness!="" >
"ActorID": "${preparationOrder.physical_depot_code?trim?json_string}",
<#else>
"ActorID": "DEP${preparationOrder.physical_depot_code?trim?json_string}",
</#if>
</#if>
"Quantity": { "Quantity": {
"LVID": "${quantity_in_base_lv_RP_Cst}", "LVID": "${quantity_in_base_lv_RP_Cst}",
"Value": ${despatched_ipg.quantity_lvs} "Value": ${despatched_ipg.quantity_lvs}

View File

@ -18,7 +18,21 @@
}, },
"Payload":{ "Payload":{
"Carrier": { "Carrier": {
<#if text_language_rfx="fr">
<#if uniqueness?? && uniqueness!="" >
"ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}" "ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}"
<#else>
"ActorID":"TRA${preparationOrder.load_data.carrier_code?trim?json_string}"
</#if>
<#else>
<#if uniqueness?? && uniqueness!="" >
"ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}"
<#else>
"ActorID":"CAR${preparationOrder.load_data.carrier_code?trim?json_string}"
</#if>
</#if>
} }
} }
} }

View File

@ -18,7 +18,19 @@
<#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": "${preparationOrder.load_data.carrier_code?json_string}" <#if text_language_rfx="fr">
<#if uniqueness?? && uniqueness!="" >
"ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}"
<#else>
"ActorID":"TRA${preparationOrder.load_data.carrier_code?trim?json_string}"
</#if>
<#else>
<#if uniqueness?? && uniqueness!="" >
"ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}"
<#else>
"ActorID":"CAR${preparationOrder.load_data.carrier_code?trim?json_string}"
</#if>
</#if>
} }
</#if> </#if>

View File

@ -26,7 +26,20 @@
"CarrierService":"${preparation_order.transport_grade_code?trim?json_string}", "CarrierService":"${preparation_order.transport_grade_code?trim?json_string}",
</#if> --> </#if> -->
"ShipFrom": { "ShipFrom": {
<#if text_language_rfx="fr">
<#if uniqueness?? && uniqueness!="" >
"ActorID": "${preparation_order.physical_depot_code?trim?json_string}" "ActorID": "${preparation_order.physical_depot_code?trim?json_string}"
<#else>
"ActorID": "DEP${preparation_order.physical_depot_code?trim?json_string}"
</#if>
<#else>
<#if uniqueness?? && uniqueness!="" >
"ActorID": "${preparation_order.physical_depot_code?trim?json_string}"
<#else>
"ActorID": "DEP${preparation_order.physical_depot_code?trim?json_string}"
</#if>
</#if>
}, },
"ShipFromAcked": true, "ShipFromAcked": true,
"ShipTo": { "ShipTo": {
@ -48,7 +61,19 @@
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 text_language_rfx="fr">
<#if uniqueness?? && uniqueness!="" >
"ActorID": "${preparation_order.end_consignee_code}" "ActorID": "${preparation_order.end_consignee_code}"
<#else>
"ActorID": "DES${preparation_order.end_consignee_code}"
</#if>
<#else>
<#if uniqueness?? && uniqueness!="" >
"ActorID": "${preparation_order.end_consignee_code}"
<#else>
"ActorID": "CON${preparation_order.end_consignee_code}"
</#if>
</#if>
<#else> <#else>
"Actor": "Actor":
{ {

View File

@ -29,12 +29,37 @@
}, },
"ShipTo" : "ShipTo" :
{ {
<#if text_language_rfx="fr">
<#if uniqueness?? && uniqueness!="" >
"ActorID": "${receipt.physical_depot_code?trim?json_string}" "ActorID": "${receipt.physical_depot_code?trim?json_string}"
<#else>
"ActorID": "DEP${receipt.physical_depot_code?trim?json_string}"
</#if>
<#else>
<#if uniqueness?? && uniqueness!="" >
"ActorID": "${receipt.physical_depot_code?trim?json_string}"
<#else>
"ActorID": "DEP${receipt.physical_depot_code?trim?json_string}"
</#if>
</#if>
}, },
"ShipToAcked": true, "ShipToAcked": true,
<#if receipt.carrier_informations.carrier_code != ""> <#if receipt.carrier_informations.carrier_code != "">
<#if text_language_rfx="fr">
<#if uniqueness?? && uniqueness!="" >
"Carrier" : {"ActorID": "${receipt.carrier_informations.carrier_code?trim?json_string}"}, "Carrier" : {"ActorID": "${receipt.carrier_informations.carrier_code?trim?json_string}"},
<#else>
"Carrier" : {"ActorID": "TRA${receipt.carrier_informations.carrier_code?trim?json_string}"},
</#if>
<#else>
<#if uniqueness?? && uniqueness!="" >
"Carrier" : {"ActorID": "${receipt.carrier_informations.carrier_code?trim?json_string}"},
<#else>
"Carrier" : {"ActorID": "CAR${receipt.carrier_informations.carrier_code?trim?json_string}"},
</#if>
</#if>
</#if> </#if>