Merge branch 'develop-1.2' into connector-1.2-to-visibility1.10
# Conflicts: # RFXtoRP_HsaDispute.ftl # RFXtoRP_HsaDispute_Created.ftl # RFXtoRP_HsaIpgMove_StockMoved.ftl # RFXtoRP_HsrDepot_ActorCreated.ftl # RFXtoRP_HsrPrepa.ftl # RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl
This commit is contained in:
commit
0b70c90257
@ -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/
|
||||
|
||||
|
||||
|
||||
1
RFX_PartnerAPP_Settings.ftl
Normal file
1
RFX_PartnerAPP_Settings.ftl
Normal file
@ -0,0 +1 @@
|
||||
<#assign trackingNumberSource = 3>
|
||||
@ -17,12 +17,15 @@
|
||||
<#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!="")>
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimCreated>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaDispute_Created.ftl">
|
||||
},
|
||||
}
|
||||
<#if TableReasonCode[dispute.dispute_reason_code]??>
|
||||
,
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimMessageSent>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
@ -32,6 +35,10 @@
|
||||
<#else>
|
||||
<#stop>
|
||||
</#if>
|
||||
<#else>
|
||||
<#stop "Reference is empty">
|
||||
</#if>
|
||||
</#if>
|
||||
]
|
||||
<#break>
|
||||
|
||||
|
||||
@ -39,29 +39,28 @@
|
||||
</#if>
|
||||
"Value": "${dispute.dispute_amount}"
|
||||
},
|
||||
<#-- To configure -->
|
||||
<#include "RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl">
|
||||
<#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}",
|
||||
<#else>
|
||||
<#stop "preparation order list is empty" >
|
||||
</#if>
|
||||
"DisplayID":"${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string}",
|
||||
<#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}",
|
||||
<#else>
|
||||
<#stop "Type not supported" >
|
||||
<#stop "WMS type code not supported">
|
||||
</#if>
|
||||
</#if>
|
||||
<#-- To configure -->
|
||||
<#include "RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl">
|
||||
|
||||
<#if TableReasonCode[dispute.dispute_reason_code]??>
|
||||
"ClaimTypeID":"${TableReasonCode[dispute.dispute_reason_code]}"
|
||||
"ClaimTypeID":"CLAIMTYPE_${projectRP}_ORDER_${TableReasonCode[dispute.dispute_reason_code]}"
|
||||
<#else>
|
||||
<#stop "Claim reason code not supported" >
|
||||
<#stop "Reason code not supported">
|
||||
</#if>
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
|
||||
|
||||
@ -26,15 +26,16 @@
|
||||
<#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)}",
|
||||
|
||||
@ -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": " 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>
|
||||
"Reason": "${reflexMvtStockInterface.miscellaneous_receipts_despatches_code?json_string}",
|
||||
</#if>
|
||||
|
||||
@ -55,7 +55,7 @@
|
||||
"${depot.physical_depot_address.other_number?json_string}"
|
||||
],
|
||||
</#if>
|
||||
"Typology": "TYPOLOGY_UNKNOWN"
|
||||
"Typology": "TYPOLOGY_WAREHOUSE"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
<#assign organisationRP = organisation>
|
||||
<#include "RFX_PartnerAPP_Settings.ftl">
|
||||
|
||||
<#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 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]?? >
|
||||
<#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}>
|
||||
,
|
||||
{
|
||||
@ -78,7 +79,7 @@
|
||||
"datas" :
|
||||
<#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}>
|
||||
,
|
||||
{
|
||||
|
||||
@ -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??) 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>
|
||||
<#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.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>
|
||||
<#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.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>
|
||||
<#assign packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) />
|
||||
{
|
||||
@ -112,6 +112,7 @@
|
||||
<#-- 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,6 +1,7 @@
|
||||
<#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) />
|
||||
{
|
||||
@ -8,6 +9,20 @@
|
||||
"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>
|
||||
@ -17,6 +32,18 @@
|
||||
"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": {
|
||||
"DateTime": "${dispatched_datetime4}",
|
||||
|
||||
38
RP_connector.ftl
Normal file
38
RP_connector.ftl
Normal file
@ -0,0 +1,38 @@
|
||||
<#-- ****
|
||||
Connector provides some of parameters through the class connectorParameters
|
||||
those parameters are stored in FTL file Conf-connector.ftl for later use in some of the data ftl files
|
||||
*** -->
|
||||
|
||||
<#-- *********************************************** Parameter global ******************** -->
|
||||
<#assign file = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
<#assign organisationRP = organisation>
|
||||
<#assign aDateTime = .now>
|
||||
|
||||
<#noparse><#-- Date of last generation : </#noparse>${aDateTime}<#noparse> --></#noparse>
|
||||
<#noparse><#-- /!\ Warning the file is generated, if you modify it manually, do not enable automatic update via the pipeline --></#noparse>
|
||||
|
||||
<#noparse><#-- Possible values for SupplyOfTheTrackingNumber parameter : --></#noparse>
|
||||
<#noparse><#-- 0 : Always empty --></#noparse>
|
||||
<#noparse><#-- 1 : Always use Reflex WMS tracking --></#noparse>
|
||||
<#noparse><#-- 2 : Always use the HU number --></#noparse>
|
||||
<#noparse><#-- 3 : Use Reflex tracking if it exists, the HU number otherwise --></#noparse>
|
||||
|
||||
<#list file.parameters as parameter>
|
||||
<#switch parameter.type>
|
||||
<#case "string">
|
||||
<#noparse><#assign </#noparse>${parameter.name}<#noparse> = "</#noparse>${parameter.value!""}<#noparse>"></#noparse>
|
||||
<#break>
|
||||
|
||||
<#case "integer">
|
||||
<#noparse><#assign </#noparse>${parameter.name}<#noparse> = </#noparse>${parameter.value!0}<#noparse>></#noparse>
|
||||
<#break>
|
||||
|
||||
<#case "boolean">
|
||||
<#noparse><#assign </#noparse>${parameter.name}<#noparse> = </#noparse>${(parameter.value!false)?c}<#noparse>></#noparse>
|
||||
<#break>
|
||||
|
||||
<#default>
|
||||
|
||||
</#switch>
|
||||
</#list>
|
||||
@ -52,7 +52,6 @@
|
||||
"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