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 "HfRpConfig.ftl">
[
<#list reflexStockPicturesInterface.detailled_stock_list as stock>
{
@ -6,8 +8,20 @@
"ProjectID": "${projectRP}"
},
"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": {
<#assign generation_date = RfxDateTimetoUTC(stock.generation_date,time_zone_offset_rfx) />
"Snapshot": {
@ -15,8 +29,20 @@
"DateTime": "${generation_date}",
"AuthorTimeZone": "${time_zone_rfx}"
},
<#if text_language_rfx="fr">
<#if uniqueness?? && uniqueness!="" >
"ID": "${stock.physical_depot_code}-${idSnapshot}",
"MessageNb": ${sum_elt}
<#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}
}
}

View File

@ -1,4 +1,5 @@
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl">
[
<#list reflexStockPicturesInterface.detailled_stock_list as stock>
{
@ -6,19 +7,45 @@
"ProjectID": "${projectRP}"
},
"Payload": {
"ActorID": "${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>
<#assign generation_date = RfxDateTimetoUTC(stock.generation_date,time_zone_offset_rfx) />
"Snapshot": {
"DateTime": {
"DateTime": "${generation_date}",
"AuthorTimeZone": "${time_zone_rfx}"
},
"ID": "${stock.physical_depot_code}-${idSnapshot}",
"Quantity":
{
"Value" : "${stock.quantity_in_base_lvs!"0"}",
"LVID": "${quantity_in_base_lv_RP_Cst}"
}
<#if text_language_rfx="fr">
<#if uniqueness?? && uniqueness!="" >
"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":
{
"Value" : "${stock.quantity_in_base_lvs!"0"}",
"LVID": "${quantity_in_base_lv_RP_Cst}"
}
},
"Goods": {

View File

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

View File

@ -1,10 +1,24 @@
<#include "HfRpConfig.ftl">
[
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${carrier.carrier_code?trim?json_string}"
<#if text_language_rfx="fr">
<#if uniqueness?? && uniqueness!="" >
"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": {}

View File

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

View File

@ -1,10 +1,23 @@
<#include "HfRpConfig.ftl">
[
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${actor.code?trim?json_string}"
<#if text_language_rfx="fr">
<#if uniqueness?? && uniqueness!="" >
"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": {}

View File

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

View File

@ -42,11 +42,20 @@
"LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}"
},
<#if text_language_rfx="fr">
<#if uniqueness?? && uniqueness!="" >
"ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}",
<#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>
"Movement": {
"DateTime": {

View File

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

View File

@ -1,10 +1,23 @@
<#include "HfRpConfig.ftl">
[
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${actor.code?trim?json_string}"
<#if text_language_rfx="fr">
<#if uniqueness?? && uniqueness!="" >
"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": {}

View File

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

View File

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

View File

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

View File

@ -18,7 +18,21 @@
},
"Payload":{
"Carrier": {
"ActorID":"${preparationOrder.load_data.carrier_code?trim?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>
}
}
}

View File

@ -18,7 +18,19 @@
<#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" >
,
"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>

View File

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

View File

@ -29,12 +29,37 @@
},
"ShipTo" :
{
"ActorID": "${receipt.physical_depot_code?trim?json_string}"
<#if text_language_rfx="fr">
<#if uniqueness?? && uniqueness!="" >
"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,
<#if receipt.carrier_informations.carrier_code != "">
"Carrier" : {"ActorID": "${receipt.carrier_informations.carrier_code?trim?json_string}"},
<#if text_language_rfx="fr">
<#if uniqueness?? && uniqueness!="" >
"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>