Merge branch 'SCPN1-8597' into 'release/1.2'

SCPN1-8597

See merge request r-d-technique/tiers/reflex-wms-connector!96
This commit is contained in:
Francis REAT 2025-04-09 09:46:01 +00:00
commit 4502df6fb0
12 changed files with 48 additions and 83 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/partnerapp/reflex-wms-connector/ 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/

View File

@ -16,16 +16,13 @@
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#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}",
@ -33,11 +30,7 @@
<#include "RFXtoRP_HsaDispute_MessageSent.ftl"> <#include "RFXtoRP_HsaDispute_MessageSent.ftl">
} }
<#else> <#else>
<#stop> <#stop>
</#if>
<#else>
<#stop "Reference is empty">
</#if>
</#if> </#if>
] ]
<#break> <#break>

View File

@ -39,28 +39,29 @@
</#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" >
"EntityID":"${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string}", <#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0>
"DisplayID":"${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>
<#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 "WMS type code not supported"> <#stop "Type 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":"CLAIMTYPE_${projectRP}_ORDER_${TableReasonCode[dispute.dispute_reason_code]}" "ClaimTypeID":"${TableReasonCode[dispute.dispute_reason_code]}"
<#else> <#else>
<#stop "Reason code not supported"> <#stop "Claim reason code not supported" >
</#if> </#if>
} }
} }
] ]

View File

@ -26,16 +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": " Direct Transfert ${RFXtoRPprefixDepot(reflexMvtStockInterface.physical_depot_code?trim?json_string)} to ${RFXtoRPprefixDepot(reflexMvtStockInterface.transfer_consignee_physical_depot_code?trim?json_string)}", "Reason": " 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_WAREHOUSE" "Typology": "TYPOLOGY_UNKNOWN"
} }
} }
] ]

View File

@ -6,7 +6,6 @@
<#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>
@ -55,7 +54,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]?? && (trackingNumberSource==2 || trackingNumberSource==3 || (despatched_ipg.consignment_unit_id!="" && trackingNumberSource==1))> <#if !hd_numberHmap[despatched_ipg.hd_number]?? >
<#assign hd_numberHmap += {despatched_ipg.hd_number,despatched_ipg.hd_number}> <#assign hd_numberHmap += {despatched_ipg.hd_number,despatched_ipg.hd_number}>
, ,
{ {
@ -79,16 +78,16 @@
"datas" : "datas" :
<#include "RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl"> <#include "RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl">
} }
<#if !hd_numberHmapHUadded[despatched_ipg.hd_number]?? && (trackingNumberSource==2 || trackingNumberSource==3 )> <#if !hd_numberHmapHUadded[despatched_ipg.hd_number]??>
<#assign hd_numberHmapHUadded += {despatched_ipg.hd_number,despatched_ipg.hd_number}> <#assign hd_numberHmapHUadded += {despatched_ipg.hd_number,despatched_ipg.hd_number}>
, ,
{ {
<#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled> <#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled>
"apiReflexPlatformID" : "${apiReflexPlatformID}", "apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" : "datas" :
<#include "RFXtoRP_HsrPrepa_HUsAdded_TrackingHuLabelled.ftl"> <#include "RFXtoRP_HsrPrepa_HUsAdded_TrackingHuLabelled.ftl">
} }
</#if> </#if>
</#if> </#if>
</#list> </#list>

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?? && l.despatched_ipg_list?size != 0) as preparation_line3> <#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list??) 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.despatched_ipg_list?size != 0 && 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>
<#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.despatched_ipg_list?size != 0 && 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 packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) /> <#assign packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) />
{ {
@ -112,7 +112,6 @@
<#-- 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,7 +1,6 @@
<#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) />
{ {
@ -9,41 +8,15 @@
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"ID": { "ID": {
<#switch trackingNumberSource> <#if despatched_ipg.consignment_unit_id!="">
<#case 1> "RefID": "${despatched_ipg.consignment_unit_id?trim?json_string}",
<#if despatched_ipg.consignment_unit_id!=""> <#else>
"RefID": "${despatched_ipg.consignment_unit_id?trim?json_string}", <#if despatched_ipg.carton_number != "000000000000000000">
</#if> "RefID":"${despatched_ipg.carton_number}",
<#break> <#else>
<#case 2> "RefID":"${despatched_ipg.hd_number}",
<#if despatched_ipg.carton_number != "000000000000000000"> </#if>
"RefID":"${despatched_ipg.carton_number}", </#if>
<#else>
"RefID":"${despatched_ipg.hd_number}",
</#if>
<#break>
<#case 3>
<#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>
<#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,6 +52,7 @@
"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"
} }