Ajout OrderID
This commit is contained in:
parent
dbffc01a70
commit
7ae70dae92
@ -8,7 +8,7 @@
|
||||
},
|
||||
"ID": {
|
||||
<#if dispute.dispute_preparation??>
|
||||
<#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0>
|
||||
<#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0>
|
||||
"RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_activity_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
||||
<#else>
|
||||
<#stop "preparation order list is empty" >
|
||||
@ -21,7 +21,7 @@
|
||||
},
|
||||
"Payload": {
|
||||
<#if dispute.dispute_reference?? && dispute.dispute_reference!="">
|
||||
"Title":"${dispute.dispute_reference?trim?json_string}",
|
||||
"Title":"${dispute.dispute_reference?json_string}",
|
||||
<#else>
|
||||
"Title":"",
|
||||
</#if>
|
||||
@ -43,21 +43,34 @@
|
||||
<#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}",
|
||||
"EntityID":"${dispute.dispute_preparation.preparation_order_list[0].preparation_order_physical_depot_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_activity_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string}",
|
||||
<#if TableReasonCode[dispute.dispute_reason_code]??>
|
||||
"ClaimTypeID":"CLAIMTYPE_${projectRP}_ORDER_${TableReasonCode[dispute.dispute_reason_code]}"
|
||||
"ClaimTypeID":"CLAIMTYPE_${projectRP}_EXECUTIONFLOW_${TableReasonCode[dispute.dispute_reason_code]}"
|
||||
<#else>
|
||||
<#stop "preparation order list is empty" >
|
||||
<#stop>
|
||||
</#if>
|
||||
<#else>
|
||||
<#stop>
|
||||
</#if>
|
||||
<#else>
|
||||
<#if dispute.dispute_type_code=="070" || dispute.dispute_type_code=="030" >
|
||||
"EntityID":"${dispute.dispute_reception.reception_reference?trim?json_string}",
|
||||
<#if TableReasonCode[dispute.dispute_reason_code]??>
|
||||
"ClaimTypeID":"CLAIMTYPE_${projectRP}_ORDER_${TableReasonCode[dispute.dispute_reason_code]}"
|
||||
<#if dispute.dispute_reception.reception_type_code=="030">
|
||||
"EntityID":"${dispute.dispute_reception.reception_supplier.supplier_transfer_physical_depot?json_string}${dispute.dispute_reception.reception_supplier.supplier_activity_code?json_string}${dispute.dispute_reception.reception_contractor_code?json_string}${dispute.dispute_reception.reception_reference?json_string}",
|
||||
<#if TableReasonCode[dispute.dispute_reason_code]??>
|
||||
"ClaimTypeID":"CLAIMTYPE_${projectRP}_EXECUTIONFLOW_${TableReasonCode[dispute.dispute_reason_code]}"
|
||||
<#else>
|
||||
<#stop>
|
||||
</#if>
|
||||
<#else>
|
||||
<#stop "Type not supported" >
|
||||
"EntityID":"${dispute.dispute_reception.reception_physical_depot_code?json_string}${dispute.dispute_reception.reception_activity_code?json_string}${dispute.dispute_reception.reception_contractor_code?json_string}${dispute.dispute_reception.reception_reference?json_string}",
|
||||
<#if TableReasonCode[dispute.dispute_reason_code]??>
|
||||
"ClaimTypeID":"CLAIMTYPE_${projectRP}_EXECUTIONFLOW_${TableReasonCode[dispute.dispute_reason_code]}"
|
||||
<#else>
|
||||
<#stop>
|
||||
</#if>
|
||||
</#if>
|
||||
<#else>
|
||||
<#stop>
|
||||
</#if>
|
||||
</#if>
|
||||
}
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
"Goods": {
|
||||
"ItemID": "${reflexMvtStockInterface.item_code?trim?json_string}",
|
||||
"LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}",
|
||||
<#if (reflexMvtStockInterface.ipg_priority_date!="") && (reflexMvtStockInterface.ipg_priority_date?starts_with("00")== false) >
|
||||
<#if (priority_date!="") && (priority_date?starts_with("00")== false) >
|
||||
"PriorityDate": "${priority_date}",
|
||||
<#else>
|
||||
"PriorityDate": "1970-01-01T00:00:00Z",
|
||||
@ -32,9 +32,11 @@
|
||||
},
|
||||
|
||||
<#if reflexMvtStockInterface.receipt_reference!="">
|
||||
"ExecutionflowID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}",
|
||||
"ExecutionflowID": "${reflexMvtStockInterface.original_receipt_physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${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)}",
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
||||
"RefID": "${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
||||
"RefDate": {
|
||||
"DateTime": "${preparation_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
||||
"RefID": "${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
||||
"RefDate": {
|
||||
"DateTime": "${preparation_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
||||
"RefID": "${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
||||
"RefDate": {
|
||||
"DateTime": "${preparation_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
||||
"RefID": "${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
||||
"RefDate": {
|
||||
"DateTime": "${preparation_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
||||
"RefID": "${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
||||
"RefDate": {
|
||||
"DateTime": "${preparation_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
|
||||
@ -40,12 +40,6 @@
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPrepa_CarrierUpdated.ftl">
|
||||
},
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.OrderCarrierUpdated>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl">
|
||||
}
|
||||
</#if>
|
||||
|
||||
@ -54,7 +48,7 @@
|
||||
<#assign hd_numberHmapHUadded ={}>
|
||||
<#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) />
|
||||
<#assign HUadded_packing_datetime = RfxDateTimetoUTC(preparation_line.confirmation_datetime,time_zone_offset_rfx) />
|
||||
<#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}>
|
||||
,
|
||||
@ -80,15 +74,15 @@
|
||||
<#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>
|
||||
<#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>
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID":{
|
||||
"RefID": "${OrderOriginReference}"
|
||||
"RefID": "${preparation_line.pro_physical_depot_code?trim?json_string}${preparationOrder.activity_code?trim?json_string}${preparation_line.pro_originator_code?trim?json_string}${preparation_line.preparation_order_originator_reference?trim?json_string}"
|
||||
},
|
||||
"Payload":{
|
||||
"Carrier": {
|
||||
|
||||
@ -77,19 +77,19 @@
|
||||
"ItemID": "${preparation_line.item_code?trim?json_string}",
|
||||
"LVBranchID": "${preparation_line.item_lv_code?json_string}",
|
||||
|
||||
<#if (despatched_ipg.ipg_use_by_date?length != 0) && (despatched_ipg.ipg_use_by_date?starts_with("00")== false)>
|
||||
<#assign priority_date = despatched_ipg.ipg_use_by_date?datetime(rfx_date_format_default)?iso_utc />
|
||||
"PriorityDate": "${priority_date}",
|
||||
<#else>
|
||||
<#if (despatched_ipg.ipg_best_before_date?length != 0) && (despatched_ipg.ipg_best_before_date?starts_with("00")== false)>
|
||||
<#assign priority_date = despatched_ipg.ipg_best_before_date?datetime(rfx_date_format_default)?iso_utc />
|
||||
<#if (despatched_ipg.ipg_use_by_date?length != 0) && (despatched_ipg.ipg_use_by_date?starts_with("00")== false)>
|
||||
<#assign priority_date = despatched_ipg.ipg_use_by_date?datetime(rfx_date_format_default)?iso_utc />
|
||||
"PriorityDate": "${priority_date}",
|
||||
<#else>
|
||||
<#if (despatched_ipg.ipg_best_before_date?length != 0) && (despatched_ipg.ipg_best_before_date?starts_with("00")== false)>
|
||||
<#assign priority_date = despatched_ipg.ipg_best_before_date?datetime(rfx_date_format_default)?iso_utc />
|
||||
"PriorityDate": "${priority_date}",
|
||||
<#else>
|
||||
<#if (despatched_ipg.ipg_sell_by_date?length != 0) && (despatched_ipg.ipg_sell_by_date?starts_with("00")== false)>
|
||||
<#assign priority_date = despatched_ipg.ipg_sell_by_date?datetime(rfx_date_format_default)?iso_utc />
|
||||
"PriorityDate": "${priority_date}",
|
||||
<#else>
|
||||
<#if (despatched_ipg.ipg_sell_by_date?length != 0) && (despatched_ipg.ipg_sell_by_date?starts_with("00")== false)>
|
||||
<#assign priority_date = despatched_ipg.ipg_sell_by_date?datetime(rfx_date_format_default)?iso_utc />
|
||||
"PriorityDate": "${priority_date}",
|
||||
<#else>
|
||||
<#if (despatched_ipg.ipg_manufacture_date?length != 0) && (despatched_ipg.ipg_manufacture_date?starts_with("00") == false)>
|
||||
<#else>
|
||||
<#if (despatched_ipg.ipg_manufacture_date?length != 0) && (despatched_ipg.ipg_manufacture_date?starts_with("00") == false)>
|
||||
<#assign priority_date = despatched_ipg.ipg_manufacture_date?datetime(rfx_date_format_default)?iso_utc />
|
||||
"PriorityDate": "${priority_date}",
|
||||
<#else>
|
||||
@ -112,7 +112,8 @@
|
||||
<#-- Segmentation Keys inclusion -->
|
||||
<#include "RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl">
|
||||
},
|
||||
"ExecutionflowID": "${preparation_line.preparation_order_originator_reference?trim?json_string}",
|
||||
"OrderID": "${preparation_line.preparation_order_originator_reference?trim?json_string}",
|
||||
"ExecutionflowID": "${preparation_line.pro_physical_depot_code?trim?json_string}${preparationOrder.activity_code?trim?json_string}${preparation_line.pro_originator_code?trim?json_string}${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}",
|
||||
<#else>
|
||||
|
||||
@ -1,29 +0,0 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#include "ActorPrefix.ftl">
|
||||
[
|
||||
<#assign refIDHmap_local ={}>
|
||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.preparation_order_originator_reference!="") as preparation_line>
|
||||
<#assign OrderOriginReference = preparation_line.preparation_order_originator_reference?trim?json_string>
|
||||
<#if !refIDHmap_local[OrderOriginReference]?? >
|
||||
<#if refIDHmap_local?size != 0 >
|
||||
,
|
||||
</#if>
|
||||
<#assign refIDHmap_local +={OrderOriginReference,OrderOriginReference}>
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID":{
|
||||
"RefID": "${OrderOriginReference}"
|
||||
},
|
||||
"Payload":{
|
||||
"Carrier": {
|
||||
"ActorID": "${RFXtoRPprefixCarrier(preparationOrder.load_data.carrier_code?trim?json_string)}"
|
||||
}
|
||||
}
|
||||
}
|
||||
</#if>
|
||||
</#list>
|
||||
<#assign refIDHmap_local ={}>
|
||||
]
|
||||
@ -7,7 +7,7 @@
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${preparation_order.originator_reference?trim?json_string}",
|
||||
"RefID": "${preparation_order.physical_depot_code?trim?json_string}${preparation_order.activity_code?trim?json_string}${preparation_order.originator_code?trim?json_string}${preparation_order.originator_reference?trim?json_string}",
|
||||
"RefDate": {
|
||||
"DateTime": "${preparation_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${preparation_order.originator_reference?trim?json_string}",
|
||||
"RefID": "${preparation_order.physical_depot_code?trim?json_string}${preparation_order.activity_code?trim?json_string}${preparation_order.originator_code?trim?json_string}${preparation_order.originator_reference?trim?json_string}",
|
||||
"RefDate": {
|
||||
"DateTime": "${pro_creation_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
@ -31,54 +31,53 @@
|
||||
},
|
||||
"ShipFromAcked": true,
|
||||
"ShipTo": {
|
||||
<#if
|
||||
<#-- preparation_order.address.type_code == "" &&
|
||||
preparation_order.address.title_code == "" &&
|
||||
preparation_order.address.first_name == "" &&
|
||||
preparation_order.address.last_name == "" &&
|
||||
preparation_order.address.mail_address == "" &&
|
||||
preparation_order.address.contact_type_code == "" &&
|
||||
preparation_order.address.mobile_phone_number == "" &&
|
||||
preparation_order.address.land_line_phone_number == "" &&
|
||||
preparation_order.address.fax_number == "" && -->
|
||||
preparation_order.address.address_type_code == "" &&
|
||||
preparation_order.address.name_or_company_name == "" &&
|
||||
preparation_order.address.additional_address_data_1 == "" &&
|
||||
preparation_order.address.additional_address_data_2 == "" &&
|
||||
preparation_order.address.post_code_area_name == "" &&
|
||||
preparation_order.address.territorial_division_code == "" &&
|
||||
preparation_order.address.postal_code == "" &&
|
||||
preparation_order.address.iso_country_code == "">
|
||||
"ActorID": "${RFXtoRPprefixConsignee(preparation_order.end_consignee_code?json_string)}"
|
||||
<#if preparation_order.intermediate_consignee_code?? && preparation_order.intermediate_consignee_code!="">
|
||||
"ActorID": "${RFXtoRPprefixDepot(preparation_order.intermediate_consignee_code?json_string)}"
|
||||
<#else>
|
||||
"Actor":
|
||||
{
|
||||
"Name" : "${(preparation_order.address.name_or_company_name!"")?json_string}",
|
||||
"Address" :
|
||||
{
|
||||
"City" : "${(preparation_order.address.post_code_area_name!"")?json_string}",
|
||||
<#assign isCountryCode = JsonUtil.isCountryCode(preparation_order.address.iso_country_code?upper_case) />
|
||||
<#if isCountryCode>
|
||||
"CountryCode" : "${(preparation_order.address.iso_country_code!"")?json_string}",
|
||||
<#else>
|
||||
"CountryCode" : "",
|
||||
</#if>
|
||||
"PostalCode" : "${(preparation_order.address.postal_code!"")?json_string}",
|
||||
"StreetAddressOne" : "${(preparation_order.address.street_and_number_and_po_box!"")?json_string}",
|
||||
"StreetAddressTwo" : "${(preparation_order.address.additional_address_data_1!"")?json_string}",
|
||||
"StreetAddressThree" : "${(preparation_order.address.additional_address_data_2!"")?json_string}"
|
||||
}
|
||||
},
|
||||
"Contact" :
|
||||
{
|
||||
"FirstName" : "${(preparation_order.address.first_name!"")?json_string}",
|
||||
"LastName" : "${(preparation_order.address.last_name!"")?json_string}",
|
||||
"Emails" : ${splitEmailsIntoArray((preparation_order.address.mail_address!"")?json_string)},
|
||||
"Phones" : ["${(preparation_order.address.mobile_phone_number!"")?json_string}","${(preparation_order.address.land_line_phone_number!"")?json_string}", "${(preparation_order.address.fax_number!"")?json_string}" ]
|
||||
}
|
||||
<#if
|
||||
<#-- preparation_order.address.type_code == "" &&
|
||||
preparation_order.address.title_code == "" &&
|
||||
preparation_order.address.first_name == "" &&
|
||||
preparation_order.address.last_name == "" &&
|
||||
preparation_order.address.mail_address == "" &&
|
||||
preparation_order.address.contact_type_code == "" &&
|
||||
preparation_order.address.mobile_phone_number == "" &&
|
||||
preparation_order.address.land_line_phone_number == "" &&
|
||||
preparation_order.address.fax_number == "" && -->
|
||||
preparation_order.address.address_type_code == "" &&
|
||||
preparation_order.address.name_or_company_name == "" &&
|
||||
preparation_order.address.additional_address_data_1 == "" &&
|
||||
preparation_order.address.additional_address_data_2 == "" &&
|
||||
preparation_order.address.post_code_area_name == "" &&
|
||||
preparation_order.address.territorial_division_code == "" &&
|
||||
preparation_order.address.postal_code == "" &&
|
||||
preparation_order.address.iso_country_code == "">
|
||||
"ActorID": "${RFXtoRPprefixConsignee(preparation_order.end_consignee_code?json_string)}"
|
||||
<#else>
|
||||
"Actor":
|
||||
{
|
||||
"Name" : "${(preparation_order.address.name_or_company_name!"")?json_string}",
|
||||
"Address" :
|
||||
{
|
||||
"City" : "${(preparation_order.address.post_code_area_name!"")?json_string}",
|
||||
"CountryCode" : "${preparation_order.address.iso_country_code!""}",
|
||||
"PostalCode" : "${preparation_order.address.postal_code!""}",
|
||||
"StreetAddressOne" : "${(preparation_order.address.street_and_number_and_po_box!"")?json_string}",
|
||||
"StreetAddressTwo" : "${(preparation_order.address.additional_address_data_1!"")?json_string}",
|
||||
"StreetAddressThree" : "${(preparation_order.address.additional_address_data_2!"")?json_string}"
|
||||
}
|
||||
},
|
||||
"Contact" :
|
||||
{
|
||||
"FirstName" : "${(preparation_order.address.first_name!"")?json_string}",
|
||||
"LastName" : "${(preparation_order.address.last_name!"")?json_string}",
|
||||
"Emails" : ${splitEmailsIntoArray((preparation_order.address.mail_address!"")?json_string)},
|
||||
"Phones" : ["${(preparation_order.address.mobile_phone_number!"")?json_string}","${(preparation_order.address.land_line_phone_number!"")?json_string}", "${(preparation_order.address.fax_number!"")?json_string}" ]
|
||||
}
|
||||
</#if>
|
||||
</#if>
|
||||
},
|
||||
|
||||
"OrderID":"${preparation_order.originator_reference?trim?json_string}",
|
||||
<#if preparation_order.line_list??>
|
||||
"Lines" : [
|
||||
<#list preparation_order.line_list as preparation_order_line >
|
||||
@ -117,8 +116,14 @@
|
||||
{
|
||||
"RequestedDeliveryDateTime" :
|
||||
{
|
||||
<#if preparation_order.intermediate_consignee_code?? && preparation_order.intermediate_consignee_code!="" && preparation_order.intermediate_delivery_start_datetime?? && preparation_order.intermediate_delivery_start_datetime!="0000-00-00T00:00:00">
|
||||
<#assign intermediate_delivery_start_datetime = RfxDateTimetoUTC(preparation_order.intermediate_delivery_start_datetime,time_zone_offset_rfx) />
|
||||
"DateTime": "${intermediate_delivery_start_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
<#else>
|
||||
"DateTime": "${planned_final_delivery_start_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
</#if>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -17,7 +17,22 @@
|
||||
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
||||
<#if receipt.receipt_reference ?? && receipt.receipt_reference!="">
|
||||
<#if receipt.receipt_type = "030">
|
||||
<#stop "ignored message because receipt type = transfert">
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl">
|
||||
|
||||
},
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrReceiptList_TransfertReceiptExpected.ftl">
|
||||
|
||||
}
|
||||
]
|
||||
<#else>
|
||||
[
|
||||
{
|
||||
@ -46,16 +61,21 @@
|
||||
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
||||
<#if receipt.receipt_confirmed == "true" >
|
||||
<#if receipt.receipt_type = "030" && receipt.receipt_confirmed == "true" >
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrReceiptList_TransfertExecutionflowReceiptCompleted.ftl">
|
||||
}
|
||||
<#else>
|
||||
<#if receipt.receipt_confirmed == "true">
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl">
|
||||
}
|
||||
<#else>
|
||||
<#if receipt.receipt_type = "030">
|
||||
<#stop "ignored message because receipt type = transfert">
|
||||
<#else>
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${receipt.receipt_reference?trim?json_string}",
|
||||
"RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}",
|
||||
"RefDate": {
|
||||
"DateTime": "${receipt_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${receipt.receipt_reference?trim?json_string}",
|
||||
"RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}",
|
||||
"RefDate": {
|
||||
"DateTime": "${receipt_creation_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
@ -33,6 +33,7 @@
|
||||
"ActorID": "${RFXtoRPprefixDepot(receipt.physical_depot_code?trim?json_string)}"
|
||||
},
|
||||
"ShipToAcked": true,
|
||||
"OrderID":"${receipt.receipt_reference?trim?json_string}",
|
||||
|
||||
<#if receipt.carrier_informations.carrier_code != "">
|
||||
"Carrier":
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${receipt.receipt_reference?trim?json_string}",
|
||||
"RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}",
|
||||
"RefDate": {
|
||||
"DateTime": "${receipt_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${receipt.receipt_reference?trim?json_string}",
|
||||
"RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}",
|
||||
"RefDate": {
|
||||
"DateTime": "${receipt_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
|
||||
20
RFXtoRP_HsrReceiptList_TransfertExecutionflowCancelled.ftl
Normal file
20
RFXtoRP_HsrReceiptList_TransfertExecutionflowCancelled.ftl
Normal file
@ -0,0 +1,20 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.modification_datetime,time_zone_rfx) />
|
||||
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${receipt.receipt_reference?trim?json_string}",
|
||||
"RefDate": {
|
||||
"DateTime": "${receipt_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
"Payload": {
|
||||
}
|
||||
}
|
||||
]
|
||||
94
RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl
Normal file
94
RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl
Normal file
@ -0,0 +1,94 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#include "ActorPrefix.ftl">
|
||||
[
|
||||
{
|
||||
<#assign receipt_datetime = RfxDateTimetoUTCWithTimezone(receipt.receipt_datetime,time_zone_rfx) />
|
||||
<#assign receipt_creation_datetime = RfxDateTimetoUTCWithTimezone(receipt.creation_datetime,time_zone_rfx) />
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${receipt.origin_order_line_depot?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}",
|
||||
"RefDate": {
|
||||
"DateTime": "${receipt_creation_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
"Payload": {
|
||||
"CreationDateTime": {
|
||||
"DateTime": "${receipt_creation_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
},
|
||||
"OrderID":"${receipt.receipt_reference?trim?json_string}",
|
||||
<#-- Header Metadata inclusion -->
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl">,
|
||||
|
||||
"ShipFrom":
|
||||
{
|
||||
"ActorID": "${RFXtoRPprefixSupplier(receipt.original_code?trim?json_string)}"
|
||||
},
|
||||
"ShipTo" :
|
||||
{
|
||||
"ActorID": "${RFXtoRPprefixDepot(receipt.physical_depot_code?trim?json_string)}"
|
||||
},
|
||||
"ShipToAcked": true,
|
||||
|
||||
<#if receipt.carrier_informations.carrier_code != "">
|
||||
"Carrier":
|
||||
{
|
||||
"ActorID":"${RFXtoRPprefixCarrier(receipt.carrier_informations.carrier_code?trim?json_string)}"
|
||||
},
|
||||
</#if>
|
||||
|
||||
<#if receipt.line_list??>
|
||||
"Lines" : [
|
||||
<#list receipt.line_list as line>
|
||||
{
|
||||
"LineID": "${line.receipt_line_number}",
|
||||
<#-- Line Metadata inclusion -->
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl">,
|
||||
"RequestedContent":
|
||||
{
|
||||
"Goods":
|
||||
{
|
||||
"ItemID": "${line.item_code?trim?json_string!"0"}",
|
||||
"LVBranchID": "${line.item_lv_code?json_string!"0"}",
|
||||
<#if (line.line_without_detail?? && line.line_without_detail.priority_date?length != 0) && (line.line_without_detail.priority_date?starts_with("00") == false)>
|
||||
<#assign line_without_detail_priority_date = line.line_without_detail.priority_date?datetime(rfx_date_format_default)?iso_utc />
|
||||
"PriorityDate": "${line_without_detail_priority_date}",
|
||||
<#else>
|
||||
<#if (line.line_detail?? && line.line_detail?size == 1 && line.line_detail[0].priority_date?length != 0) && (line.line_detail[0].priority_date?starts_with("00") == false)>
|
||||
<#assign line_detail_priority_date = line.line_detail[0].priority_date?datetime(rfx_date_format_default)?iso_utc />
|
||||
"PriorityDate": "${line_detail_priority_date}",
|
||||
<#else>
|
||||
"PriorityDate": "1970-01-01T00:00:00Z",
|
||||
</#if>
|
||||
</#if>
|
||||
<#-- Segmentation Keys inclusion -->
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl">
|
||||
},
|
||||
"Quantity" :
|
||||
{
|
||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||
"Value": "${line.order_quantity_in_lv!0}"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
<#sep>,</#sep>
|
||||
</#list>
|
||||
],
|
||||
</#if>
|
||||
|
||||
"RequestedMilestones" :
|
||||
{
|
||||
"RequestedDeliveryDateTime" :
|
||||
{
|
||||
"DateTime": "${receipt_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -0,0 +1,19 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.confirmation_datetime,time_zone_rfx) />
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${receipt.origin_order_line_depot?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}",
|
||||
"RefDate": {
|
||||
"DateTime": "${receipt_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
"Payload": {
|
||||
}
|
||||
}
|
||||
]
|
||||
21
RFXtoRP_HsrReceiptList_TransfertReceiptExpected.ftl
Normal file
21
RFXtoRP_HsrReceiptList_TransfertReceiptExpected.ftl
Normal file
@ -0,0 +1,21 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.creation_datetime,time_zone_rfx) />
|
||||
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${receipt.origin_order_line_depot?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}",
|
||||
"RefDate": {
|
||||
"DateTime": "${receipt_status_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
|
||||
"Payload": {}
|
||||
|
||||
}
|
||||
]
|
||||
Loading…
x
Reference in New Issue
Block a user