update FTL

This commit is contained in:
Francis REAT 2025-04-15 18:15:06 +02:00
parent 1905105118
commit 320bd8988b
12 changed files with 83 additions and 49 deletions

View File

@ -6,6 +6,6 @@ These FTL core files aim to translate data flow from Reflex WMS into Reflex plat
You can find more info about those files in the Reflex platform documentation center : https://docs.viz.reflex-platform.com/connectivity/howto/reflex-wms-connector/ You can find more info about those files in the Reflex platform documentation center : https://docs.viz.reflex-platform.com/connectivity/partnerapp/reflex-wms-connector/

View File

@ -17,12 +17,15 @@
<#assign dispute = JsonUtil.jsonToMap(dataRfx)> <#assign dispute = JsonUtil.jsonToMap(dataRfx)>
[ [
<#if dispute.dispute_closed == true > <#if dispute.dispute_closed == true >
<#if ((dispute.dispute_type_code=="030" || dispute.dispute_type_code=="070") && dispute.dispute_reception?? && dispute.dispute_reception.reception_reference!="") || (dispute.dispute_type_code=="050" && dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string!="")>
{ {
<#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimCreated> <#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimCreated>
"apiReflexPlatformID" : "${apiReflexPlatformID}", "apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" : "datas" :
<#include "RFXtoRP_HsaDispute_Created.ftl"> <#include "RFXtoRP_HsaDispute_Created.ftl">
}, }
<#if TableReasonCode[dispute.dispute_reason_code]??>
,
{ {
<#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimMessageSent> <#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimMessageSent>
"apiReflexPlatformID" : "${apiReflexPlatformID}", "apiReflexPlatformID" : "${apiReflexPlatformID}",
@ -32,6 +35,10 @@
<#else> <#else>
<#stop> <#stop>
</#if> </#if>
<#else>
<#stop "Reference is empty">
</#if>
</#if>
] ]
<#break> <#break>

View File

@ -39,29 +39,28 @@
</#if> </#if>
"Value": "${dispute.dispute_amount}" "Value": "${dispute.dispute_amount}"
}, },
<#-- To configure -->
<#include "RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl">
<#if dispute.dispute_type_code=="050" > <#if dispute.dispute_type_code=="050" >
<#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0>
"EntityID":"${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string}", "EntityID":"${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string}",
<#else> "DisplayID":"${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string}",
<#stop "preparation order list is empty" >
</#if>
<#else> <#else>
<#if dispute.dispute_type_code=="070" || dispute.dispute_type_code=="030" > <#if dispute.dispute_type_code=="070" || dispute.dispute_type_code=="030" >
"EntityID":"${dispute.dispute_reception.reception_reference?trim?json_string}", "EntityID":"${dispute.dispute_reception.reception_reference?trim?json_string}",
"DisplayID":"${dispute.dispute_reception.reception_reference?trim?json_string}",
<#else> <#else>
<#stop "Type not supported" > <#stop "WMS type code not supported">
</#if> </#if>
</#if> </#if>
<#-- To configure -->
<#include "RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl">
<#if TableReasonCode[dispute.dispute_reason_code]??> <#if TableReasonCode[dispute.dispute_reason_code]??>
"ClaimTypeID":"${TableReasonCode[dispute.dispute_reason_code]}" "ClaimTypeID":"CLAIMTYPE_${projectRP}_ORDER_${TableReasonCode[dispute.dispute_reason_code]}"
<#else> <#else>
<#stop "Claim reason code not supported" > <#stop "Reason code not supported">
</#if> </#if>
} }
} }
] ]

View File

@ -26,15 +26,15 @@
<#else> <#else>
"PriorityDate": "1970-01-01T00:00:00Z", "PriorityDate": "1970-01-01T00:00:00Z",
</#if> </#if>
<#-- 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}",
"OrderID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}",
<#else> <#else>
"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}",
"OrderID": "${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}",
"ActorID": "${RFXtoRPprefixDepot(reflexMvtStockInterface.physical_depot_code?trim?json_string)}", "ActorID": "${RFXtoRPprefixDepot(reflexMvtStockInterface.physical_depot_code?trim?json_string)}",

View File

@ -54,7 +54,7 @@
"ExternalMoveRef" : "${reflexMvtStockInterface.ipg_move_year_number} - ${reflexMvtStockInterface.ipg_move_number}", "ExternalMoveRef" : "${reflexMvtStockInterface.ipg_move_year_number} - ${reflexMvtStockInterface.ipg_move_number}",
"Type": "${MoveType_KV[reflexMvtStockInterface.ipg_move_type]!reflexMvtStockInterface.ipg_move_type}", "Type": "${MoveType_KV[reflexMvtStockInterface.ipg_move_type]!reflexMvtStockInterface.ipg_move_type}",
<#if reflexMvtStockInterface.ipg_move_type == "520" > <#if reflexMvtStockInterface.ipg_move_type == "520" >
"Reason": " Transfert ${RFXtoRPprefixDepot(reflexMvtStockInterface.physical_depot_code?trim?json_string)} to ${RFXtoRPprefixDepot(reflexMvtStockInterface.transfer_consignee_physical_depot_code?trim?json_string)}", "Reason": " Direct Transfert ${RFXtoRPprefixDepot(reflexMvtStockInterface.physical_depot_code?trim?json_string)} to ${RFXtoRPprefixDepot(reflexMvtStockInterface.transfer_consignee_physical_depot_code?trim?json_string)}",
<#else> <#else>
"Reason": "${reflexMvtStockInterface.miscellaneous_receipts_despatches_code?json_string}", "Reason": "${reflexMvtStockInterface.miscellaneous_receipts_despatches_code?json_string}",
</#if> </#if>

View File

@ -55,7 +55,7 @@
"${depot.physical_depot_address.other_number?json_string}" "${depot.physical_depot_address.other_number?json_string}"
], ],
</#if> </#if>
"Typology": "TYPOLOGY_UNKNOWN" "Typology": "TYPOLOGY_WAREHOUSE"
} }
} }
] ]

View File

@ -6,6 +6,7 @@
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project> <#assign projectRP = project>
<#assign organisationRP = organisation> <#assign organisationRP = organisation>
<#include "RFX_PartnerAPP_Settings.ftl">
<#assign aDateTime = .now> <#assign aDateTime = .now>
@ -54,7 +55,7 @@
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") 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> <#list preparation_line.despatched_ipg_list as despatched_ipg>
<#assign HUadded_packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) /> <#assign HUadded_packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) />
<#if !hd_numberHmap[despatched_ipg.hd_number]?? > <#if !hd_numberHmap[despatched_ipg.hd_number]?? && (trackingNumberSource==2 || trackingNumberSource==3 || (despatched_ipg.consignment_unit_id!="" && trackingNumberSource==1))>
<#assign hd_numberHmap += {despatched_ipg.hd_number,despatched_ipg.hd_number}> <#assign hd_numberHmap += {despatched_ipg.hd_number,despatched_ipg.hd_number}>
, ,
{ {
@ -78,7 +79,7 @@
"datas" : "datas" :
<#include "RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl"> <#include "RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl">
} }
<#if !hd_numberHmapHUadded[despatched_ipg.hd_number]??> <#if !hd_numberHmapHUadded[despatched_ipg.hd_number]?? && (trackingNumberSource==2 || trackingNumberSource==3 )>
<#assign hd_numberHmapHUadded += {despatched_ipg.hd_number,despatched_ipg.hd_number}> <#assign hd_numberHmapHUadded += {despatched_ipg.hd_number,despatched_ipg.hd_number}>
, ,
{ {

View File

@ -3,7 +3,7 @@
[ [
<#assign dispatched3_datetime = RfxDateTimetoUTCWithTimezone(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_rfx) /> <#assign dispatched3_datetime = RfxDateTimetoUTCWithTimezone(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_rfx) />
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list??) as preparation_line3> <#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.despatched_ipg_list?size != 0) as preparation_line3>
<#list preparation_line3.despatched_ipg_list?filter(j ->j.carton_number!="000000000000000000") as despatched_ipg3> <#list preparation_line3.despatched_ipg_list?filter(j ->j.carton_number!="000000000000000000") as despatched_ipg3>
<#if !refIDHmap[despatched_ipg3.carton_number]?? > <#if !refIDHmap[despatched_ipg3.carton_number]?? >
<#if refIDHmap?size != 0 > <#if refIDHmap?size != 0 >

View File

@ -3,7 +3,7 @@
[ [
<#assign dispatched_datetime = RfxDateTimetoUTCWithTimezone(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_rfx) /> <#assign dispatched_datetime = RfxDateTimetoUTCWithTimezone(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_rfx) />
<#assign refIDHmap_local ={}> <#assign refIDHmap_local ={}>
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") as preparation_line> <#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.despatched_ipg_list?size != 0 && l.preparation_order_originator_reference!="") as preparation_line>
<#list preparation_line.despatched_ipg_list as despatched_ipg> <#list preparation_line.despatched_ipg_list as despatched_ipg>
<#if !refIDHmap_local[despatched_ipg.hd_number]?? > <#if !refIDHmap_local[despatched_ipg.hd_number]?? >
<#if refIDHmap_local?size != 0 > <#if refIDHmap_local?size != 0 >

View File

@ -2,7 +2,7 @@
<#include "HfRpConfig.ftl"> <#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl"> <#include "ActorPrefix.ftl">
[ [
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") as preparation_line> <#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.despatched_ipg_list?size != 0 && l.preparation_order_originator_reference!="") as preparation_line>
<#list preparation_line.despatched_ipg_list as despatched_ipg> <#list preparation_line.despatched_ipg_list as despatched_ipg>
<#assign packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) /> <#assign packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) />
{ {
@ -112,6 +112,7 @@
<#-- Segmentation Keys inclusion --> <#-- Segmentation Keys inclusion -->
<#include "RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl"> <#include "RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl">
}, },
"OrderID": "${preparation_line.preparation_order_originator_reference?trim?json_string}",
"ExecutionflowID": "${preparation_line.preparation_order_originator_reference?trim?json_string}", "ExecutionflowID": "${preparation_line.preparation_order_originator_reference?trim?json_string}",
<#if (preparation_line.pro_originator_reference_line_number!0) != 0> <#if (preparation_line.pro_originator_reference_line_number!0) != 0>
"LineID": "${preparation_line.pro_originator_reference_line_number}", "LineID": "${preparation_line.pro_originator_reference_line_number}",

View File

@ -1,6 +1,7 @@
<#include "HfRpConfig.ftl"> <#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl"> <#include "ReflexUtils.ftl">
<#include "ActorPrefix.ftl"> <#include "ActorPrefix.ftl">
<#include "RFX_PartnerAPP_Settings.ftl">
[ [
<#assign dispatched_datetime4 = RfxDateTimetoUTCWithTimezone(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_rfx) /> <#assign dispatched_datetime4 = RfxDateTimetoUTCWithTimezone(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_rfx) />
{ {
@ -8,6 +9,20 @@
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"ID": { "ID": {
<#switch trackingNumberSource>
<#case 1>
<#if despatched_ipg.consignment_unit_id!="">
"RefID": "${despatched_ipg.consignment_unit_id?trim?json_string}",
</#if>
<#break>
<#case 2>
<#if despatched_ipg.carton_number != "000000000000000000">
"RefID":"${despatched_ipg.carton_number}",
<#else>
"RefID":"${despatched_ipg.hd_number}",
</#if>
<#break>
<#case 3>
<#if despatched_ipg.consignment_unit_id!=""> <#if despatched_ipg.consignment_unit_id!="">
"RefID": "${despatched_ipg.consignment_unit_id?trim?json_string}", "RefID": "${despatched_ipg.consignment_unit_id?trim?json_string}",
<#else> <#else>
@ -17,6 +32,18 @@
"RefID":"${despatched_ipg.hd_number}", "RefID":"${despatched_ipg.hd_number}",
</#if> </#if>
</#if> </#if>
<#break>
<#default>
<#if despatched_ipg.consignment_unit_id!="">
"RefID": "${despatched_ipg.consignment_unit_id?trim?json_string}",
<#else>
<#if despatched_ipg.carton_number != "000000000000000000">
"RefID":"${despatched_ipg.carton_number}",
<#else>
"RefID":"${despatched_ipg.hd_number}",
</#if>
</#if>
</#switch>
"RefDate": { "RefDate": {
"DateTime": "${dispatched_datetime4}", "DateTime": "${dispatched_datetime4}",

View File

@ -52,7 +52,6 @@
"batch_1": "${batch_1?json_string!""}", "batch_1": "${batch_1?json_string!""}",
"optional_attributes": { "optional_attributes": {
<#--"held_for_check": "false", <#--"held_for_check": "false",
"held _for_repacking": "false",
"hold_code": "false", --> "hold_code": "false", -->
"hold_for_specific_code": "false" "hold_for_specific_code": "false"
} }