SCPN1-8597
This commit is contained in:
parent
4a26fd9249
commit
3ca4b61e3b
@ -1,11 +1,11 @@
|
||||
# Reflex Platform Core FTLs
|
||||
|
||||
|
||||
|
||||
|
||||
These FTL core files aim to translate data flow from Reflex WMS into Reflex platform API.
|
||||
|
||||
|
||||
|
||||
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/
|
||||
|
||||
|
||||
|
||||
|
||||
@ -16,16 +16,13 @@
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign dispute = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
<#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!="")>
|
||||
<#if dispute.dispute_closed == true >
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimCreated>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaDispute_Created.ftl">
|
||||
}
|
||||
<#if TableReasonCode[dispute.dispute_reason_code]??>
|
||||
,
|
||||
},
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimMessageSent>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
@ -33,11 +30,7 @@
|
||||
<#include "RFXtoRP_HsaDispute_MessageSent.ftl">
|
||||
}
|
||||
<#else>
|
||||
<#stop>
|
||||
</#if>
|
||||
<#else>
|
||||
<#stop "Reference is empty">
|
||||
</#if>
|
||||
<#stop>
|
||||
</#if>
|
||||
]
|
||||
<#break>
|
||||
|
||||
@ -39,28 +39,29 @@
|
||||
</#if>
|
||||
"Value": "${dispute.dispute_amount}"
|
||||
},
|
||||
<#-- To configure -->
|
||||
<#include "RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl">
|
||||
<#if dispute.dispute_type_code=="050" >
|
||||
"EntityID":"${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string}",
|
||||
"DisplayID":"${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>
|
||||
"EntityID":"${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string}",
|
||||
<#else>
|
||||
<#stop "preparation order list is empty" >
|
||||
</#if>
|
||||
<#else>
|
||||
<#if dispute.dispute_type_code=="070" || dispute.dispute_type_code=="030" >
|
||||
"EntityID":"${dispute.dispute_reception.reception_reference?trim?json_string}",
|
||||
"DisplayID":"${dispute.dispute_reception.reception_reference?trim?json_string}",
|
||||
"EntityID":"${dispute.dispute_reception.reception_reference?trim?json_string}",
|
||||
<#else>
|
||||
<#stop "WMS type code not supported">
|
||||
<#stop "Type not supported" >
|
||||
</#if>
|
||||
</#if>
|
||||
<#-- To configure -->
|
||||
<#include "RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl">
|
||||
|
||||
<#if TableReasonCode[dispute.dispute_reason_code]??>
|
||||
"ClaimTypeID":"CLAIMTYPE_${projectRP}_ORDER_${TableReasonCode[dispute.dispute_reason_code]}"
|
||||
"ClaimTypeID":"${TableReasonCode[dispute.dispute_reason_code]}"
|
||||
<#else>
|
||||
<#stop "Reason code not supported">
|
||||
<#stop "Claim reason code not supported" >
|
||||
</#if>
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
|
||||
|
||||
@ -26,16 +26,15 @@
|
||||
<#else>
|
||||
"PriorityDate": "1970-01-01T00:00:00Z",
|
||||
</#if>
|
||||
|
||||
<#-- Goods received Segmentation Keys inclusion -->
|
||||
<#include "RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl">
|
||||
},
|
||||
|
||||
<#if reflexMvtStockInterface.receipt_reference!="">
|
||||
"ExecutionflowID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}",
|
||||
"OrderID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}",
|
||||
<#else>
|
||||
"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>
|
||||
"LineID": "${reflexMvtStockInterface.receipt_line_number}",
|
||||
"ActorID": "${RFXtoRPprefixDepot(reflexMvtStockInterface.physical_depot_code?trim?json_string)}",
|
||||
@ -48,4 +47,4 @@
|
||||
}
|
||||
}
|
||||
|
||||
]
|
||||
]
|
||||
|
||||
@ -54,7 +54,7 @@
|
||||
"ExternalMoveRef" : "${reflexMvtStockInterface.ipg_move_year_number} - ${reflexMvtStockInterface.ipg_move_number}",
|
||||
"Type": "${MoveType_KV[reflexMvtStockInterface.ipg_move_type]!reflexMvtStockInterface.ipg_move_type}",
|
||||
<#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>
|
||||
"Reason": "${reflexMvtStockInterface.miscellaneous_receipts_despatches_code?json_string}",
|
||||
</#if>
|
||||
|
||||
@ -55,7 +55,7 @@
|
||||
"${depot.physical_depot_address.other_number?json_string}"
|
||||
],
|
||||
</#if>
|
||||
"Typology": "TYPOLOGY_WAREHOUSE"
|
||||
"Typology": "TYPOLOGY_UNKNOWN"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
<#assign organisationRP = organisation>
|
||||
<#include "RFX_PartnerAPP_Settings.ftl">
|
||||
|
||||
<#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 preparation_line.despatched_ipg_list as despatched_ipg>
|
||||
<#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}>
|
||||
,
|
||||
{
|
||||
@ -79,16 +78,16 @@
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl">
|
||||
}
|
||||
<#if !hd_numberHmapHUadded[despatched_ipg.hd_number]?? && (trackingNumberSource==2 || trackingNumberSource==3 )>
|
||||
<#assign hd_numberHmapHUadded += {despatched_ipg.hd_number,despatched_ipg.hd_number}>
|
||||
,
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPrepa_HUsAdded_TrackingHuLabelled.ftl">
|
||||
}
|
||||
</#if>
|
||||
<#if !hd_numberHmapHUadded[despatched_ipg.hd_number]??>
|
||||
<#assign hd_numberHmapHUadded += {despatched_ipg.hd_number,despatched_ipg.hd_number}>
|
||||
,
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPrepa_HUsAdded_TrackingHuLabelled.ftl">
|
||||
}
|
||||
</#if>
|
||||
|
||||
</#if>
|
||||
</#list>
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
[
|
||||
<#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>
|
||||
<#if !refIDHmap[despatched_ipg3.carton_number]?? >
|
||||
<#if refIDHmap?size != 0 >
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
[
|
||||
<#assign dispatched_datetime = RfxDateTimetoUTCWithTimezone(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_rfx) />
|
||||
<#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>
|
||||
<#if !refIDHmap_local[despatched_ipg.hd_number]?? >
|
||||
<#if refIDHmap_local?size != 0 >
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<#include "HfRpConfig.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>
|
||||
<#assign packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) />
|
||||
{
|
||||
@ -112,7 +112,6 @@
|
||||
<#-- Segmentation Keys inclusion -->
|
||||
<#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}",
|
||||
<#if (preparation_line.pro_originator_reference_line_number!0) != 0>
|
||||
"LineID": "${preparation_line.pro_originator_reference_line_number}",
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#include "ActorPrefix.ftl">
|
||||
<#include "RFX_PartnerAPP_Settings.ftl">
|
||||
[
|
||||
<#assign dispatched_datetime4 = RfxDateTimetoUTCWithTimezone(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_rfx) />
|
||||
{
|
||||
@ -9,41 +8,15 @@
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"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!="">
|
||||
"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>
|
||||
<#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>
|
||||
|
||||
"RefDate": {
|
||||
"DateTime": "${dispatched_datetime4}",
|
||||
|
||||
@ -52,6 +52,7 @@
|
||||
"batch_1": "${batch_1?json_string!""}",
|
||||
"optional_attributes": {
|
||||
<#--"held_for_check": "false",
|
||||
"held _for_repacking": "false",
|
||||
"hold_code": "false", -->
|
||||
"hold_for_specific_code": "false"
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user