Merge branch 'release/1.2' into 'main'
Release/1.2 See merge request r-d-technique/tiers/reflex-wms-connector!8
This commit is contained in:
commit
9fc489a1ac
@ -21,13 +21,33 @@
|
||||
},
|
||||
<#-- Header Metadata inclusion -->
|
||||
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_HeaderMetadata.ftl">,
|
||||
|
||||
<#-- Add transport grade code
|
||||
<#if preparation_order.transport_grade_code!="">
|
||||
"CarrierService":"${preparation_order.transport_grade_code}",
|
||||
</#if> -->
|
||||
"ShipFrom": {
|
||||
"ActorID": "${preparation_order.physical_depot_code}"
|
||||
},
|
||||
"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 == "">
|
||||
<#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": "${preparation_order.end_consignee_code}"
|
||||
<#else>
|
||||
"Actor":
|
||||
@ -47,10 +67,9 @@
|
||||
{
|
||||
"FirstName" : "${preparation_order.address.first_name?json_string!""}",
|
||||
"LastName" : "${preparation_order.address.last_name?json_string!""}",
|
||||
"Emails" : ["${preparation_order.address.mail_address?json_string!""}"],
|
||||
"Emails" : ${splitEmailsIntoArray(preparation_order.address.mail_address!""?json_string)},
|
||||
"Phones" : ["${preparation_order.address.mobile_phone_number!""}","${preparation_order.address.land_line_phone_number!""}", "${preparation_order.address.fax_number!""}" ]
|
||||
}
|
||||
|
||||
</#if>
|
||||
},
|
||||
|
||||
|
||||
@ -43,7 +43,11 @@
|
||||
<#default>
|
||||
[
|
||||
{
|
||||
<#if restResponsetMsg.body?? >
|
||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||
<#else>
|
||||
<#assign restResponseBody = "{}" />
|
||||
</#if>
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
@ -57,7 +61,7 @@
|
||||
<#switch restResponsetMsg.status>
|
||||
<#case 200>
|
||||
<#case 201>
|
||||
<#-- *********************************************** ApiRestID = preparation_orders_post ******************** -->
|
||||
<#-- *********************************************** ApiRestID = receipts_post ******************** -->
|
||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||
<#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)>
|
||||
<#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" >
|
||||
@ -85,7 +89,11 @@
|
||||
<#default>
|
||||
[
|
||||
{
|
||||
<#if restResponsetMsg.body?? >
|
||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||
<#else>
|
||||
<#assign restResponseBody = "{}" />
|
||||
</#if>
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
|
||||
@ -28,6 +28,7 @@
|
||||
"intermediate_consignee": "false",
|
||||
"protected": "${protected_flag}",
|
||||
"automatic_generation": "${automatic_generation_flag}",
|
||||
"deactivate": "false",
|
||||
"optional_attributes": {
|
||||
"apt_with_end_consignee": "${apt_with_end_consignee_flag}",
|
||||
"apt_with_intermediate": "false",
|
||||
@ -35,13 +36,13 @@
|
||||
},
|
||||
<#if executionflow.ShipTo.ActorID == "">
|
||||
"address": {
|
||||
"first_name": "${executionflow.ShipTo.Contact.FirstName?json_string!""}",
|
||||
"last_name" :"${executionflow.ShipTo.Contact.Lastname?json_string!""}",
|
||||
"first_name": "${executionflow.ShipTo.Contact.FirstName!""?json_string}",
|
||||
"last_name" :"${executionflow.ShipTo.Contact.Lastname!""?json_string}",
|
||||
"mail_address": "${executionflow.ShipTo.Actor.Emails[0]!""}",
|
||||
"mobile_phone_number": "${executionflow.ShipTo.Actor.Phones[0]!""}",
|
||||
"street_and_number_and_po_box": "${executionflow.ShipTo.Actor.Address.StreetAddressOne?json_string!""}",
|
||||
"additional_address_data_1": "${executionflow.ShipTo.Actor.Address.StreetAddressTwo?json_string!""}",
|
||||
"additional_address_data_2": "${executionflow.ShipTo.Actor.Address.StreetAddressThree?json_string!""}",
|
||||
"street_and_number_and_po_box": "${executionflow.ShipTo.Actor.Address.StreetAddressOne!""?json_string}",
|
||||
"additional_address_data_1": "${executionflow.ShipTo.Actor.Address.StreetAddressTwo!""?json_string}",
|
||||
"additional_address_data_2": "${executionflow.ShipTo.Actor.Address.StreetAddressThree!""?json_string}",
|
||||
"postal_code": "${executionflow.ShipTo.Actor.Address.PostalCode!""}",
|
||||
"iso_country_code": "${executionflow.ShipTo.Actor.Address.CountryCode!""}"
|
||||
},
|
||||
|
||||
@ -6,10 +6,10 @@
|
||||
-->
|
||||
|
||||
|
||||
<#assign activity_code = "PEN"/>
|
||||
<#assign originator_code = "50000189"/>
|
||||
<#assign preparation_type_code = "010"/>
|
||||
<#assign requested_delivery_date_type = "010"/>
|
||||
<#assign activity_code = ""/>
|
||||
<#assign originator_code = ""/>
|
||||
<#assign preparation_type_code = ""/>
|
||||
<#assign requested_delivery_date_type = ""/>
|
||||
<#assign consolidated_delivery_flag ="false"/>
|
||||
<#assign pick_sequence_code = ""/>
|
||||
<#assign protected_flag ="false"/>
|
||||
|
||||
@ -23,12 +23,9 @@
|
||||
<#else>
|
||||
"receipt_datetime": "${aDateTime?iso_utc}",
|
||||
</#if>
|
||||
|
||||
<#--
|
||||
"carrier_appointment_made": "false",
|
||||
"receipt_in_cross_docking": "false",
|
||||
"dock_occupation_duration": 10,
|
||||
-->
|
||||
"dock_occupation_duration": 1,
|
||||
|
||||
<#if executionflow.Lines??>
|
||||
"line_list": [
|
||||
@ -42,7 +39,6 @@
|
||||
<#assign SegmentationKeys_Map = JsonUtil.sequenceToMap(line.RequestedContent.Goods.SegmentationKeys, "Key", "Value") />
|
||||
</#if>
|
||||
<#include "RPtoRFX_Receipt_DefaultLineData.ftl">
|
||||
|
||||
{
|
||||
"receipt_reference_line_no": ${line.LineID?number},
|
||||
"item_code": "${line.RequestedContent.Goods.ItemID!""}",
|
||||
@ -51,19 +47,16 @@
|
||||
"owner_code": "${owner_code}",
|
||||
"grade_code": "${grade_code}",
|
||||
"batch_1": "${batch_1!""}",
|
||||
|
||||
<#--
|
||||
"optional_attributes": {
|
||||
"held_for_check": "false",
|
||||
<#--"held_for_check": "false",
|
||||
"held _for_repacking": "false",
|
||||
"hold_for_specific_code": "false",
|
||||
"hold_code": "false"
|
||||
},
|
||||
-->
|
||||
"quality_control_attributes": {
|
||||
<#--"qcf_to_create_for_receipt_line": "false",-->
|
||||
"exclude_item_from_inspection": "false"
|
||||
"hold_code": "false", -->
|
||||
"hold_for_specific_code": "false"
|
||||
}
|
||||
<#--"quality_control_attributes": {
|
||||
"qcf_to_create_for_receipt_line": "false",
|
||||
"exclude_item_from_inspection": "false"
|
||||
} -->
|
||||
|
||||
}<#sep>,</#sep>
|
||||
</#list>
|
||||
|
||||
@ -5,8 +5,8 @@
|
||||
<#assign receipt_type = Header_MetaData_Map["OrderType"]!""/>
|
||||
-->
|
||||
|
||||
<#assign activity_code = "PEN"/>
|
||||
<#assign originator_code = "STANDARD"/>
|
||||
<#assign receipt_type = "010"/>
|
||||
<#assign receipt_reason_code = "REC"/>
|
||||
<#assign work_mode_code = "LPA"/>
|
||||
<#assign activity_code = ""/>
|
||||
<#assign originator_code = ""/>
|
||||
<#assign receipt_type = ""/>
|
||||
<#assign receipt_reason_code = ""/>
|
||||
<#assign work_mode_code = ""/>
|
||||
|
||||
@ -7,6 +7,6 @@
|
||||
-->
|
||||
|
||||
|
||||
<#assign owner_code = "PEN"/>
|
||||
<#assign grade_code = "STD"/>
|
||||
<#assign batch_1 = "STD"/>
|
||||
<#assign owner_code = ""/>
|
||||
<#assign grade_code = ""/>
|
||||
<#assign batch_1 = ""/>
|
||||
@ -6,4 +6,22 @@
|
||||
<#return (datetimeUTC)>
|
||||
</#function>
|
||||
|
||||
|
||||
<#-- --------------------------------------------------------------------------------------- -->
|
||||
<#-- Split email reflex into json array string -->
|
||||
<#-- Example : splitemail "john.doe@hardis-group.com,; name@hardis-group.com" -->
|
||||
<#-- return "["john.doe@hardis-group.com","name@hardis-group.com"]" -->
|
||||
<#-- ${splitEmailsIntoArray(emailReflex)} -->
|
||||
<#-- --------------------------------------------------------------------------------------- -->
|
||||
<#function splitEmailsIntoArray emails >
|
||||
<#local str = "[">
|
||||
<#list emails?split(';|,| ',"r")?filter(l -> l != "") as email>
|
||||
<#if str != "[">
|
||||
<#local str += ",">
|
||||
</#if>
|
||||
<#local str += "\"">
|
||||
<#local str += email>
|
||||
<#local str += "\"">
|
||||
</#list>
|
||||
<#local str += "]">
|
||||
<#return (str)>
|
||||
</#function>
|
||||
Loading…
x
Reference in New Issue
Block a user