Partial Merge branch 'develop' into SCPN1-5651
This commit is contained in:
commit
d94a74d399
@ -21,13 +21,33 @@
|
|||||||
},
|
},
|
||||||
<#-- Header Metadata inclusion -->
|
<#-- Header Metadata inclusion -->
|
||||||
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_HeaderMetadata.ftl">,
|
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_HeaderMetadata.ftl">,
|
||||||
|
<#-- Add transport grade code
|
||||||
|
<#if preparation_order.transport_grade_code!="">
|
||||||
|
"CarrierService":"${preparation_order.transport_grade_code}",
|
||||||
|
</#if> -->
|
||||||
"ShipFrom": {
|
"ShipFrom": {
|
||||||
"ActorID": "${preparation_order.physical_depot_code}"
|
"ActorID": "${preparation_order.physical_depot_code}"
|
||||||
},
|
},
|
||||||
"ShipFromAcked": true,
|
"ShipFromAcked": true,
|
||||||
"ShipTo": {
|
"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}"
|
"ActorID": "${preparation_order.end_consignee_code}"
|
||||||
<#else>
|
<#else>
|
||||||
"Actor":
|
"Actor":
|
||||||
@ -47,10 +67,9 @@
|
|||||||
{
|
{
|
||||||
"FirstName" : "${preparation_order.address.first_name?json_string!""}",
|
"FirstName" : "${preparation_order.address.first_name?json_string!""}",
|
||||||
"LastName" : "${preparation_order.address.last_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!""}" ]
|
"Phones" : ["${preparation_order.address.mobile_phone_number!""}","${preparation_order.address.land_line_phone_number!""}", "${preparation_order.address.fax_number!""}" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
</#if>
|
</#if>
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@ -43,7 +43,11 @@
|
|||||||
<#default>
|
<#default>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
<#if restResponsetMsg.body?? >
|
||||||
|
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||||
|
<#else>
|
||||||
|
<#assign restResponseBody = "{}" />
|
||||||
|
</#if>
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
@ -57,7 +61,7 @@
|
|||||||
<#switch restResponsetMsg.status>
|
<#switch restResponsetMsg.status>
|
||||||
<#case 200>
|
<#case 200>
|
||||||
<#case 201>
|
<#case 201>
|
||||||
<#-- *********************************************** ApiRestID = preparation_orders_post ******************** -->
|
<#-- *********************************************** ApiRestID = receipts_post ******************** -->
|
||||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||||
<#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)>
|
<#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)>
|
||||||
<#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" >
|
<#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" >
|
||||||
@ -85,7 +89,11 @@
|
|||||||
<#default>
|
<#default>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
<#if restResponsetMsg.body?? >
|
||||||
|
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||||
|
<#else>
|
||||||
|
<#assign restResponseBody = "{}" />
|
||||||
|
</#if>
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
|
|||||||
@ -28,6 +28,7 @@
|
|||||||
"intermediate_consignee": "false",
|
"intermediate_consignee": "false",
|
||||||
"protected": "${protected_flag}",
|
"protected": "${protected_flag}",
|
||||||
"automatic_generation": "${automatic_generation_flag}",
|
"automatic_generation": "${automatic_generation_flag}",
|
||||||
|
"deactivate": "false",
|
||||||
"optional_attributes": {
|
"optional_attributes": {
|
||||||
"apt_with_end_consignee": "${apt_with_end_consignee_flag}",
|
"apt_with_end_consignee": "${apt_with_end_consignee_flag}",
|
||||||
"apt_with_intermediate": "false",
|
"apt_with_intermediate": "false",
|
||||||
@ -35,13 +36,13 @@
|
|||||||
},
|
},
|
||||||
<#if executionflow.ShipTo.ActorID == "">
|
<#if executionflow.ShipTo.ActorID == "">
|
||||||
"address": {
|
"address": {
|
||||||
"first_name": "${executionflow.ShipTo.Contact.FirstName?json_string!""}",
|
"first_name": "${executionflow.ShipTo.Contact.FirstName!""?json_string}",
|
||||||
"last_name" :"${executionflow.ShipTo.Contact.Lastname?json_string!""}",
|
"last_name" :"${executionflow.ShipTo.Contact.Lastname!""?json_string}",
|
||||||
"mail_address": "${executionflow.ShipTo.Actor.Emails[0]!""}",
|
"mail_address": "${executionflow.ShipTo.Actor.Emails[0]!""}",
|
||||||
"mobile_phone_number": "${executionflow.ShipTo.Actor.Phones[0]!""}",
|
"mobile_phone_number": "${executionflow.ShipTo.Actor.Phones[0]!""}",
|
||||||
"street_and_number_and_po_box": "${executionflow.ShipTo.Actor.Address.StreetAddressOne?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_1": "${executionflow.ShipTo.Actor.Address.StreetAddressTwo!""?json_string}",
|
||||||
"additional_address_data_2": "${executionflow.ShipTo.Actor.Address.StreetAddressThree?json_string!""}",
|
"additional_address_data_2": "${executionflow.ShipTo.Actor.Address.StreetAddressThree!""?json_string}",
|
||||||
"postal_code": "${executionflow.ShipTo.Actor.Address.PostalCode!""}",
|
"postal_code": "${executionflow.ShipTo.Actor.Address.PostalCode!""}",
|
||||||
"iso_country_code": "${executionflow.ShipTo.Actor.Address.CountryCode!""}"
|
"iso_country_code": "${executionflow.ShipTo.Actor.Address.CountryCode!""}"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -6,10 +6,10 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
|
|
||||||
<#assign activity_code = "PEN"/>
|
<#assign activity_code = ""/>
|
||||||
<#assign originator_code = "50000189"/>
|
<#assign originator_code = ""/>
|
||||||
<#assign preparation_type_code = "010"/>
|
<#assign preparation_type_code = ""/>
|
||||||
<#assign requested_delivery_date_type = "010"/>
|
<#assign requested_delivery_date_type = ""/>
|
||||||
<#assign consolidated_delivery_flag ="false"/>
|
<#assign consolidated_delivery_flag ="false"/>
|
||||||
<#assign pick_sequence_code = ""/>
|
<#assign pick_sequence_code = ""/>
|
||||||
<#assign protected_flag ="false"/>
|
<#assign protected_flag ="false"/>
|
||||||
|
|||||||
@ -19,30 +19,26 @@
|
|||||||
"carrier_code" : "${executionflow.Carrier.ActorID!""}",
|
"carrier_code" : "${executionflow.Carrier.ActorID!""}",
|
||||||
|
|
||||||
<#if executionflow.RequestedMilestones?? && executionflow.RequestedMilestones.RequestedDeliveryDateTime??>
|
<#if executionflow.RequestedMilestones?? && executionflow.RequestedMilestones.RequestedDeliveryDateTime??>
|
||||||
"receipt_datetime": "${executionflow.RequestedMilestones.RequestedDeliveryDateTime.DateTime}",
|
"receipt_datetime": "${executionflow.RequestedMilestones.RequestedDeliveryDateTime.DateTime}",
|
||||||
<#else>
|
<#else>
|
||||||
"receipt_datetime": "${aDateTime?iso_utc}",
|
"receipt_datetime": "${aDateTime?iso_utc}",
|
||||||
</#if>
|
</#if>
|
||||||
|
"carrier_appointment_made": "false",
|
||||||
<#--
|
"receipt_in_cross_docking": "false",
|
||||||
"carrier_appointment_made": "false",
|
"dock_occupation_duration": 1,
|
||||||
"receipt_in_cross_docking": "false",
|
|
||||||
"dock_occupation_duration": 10,
|
|
||||||
-->
|
|
||||||
|
|
||||||
<#if executionflow.Lines??>
|
<#if executionflow.Lines??>
|
||||||
"line_list": [
|
"line_list": [
|
||||||
<#list executionflow.Lines as line>
|
<#list executionflow.Lines as line>
|
||||||
|
|
||||||
<#-- ******* line MetaData and Segmentationkeys to maps ******** -->
|
<#-- ******* line MetaData and Segmentationkeys to maps ******** -->
|
||||||
<#if line.MetaData??>
|
<#if line.MetaData??>
|
||||||
<#assign Line_MetaData_Map = JsonUtil.sequenceToMap(line.MetaData, "Key", "Value") />
|
<#assign Line_MetaData_Map = JsonUtil.sequenceToMap(line.MetaData, "Key", "Value") />
|
||||||
</#if>
|
</#if>
|
||||||
<#if line.RequestedContent.Goods.SegmentationKeys??>
|
<#if line.RequestedContent.Goods.SegmentationKeys??>
|
||||||
<#assign SegmentationKeys_Map = JsonUtil.sequenceToMap(line.RequestedContent.Goods.SegmentationKeys, "Key", "Value") />
|
<#assign SegmentationKeys_Map = JsonUtil.sequenceToMap(line.RequestedContent.Goods.SegmentationKeys, "Key", "Value") />
|
||||||
</#if>
|
</#if>
|
||||||
<#include "RPtoRFX_Receipt_DefaultLineData.ftl">
|
<#include "RPtoRFX_Receipt_DefaultLineData.ftl">
|
||||||
|
|
||||||
{
|
{
|
||||||
"receipt_reference_line_no": ${line.LineID?number},
|
"receipt_reference_line_no": ${line.LineID?number},
|
||||||
"item_code": "${line.RequestedContent.Goods.ItemID!""}",
|
"item_code": "${line.RequestedContent.Goods.ItemID!""}",
|
||||||
@ -51,19 +47,16 @@
|
|||||||
"owner_code": "${owner_code}",
|
"owner_code": "${owner_code}",
|
||||||
"grade_code": "${grade_code}",
|
"grade_code": "${grade_code}",
|
||||||
"batch_1": "${batch_1!""}",
|
"batch_1": "${batch_1!""}",
|
||||||
|
|
||||||
<#--
|
|
||||||
"optional_attributes": {
|
"optional_attributes": {
|
||||||
"held_for_check": "false",
|
<#--"held_for_check": "false",
|
||||||
"held _for_repacking": "false",
|
"held _for_repacking": "false",
|
||||||
"hold_for_specific_code": "false",
|
"hold_code": "false", -->
|
||||||
"hold_code": "false"
|
"hold_for_specific_code": "false"
|
||||||
},
|
}
|
||||||
-->
|
<#--"quality_control_attributes": {
|
||||||
"quality_control_attributes": {
|
"qcf_to_create_for_receipt_line": "false",
|
||||||
<#--"qcf_to_create_for_receipt_line": "false",-->
|
|
||||||
"exclude_item_from_inspection": "false"
|
"exclude_item_from_inspection": "false"
|
||||||
}
|
} -->
|
||||||
|
|
||||||
}<#sep>,</#sep>
|
}<#sep>,</#sep>
|
||||||
</#list>
|
</#list>
|
||||||
|
|||||||
@ -5,8 +5,8 @@
|
|||||||
<#assign receipt_type = Header_MetaData_Map["OrderType"]!""/>
|
<#assign receipt_type = Header_MetaData_Map["OrderType"]!""/>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<#assign activity_code = "PEN"/>
|
<#assign activity_code = ""/>
|
||||||
<#assign originator_code = "STANDARD"/>
|
<#assign originator_code = ""/>
|
||||||
<#assign receipt_type = "010"/>
|
<#assign receipt_type = ""/>
|
||||||
<#assign receipt_reason_code = "REC"/>
|
<#assign receipt_reason_code = ""/>
|
||||||
<#assign work_mode_code = "LPA"/>
|
<#assign work_mode_code = ""/>
|
||||||
|
|||||||
@ -7,6 +7,6 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
|
|
||||||
<#assign owner_code = "PEN"/>
|
<#assign owner_code = ""/>
|
||||||
<#assign grade_code = "STD"/>
|
<#assign grade_code = ""/>
|
||||||
<#assign batch_1 = "STD"/>
|
<#assign batch_1 = ""/>
|
||||||
@ -6,4 +6,22 @@
|
|||||||
<#return (datetimeUTC)>
|
<#return (datetimeUTC)>
|
||||||
</#function>
|
</#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