68 lines
2.5 KiB
Java
68 lines
2.5 KiB
Java
<#include "RPtoRFX_Receipt_DefaultHeaderData.ftl">
|
|
|
|
{
|
|
"id" : {"refid" : "${executionflow.OrderID}"},
|
|
"route" : "rest/public/v1/activities/{activity_code}/physical_depots/{physical_depot_code}/originators/{originator_code}/receipts",
|
|
"method" : "POST",
|
|
"uri_substitutions": {
|
|
"activity_code": "${activity_code}",
|
|
"physical_depot_code": "${executionflow.ShipTo.ActorID!""}",
|
|
"originator_code": "${originator_code}"
|
|
},
|
|
"payload" :
|
|
{
|
|
"receipt_reference": "${executionflow.OrderID}",
|
|
"receipt_type": "${receipt_type}",
|
|
"receipt_reason_code": "${receipt_reason_code}",
|
|
"work_mode_code" : "${work_mode_code}",
|
|
"original_code" : "${executionflow.ShipFrom.ActorID}",
|
|
"carrier_code" : "${executionflow.Carrier.ActorID!""}",
|
|
|
|
<#if executionflow.RequestedMilestones?? && executionflow.RequestedMilestones.RequestedDeliveryDateTime??>
|
|
"receipt_datetime": "${DateTimeUTCtoRfxLocale(executionflow.RequestedMilestones.RequestedDeliveryDateTime.DateTime,time_zone_rfx)}",
|
|
<#else>
|
|
"receipt_datetime": "${DateTimeUTCtoRfxLocale(.now?iso_utc?string,time_zone_rfx)}",
|
|
</#if>
|
|
"carrier_appointment_made": "false",
|
|
"receipt_in_cross_docking": "false",
|
|
"dock_occupation_duration": 1
|
|
|
|
<#if executionflow.Lines??>
|
|
,
|
|
"line_list": [
|
|
<#list executionflow.Lines as line>
|
|
|
|
<#-- ******* line MetaData and Segmentationkeys to maps ******** -->
|
|
<#if line.MetaData??>
|
|
<#assign Line_MetaData_Map = JsonUtil.sequenceToMap(line.MetaData, "Key", "Value") />
|
|
</#if>
|
|
<#if line.RequestedContent.Goods.SegmentationKeys??>
|
|
<#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!""}",
|
|
"item_lv_code": "${line.RequestedContent.Goods.LVBranchID!""}",
|
|
"level_1_quantity": ${line.RequestedMetrics.QuantityInBaseLV.Value!0},
|
|
"owner_code": "${owner_code}",
|
|
"grade_code": "${grade_code}",
|
|
"batch_1": "${batch_1!""}",
|
|
"optional_attributes": {
|
|
<#--"held_for_check": "false",
|
|
"held _for_repacking": "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>
|
|
]
|
|
</#if>
|
|
}
|
|
}
|