You've already forked reflex-wms-connector
Merge branch 'release/2.0' into 'main-2.0'
Release/2.0 into main-2.0 See merge request r-d-technique/tiers/reflex-wms-connector!286
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
<#local depot = actor>
|
||||
<#else>
|
||||
<#if actor?length gt 4>
|
||||
<#local depot = actor[4..]>
|
||||
<#local depot = actor[4..]>
|
||||
<#else>
|
||||
<#local depot = actor>
|
||||
</#if>
|
||||
@@ -83,7 +83,7 @@
|
||||
<#local supplier = actor>
|
||||
<#else>
|
||||
<#if actor?length gt 4>
|
||||
<#local supplier = actor[4..]>
|
||||
<#local supplier = actor[4..]>
|
||||
<#else>
|
||||
<#local supplier = actor>
|
||||
</#if>
|
||||
@@ -126,7 +126,7 @@
|
||||
<#local carrier = actor>
|
||||
<#else>
|
||||
<#if actor?length gt 4>
|
||||
<#local carrier = actor[4..]>
|
||||
<#local carrier = actor[4..]>
|
||||
<#else>
|
||||
<#local carrier = actor>
|
||||
</#if>
|
||||
@@ -169,7 +169,7 @@
|
||||
<#local consignee = actor>
|
||||
<#else>
|
||||
<#if actor?length gt 4>
|
||||
<#local consignee = actor[4..]>
|
||||
<#local consignee = actor[4..]>
|
||||
<#else>
|
||||
<#local consignee = actor>
|
||||
</#if>
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<#-- --------------------------------------------------------------------------------------- -->
|
||||
<#-- DeleteEF est un paramètre qui permet de déterminer si l’exécution logistique doit être supprimée lors de la création d’une commande.-->
|
||||
<#-- Attention : si vous choisissez de la supprimer, toutes les métadonnées associées à cette exécution logistique seront également supprimées. -->
|
||||
<#-- Si DeleteEF_Creation = true, nous ne supprimons pas l'exécution logistique, Si DeleteEF_Creation = false, nous supprimons l'exécution logistique.-->
|
||||
<#-- Si DeleteEF_Creation = true, nous supprimons l'exécution logistique, Si DeleteEF_Creation = false, nous ne supprimons pas l'exécution logistique.-->
|
||||
<#-- --------------------------------------------------------------------------------------- -->
|
||||
<#-- DeleteEF is a parameter used to determine whether the logistics execution should be deleted when creating an order.-->
|
||||
<#-- Warning: if deletion is selected, all metadata related to the logistics execution will also be removed. -->
|
||||
<#-- If DeleteEF_Creation = true, we do not delete the logistics execution. If DeleteEF_Creation = false, we delete the logistics execution. -->
|
||||
<#-- If DeleteEF_Creation = true, we delete the logistics execution. If DeleteEF_Creation = false, we do not delete the logistics execution. -->
|
||||
<#-- --------------------------------------------------------------------------------------- -->
|
||||
<#assign DeleteEF_Creation = true>
|
||||
@@ -11,38 +11,43 @@
|
||||
|
||||
<#switch cloudEventMsg.action>
|
||||
<#case "C">
|
||||
<#-- *********************************************** Action = CREATE ******************** -->
|
||||
<#-- *********************************************** Action = CREATE ******************** -->
|
||||
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign ancReceiptLine = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
<#assign AncReceipt = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
<#if AncReceipt.line_list?? && AncReceipt.line_list[0]??>
|
||||
{
|
||||
<#stop "create anticipated receipt line">
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.OrderLinesAdded>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HliAntRecLr_OrderLinesAdded.ftl">
|
||||
},
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.OrderReceiptExpected>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrAntRec_ReceiptExpected.ftl">
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
<#else>
|
||||
<#stop>
|
||||
</#if>
|
||||
<#break>
|
||||
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign ancReceiptLine = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#stop "update anticipated receipt line">
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
|
||||
<#assign AncReceipt = JsonUtil.jsonToMap(dataRfx)>
|
||||
<#stop>
|
||||
<#break>
|
||||
<#case "D">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign ancReceiptLine = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#stop "delete anticipated receipt line">
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
|
||||
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign AncReceipt = JsonUtil.jsonToMap(dataRfx)>
|
||||
<#stop>
|
||||
<#break>
|
||||
|
||||
<#default>
|
||||
<#stop >
|
||||
</#switch>
|
||||
|
||||
47
RFXtoRP_HliAntRecLr_OrderLinesAdded.ftl
Normal file
47
RFXtoRP_HliAntRecLr_OrderLinesAdded.ftl
Normal file
@@ -0,0 +1,47 @@
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ActorPrefix.ftl">
|
||||
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
<#if AncReceipt.anticipated_receipt_reference?? && AncReceipt.anticipated_receipt_reference!="">
|
||||
"RefID": "${AncReceipt.anticipated_receipt_reference?json_string}"
|
||||
<#else>
|
||||
"RefID": "AR-${AncReceipt.physical_depot_code?trim?json_string}${AncReceipt.activity_code?trim?json_string}${AncReceipt.originator_code?trim?json_string}${AncReceipt.anticipated_receipt_year?json_string}${AncReceipt.anticipated_receipt_number?json_string}"
|
||||
</#if>
|
||||
},
|
||||
"Payload": {
|
||||
"Lines": [
|
||||
<#-- Lines iteration -->
|
||||
<#list AncReceipt.line_list?filter(l -> l??) as line>
|
||||
{
|
||||
<#if line.anticipated_receipt_reference_line_no?? && line.anticipated_receipt_reference_line_no!=0>
|
||||
"LineID": "${line.anticipated_receipt_reference_line_no}",
|
||||
<#else>
|
||||
"LineID": "${line.anticipated_receipt_line_number}",
|
||||
</#if>
|
||||
<#-- Line Metadata inclusion -->
|
||||
<#include "RFXtoRP_HsrAntRec_Created_LineMetadata.ftl">,
|
||||
"RequestedContent":{
|
||||
"Goods":{
|
||||
"ItemID":"${line.item_code?trim?json_string!"0"}",
|
||||
"LVBranchID":"${line.item_lv_code?trim?json_string!"0"}",
|
||||
<#-- Segmentation Keys inclusion -->
|
||||
<#include "RFXtoRP_HsrAntRec_Created_SegmentationKeys.ftl">
|
||||
},
|
||||
"Quantity" :
|
||||
{
|
||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||
"Value": ${line.planned_quantity_in_base_lv!0}
|
||||
}
|
||||
}
|
||||
}<#sep>,</#sep>
|
||||
</#list>
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -7,6 +7,7 @@
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
<#-- for Claim on preparation -->
|
||||
<#if dispute.dispute_preparation??>
|
||||
<#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}"
|
||||
@@ -14,8 +15,14 @@
|
||||
<#stop "preparation order list is empty" >
|
||||
</#if>
|
||||
<#else>
|
||||
<#-- for Claim on reception -->
|
||||
<#if dispute.dispute_reception??>
|
||||
"RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
||||
"RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
||||
<#else>
|
||||
<#-- for Claim on anticipated receipt -->
|
||||
<#if dispute.dispute_anticipated_receipt??>
|
||||
"RefID": "${dispute.dispute_anticipated_receipt.anticipated_receipt_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_anticipated_receipt.anticipated_receipt_activity_code?replace(" ","")?json_string}${dispute.dispute_anticipated_receipt.anticipated_receipt_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
},
|
||||
@@ -43,7 +50,8 @@
|
||||
<#include "RFXtoRP_HsaDispute_ClaimMetadata.ftl">,
|
||||
<#-- To configure -->
|
||||
<#include "RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl">
|
||||
<#if dispute.dispute_type_code=="050" > <#-- Preparation -->
|
||||
<#-- for Claim on preparation -->
|
||||
<#if dispute.dispute_type_code=="050" >
|
||||
<#if dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?? && dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference!="">
|
||||
"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}",
|
||||
"DisplayID":"${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string}",
|
||||
@@ -52,6 +60,7 @@
|
||||
"DisplayID":"O${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_year_number?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_number?trim?json_string}",
|
||||
</#if>
|
||||
<#else>
|
||||
<#-- for Claim on receipt -->
|
||||
<#if dispute.dispute_type_code=="030" || dispute.dispute_type_code=="070" >
|
||||
<#if dispute.dispute_reception.reception_type_code=="030"> <#-- Receipt transfer type -->
|
||||
<#if dispute.dispute_reception.reception_supplier.supplier_transfer_physical_depot?? && dispute.dispute_reception.reception_supplier.supplier_transfer_physical_depot!="" >
|
||||
@@ -74,11 +83,26 @@
|
||||
<#stop "WMS type code not supported">
|
||||
</#if>
|
||||
</#if>
|
||||
<#-- for Claim on anticipated receipt -->
|
||||
<#else>
|
||||
<#if dispute.dispute_type_code=="020" >
|
||||
<#if dispute.dispute_anticipated_receipt.anticipated_receipt_reference?? && dispute.dispute_anticipated_receipt.anticipated_receipt_reference!="">
|
||||
"EntityID":"${dispute.dispute_anticipated_receipt.anticipated_receipt_reference?json_string}",
|
||||
"DisplayID":"${dispute.dispute_anticipated_receipt.anticipated_receipt_reference?json_string}",
|
||||
<#else>
|
||||
"EntityID":"AR-${dispute.dispute_anticipated_receipt.anticipated_receipt_physical_depot_code?json_string}${dispute.dispute_anticipated_receipt.anticipated_receipt_activity_code?json_string}${dispute.dispute_anticipated_receipt.anticipated_receipt_contractor_code?json_string}${dispute.dispute_anticipated_receipt.anticipated_receipt_year_number?json_string}${dispute.dispute_anticipated_receipt.anticipated_receipt_number?json_string}",
|
||||
"DisplayID":"AR-${dispute.dispute_anticipated_receipt.anticipated_receipt_physical_depot_code?json_string}${dispute.dispute_anticipated_receipt.anticipated_receipt_activity_code?json_string}${dispute.dispute_anticipated_receipt.anticipated_receipt_contractor_code?json_string}${dispute.dispute_anticipated_receipt.anticipated_receipt_year_number?json_string}${dispute.dispute_anticipated_receipt.anticipated_receipt_number?json_string}",
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
|
||||
<#if TableReasonCode[dispute.dispute_reason_code]??>
|
||||
"ClaimTypeID":"CLAIMTYPE_${projectRP}_EXECUTIONFLOW_${TableReasonCode[dispute.dispute_reason_code]}"
|
||||
<#if dispute.dispute_type_code=="020" >
|
||||
"ClaimTypeID":"CLAIMTYPE_${projectRP}_ORDER_${TableReasonCode[dispute.dispute_reason_code]}"
|
||||
<#else>
|
||||
"ClaimTypeID":"CLAIMTYPE_${projectRP}_EXECUTIONFLOW_${TableReasonCode[dispute.dispute_reason_code]}"
|
||||
</#if>
|
||||
<#else>
|
||||
<#stop "Claim reason code not supported" >
|
||||
</#if>
|
||||
|
||||
@@ -6,15 +6,23 @@
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
<#if dispute.dispute_preparation??>
|
||||
<#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0>
|
||||
<#-- for Claim on preparation -->
|
||||
<#-- for Claim on preparation -->
|
||||
<#if dispute.dispute_preparation??>
|
||||
<#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" >
|
||||
</#if>
|
||||
<#else>
|
||||
<#-- for Claim on reception -->
|
||||
<#if dispute.dispute_reception??>
|
||||
"RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
||||
"RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
||||
<#else>
|
||||
<#-- for Claim on anticipated receipt -->
|
||||
<#if dispute.dispute_anticipated_receipt??>
|
||||
"RefID": "${dispute.dispute_anticipated_receipt.anticipated_receipt_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_anticipated_receipt.anticipated_receipt_activity_code?replace(" ","")?json_string}${dispute.dispute_anticipated_receipt.anticipated_receipt_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
},
|
||||
@@ -25,6 +33,10 @@
|
||||
<#else>
|
||||
<#if dispute.dispute_reception??>
|
||||
"Message": "${dispute.dispute_reception.reception_reference?trim?json_string}"
|
||||
<#else>
|
||||
<#if dispute.dispute_anticipated_receipt??>
|
||||
"Message": "${dispute.dispute_anticipated_receipt.anticipated_receipt_reference?trim?json_string}"
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
|
||||
@@ -36,15 +48,22 @@
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
<#-- for Claim on preparation -->
|
||||
<#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" >
|
||||
</#if>
|
||||
<#else>
|
||||
<#-- for Claim on reception -->
|
||||
<#if dispute.dispute_reception??>
|
||||
"RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
||||
"RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
||||
<#else>
|
||||
<#-- for Claim on anticipated receipt -->
|
||||
<#if dispute.dispute_anticipated_receipt??>
|
||||
"RefID": "${dispute.dispute_anticipated_receipt.anticipated_receipt_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_anticipated_receipt.anticipated_receipt_activity_code?replace(" ","")?json_string}${dispute.dispute_anticipated_receipt.anticipated_receipt_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
},
|
||||
@@ -58,15 +77,22 @@
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
<#-- for Claim on preparation -->
|
||||
<#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" >
|
||||
</#if>
|
||||
<#else>
|
||||
<#-- for Claim on reception -->
|
||||
<#if dispute.dispute_reception??>
|
||||
"RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
||||
"RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
||||
<#else>
|
||||
<#-- for Claim on anticipated receipt -->
|
||||
<#if dispute.dispute_anticipated_receipt??>
|
||||
"RefID": "${dispute.dispute_anticipated_receipt.anticipated_receipt_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_anticipated_receipt.anticipated_receipt_activity_code?replace(" ","")?json_string}${dispute.dispute_anticipated_receipt.anticipated_receipt_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
},
|
||||
@@ -80,15 +106,22 @@
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
<#-- for Claim on preparation -->
|
||||
<#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" >
|
||||
</#if>
|
||||
<#else>
|
||||
<#-- for Claim on reception -->
|
||||
<#if dispute.dispute_reception??>
|
||||
"RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
||||
"RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
||||
<#else>
|
||||
<#-- for Claim on anticipated receipt -->
|
||||
<#if dispute.dispute_anticipated_receipt??>
|
||||
"RefID": "${dispute.dispute_anticipated_receipt.anticipated_receipt_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_anticipated_receipt.anticipated_receipt_activity_code?replace(" ","")?json_string}${dispute.dispute_anticipated_receipt.anticipated_receipt_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
},
|
||||
@@ -102,15 +135,22 @@
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
<#-- for Claim on preparation -->
|
||||
<#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" >
|
||||
</#if>
|
||||
<#else>
|
||||
<#-- for Claim on reception -->
|
||||
<#if dispute.dispute_reception??>
|
||||
"RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
||||
"RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
||||
<#else>
|
||||
<#-- for Claim on anticipated receipt -->
|
||||
<#if dispute.dispute_anticipated_receipt??>
|
||||
"RefID": "${dispute.dispute_anticipated_receipt.anticipated_receipt_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_anticipated_receipt.anticipated_receipt_activity_code?replace(" ","")?json_string}${dispute.dispute_anticipated_receipt.anticipated_receipt_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
},
|
||||
|
||||
@@ -29,32 +29,27 @@
|
||||
<#-- Goods received Segmentation Keys inclusion -->
|
||||
<#include "RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl">
|
||||
},
|
||||
<#if reflexMvtStockInterface.ipg_move_type?? & reflexMvtStockInterface.ipg_move_type=="120"> <#-- if it is a transfer-type movement -->
|
||||
<#if reflexMvtStockInterface.ipg_move_type?? && reflexMvtStockInterface.ipg_move_type=="120"> <#-- if it is a transfer-type movement -->
|
||||
<#if reflexMvtStockInterface.origin_order_line_reference?? && reflexMvtStockInterface.origin_order_line_reference!="">
|
||||
"ExecutionflowID": "${reflexMvtStockInterface.original_receipt_physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.origin_order_line_reference?trim?json_string}",
|
||||
"OrderID": "${reflexMvtStockInterface.origin_order_line_reference?trim?json_string}",
|
||||
<#else>
|
||||
<#if reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!="" && !reflexMvtStockInterface.receipt_reference?starts_with(reflexMvtStockInterface.original_receipt_physical_depot_code + reflexMvtStockInterface.activity_code + reflexMvtStockInterface.receipt_year_number)>
|
||||
"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": "R${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_year_number}${reflexMvtStockInterface.receipt_number}",
|
||||
"OrderID": "R${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_year_number}${reflexMvtStockInterface.receipt_number}",
|
||||
</#if>
|
||||
</#if>
|
||||
<#else>
|
||||
<#if reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!="">
|
||||
"ExecutionflowID": "R${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_year_number}${reflexMvtStockInterface.receipt_number}",
|
||||
"OrderID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}",
|
||||
<#else>
|
||||
"ExecutionflowID": "R${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_year_number}${reflexMvtStockInterface.receipt_number}",
|
||||
"OrderID": "R${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_year_number}${reflexMvtStockInterface.receipt_number}",
|
||||
</#if>
|
||||
</#if>
|
||||
<#if reflexMvtStockInterface.origin_order_line_number_reference?? && reflexMvtStockInterface.origin_order_line_number_reference!=0>
|
||||
<#if reflexMvtStockInterface.origin_order_line_number_reference?? && reflexMvtStockInterface.origin_order_line_number_reference!=0 && reflexMvtStockInterface.ipg_move_type=="120">
|
||||
"LineID": "${reflexMvtStockInterface.origin_order_line_number_reference}",
|
||||
<#else>
|
||||
"LineID": "${reflexMvtStockInterface.receipt_line_number}",
|
||||
<#if reflexMvtStockInterface.line_number_reference?? && reflexMvtStockInterface.line_number_reference!=0>
|
||||
"LineID": "${reflexMvtStockInterface.line_number_reference}",
|
||||
<#else>
|
||||
"LineID": "${reflexMvtStockInterface.receipt_line_number}",
|
||||
</#if>
|
||||
</#if>
|
||||
"ActorID": "${RFXtoRPprefixDepot(reflexMvtStockInterface.physical_depot_code?trim?json_string)}",
|
||||
"Quantity": {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<#-- **** input parameters ***** -->
|
||||
<#-- input : message HARDIS WMS -->
|
||||
<#-- input : message HARDIS WMS for anticipated receipt -->
|
||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
||||
|
||||
@@ -14,31 +14,67 @@
|
||||
<#-- *********************************************** Action = CREATE ******************** -->
|
||||
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign ancReceipt = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
<#assign AncReceipt = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
<#if AncReceipt.line_list?? && AncReceipt.line_list[0]??>
|
||||
{
|
||||
<#stop >
|
||||
}
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.OrderCreated>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrAntRec_Created.ftl">
|
||||
},
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.OrderReceiptExpected>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrAntRec_ReceiptExpected.ftl">
|
||||
}
|
||||
]
|
||||
<#else>
|
||||
<#stop>
|
||||
</#if>
|
||||
<#break>
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign ancReceipt = JsonUtil.jsonToMap(dataRfx)>
|
||||
<#assign AncReceipt = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#stop >
|
||||
}
|
||||
<#if AncReceipt.generated?? && AncReceipt.generated.total_level_1_quantity==0 && AncReceipt.generated.total_level_2_quantity==0 && AncReceipt.generated.total_level_3_quantity==0 && AncReceipt.anticipated_receipt_closed == "true" >
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.OrderCancelled>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrAntRec_Cancelled.ftl">
|
||||
}
|
||||
<#else>
|
||||
<#if AncReceipt.anticipated_receipt_closed == "true" >
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.OrderAppointmentBookingDisabled>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrAntRec_AppointmentBookingDisabled.ftl">
|
||||
},
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.OrderAnticipatedClosed>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrAntRec_AnticipatedClosed.ftl">
|
||||
}
|
||||
</#if>
|
||||
</#if>
|
||||
]
|
||||
<#break>
|
||||
|
||||
<#case "D">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign ancReceipt = JsonUtil.jsonToMap(dataRfx)>
|
||||
<#assign AncReceipt = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#stop >
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.OrderCancelled>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrAntRec_Cancelled.ftl">
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
|
||||
25
RFXtoRP_HsrAntRec_AnticipatedClosed.ftl
Normal file
25
RFXtoRP_HsrAntRec_AnticipatedClosed.ftl
Normal file
@@ -0,0 +1,25 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#--<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.creation_datetime,time_zone_rfx) /> -->
|
||||
<#assign now = .now?string("yyyy-MM-dd'T'HH:mm:ss'Z'") />
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
<#if AncReceipt.anticipated_receipt_reference?? && AncReceipt.anticipated_receipt_reference!="">
|
||||
"RefID": "${AncReceipt.anticipated_receipt_reference?json_string}",
|
||||
<#else>
|
||||
"RefID": "AR-${AncReceipt.physical_depot_code?json_string}${AncReceipt.activity_code?json_string}${AncReceipt.originator_code?json_string}${AncReceipt.anticipated_receipt_year?json_string}${AncReceipt.anticipated_receipt_number?json_string}",
|
||||
</#if>
|
||||
"RefDate": {
|
||||
"DateTime": "${now}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
|
||||
"Payload": {}
|
||||
|
||||
}
|
||||
]
|
||||
25
RFXtoRP_HsrAntRec_AppointmentBookingDisabled.ftl
Normal file
25
RFXtoRP_HsrAntRec_AppointmentBookingDisabled.ftl
Normal file
@@ -0,0 +1,25 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#--<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.creation_datetime,time_zone_rfx) /> -->
|
||||
<#assign now = .now?string("yyyy-MM-dd'T'HH:mm:ss'Z'") />
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
<#if AncReceipt.anticipated_receipt_reference?? && AncReceipt.anticipated_receipt_reference!="">
|
||||
"RefID": "${AncReceipt.anticipated_receipt_reference?json_string}",
|
||||
<#else>
|
||||
"RefID": "AR-${AncReceipt.physical_depot_code?json_string}${AncReceipt.activity_code?json_string}${AncReceipt.originator_code?json_string}${AncReceipt.anticipated_receipt_year?json_string}${AncReceipt.anticipated_receipt_number?json_string}",
|
||||
</#if>
|
||||
"RefDate": {
|
||||
"DateTime": "${now}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
|
||||
"Payload": {}
|
||||
|
||||
}
|
||||
]
|
||||
25
RFXtoRP_HsrAntRec_Cancelled.ftl
Normal file
25
RFXtoRP_HsrAntRec_Cancelled.ftl
Normal file
@@ -0,0 +1,25 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#--<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.creation_datetime,time_zone_rfx) /> -->
|
||||
<#assign now = .now?string("yyyy-MM-dd'T'HH:mm:ss'Z'") />
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
<#if AncReceipt.anticipated_receipt_reference?? && AncReceipt.anticipated_receipt_reference!="">
|
||||
"RefID": "${AncReceipt.anticipated_receipt_reference?json_string}",
|
||||
<#else>
|
||||
"RefID": "AR-${AncReceipt.physical_depot_code?json_string}${AncReceipt.activity_code?json_string}${AncReceipt.originator_code?json_string}${AncReceipt.anticipated_receipt_year?json_string}${AncReceipt.anticipated_receipt_number?json_string}",
|
||||
</#if>
|
||||
"RefDate": {
|
||||
"DateTime": "${now}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
|
||||
"Payload": {}
|
||||
|
||||
}
|
||||
]
|
||||
115
RFXtoRP_HsrAntRec_Created.ftl
Normal file
115
RFXtoRP_HsrAntRec_Created.ftl
Normal file
@@ -0,0 +1,115 @@
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ActorPrefix.ftl">
|
||||
|
||||
[
|
||||
{
|
||||
<#assign receipt_datetime = RfxDateTimetoUTCWithTimezone(AncReceipt.planned_receipt_datetime,time_zone_rfx) />
|
||||
<#assign now = .now?string("yyyy-MM-dd'T'HH:mm:ss'Z'") />
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"CustomFields": [
|
||||
{
|
||||
"Key": "anticipated_receipt_reference",
|
||||
"Value": "${AncReceipt.anticipated_receipt_reference?json_string}"
|
||||
},
|
||||
{
|
||||
"Key": "anticipated_receipt_year",
|
||||
"Value": "${AncReceipt.anticipated_receipt_year?json_string}"
|
||||
},
|
||||
{
|
||||
"Key": "anticipated_receipt_number",
|
||||
"Value": "${AncReceipt.anticipated_receipt_number?json_string}"
|
||||
},
|
||||
{
|
||||
"Key": "originator_code",
|
||||
"Value": "${AncReceipt.originator_code?json_string}"
|
||||
},
|
||||
{
|
||||
"Key": "activity_code",
|
||||
"Value": "${AncReceipt.activity_code?json_string}"
|
||||
},
|
||||
{
|
||||
"Key": "depot_code",
|
||||
"Value": "${AncReceipt.physical_depot_code?json_string}"
|
||||
},
|
||||
{
|
||||
"Key": "anticipated",
|
||||
"Value": "true"
|
||||
},
|
||||
{
|
||||
"Key": "planned_receipt_datetime",
|
||||
"Value": "${AncReceipt.planned_receipt_datetime?substring(0,10)?json_string}"
|
||||
}
|
||||
],
|
||||
<#if AncReceipt.anticipated_receipt_reference?? && AncReceipt.anticipated_receipt_reference!="">
|
||||
"RefID": "${AncReceipt.anticipated_receipt_reference?json_string}"
|
||||
<#else>
|
||||
"RefID": "AR-${AncReceipt.physical_depot_code?trim?json_string}${AncReceipt.activity_code?trim?json_string}${AncReceipt.originator_code?trim?json_string}${AncReceipt.anticipated_receipt_year?json_string}${AncReceipt.anticipated_receipt_number?json_string}"
|
||||
</#if>
|
||||
},
|
||||
"Payload": {
|
||||
"ShipFrom": {
|
||||
"ActorID": "${RFXtoRPprefixSupplier(AncReceipt.original_code?json_string)}"
|
||||
},
|
||||
"ShipTo": {
|
||||
"ActorID": "${RFXtoRPprefixDepot(AncReceipt.physical_depot_code?json_string)}"
|
||||
},
|
||||
"CreationDateTime": {
|
||||
"DateTime": "${now}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
},
|
||||
"LanguageCodeISO6391":"fr",
|
||||
"Anticipated": true,
|
||||
<#-- Header Metadata inclusion -->
|
||||
<#include "RFXtoRP_HsrAntRec_Created_HeaderMetadata.ftl">,
|
||||
"Lines": [
|
||||
<#-- Lines iteration -->
|
||||
<#list AncReceipt.line_list?filter(l -> l??) as line>
|
||||
{
|
||||
<#if line.anticipated_receipt_reference_line_no?? && line.anticipated_receipt_reference_line_no!=0>
|
||||
"LineID": "${line.anticipated_receipt_reference_line_no}",
|
||||
<#else>
|
||||
"LineID": "${line.anticipated_receipt_line_number}",
|
||||
</#if>
|
||||
<#-- Line Metadata inclusion -->
|
||||
<#include "RFXtoRP_HsrAntRec_Created_LineMetadata.ftl">,
|
||||
"RequestedContent":{
|
||||
"Goods":{
|
||||
"ItemID":"${line.item_code?trim?json_string!"0"}",
|
||||
"LVBranchID":"${line.item_lv_code?trim?json_string!"0"}",
|
||||
<#-- Segmentation Keys inclusion -->
|
||||
<#include "RFXtoRP_HsrAntRec_Created_SegmentationKeys.ftl">
|
||||
},
|
||||
"Quantity" :
|
||||
{
|
||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||
"Value": ${line.planned_quantity_in_base_lv!0}
|
||||
}
|
||||
}
|
||||
}<#sep>,</#sep>
|
||||
</#list>
|
||||
]
|
||||
<#if AncReceipt.planned_receipt_datetime?? && AncReceipt.planned_receipt_datetime!="0000-00-00T00:00:00">
|
||||
,
|
||||
"RequestedMilestones" :
|
||||
{
|
||||
"RequestedDeliveryDateTime" :
|
||||
{
|
||||
"DateTime": "${receipt_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
}
|
||||
</#if>
|
||||
<#if AncReceipt.carrier_code?? && AncReceipt.carrier_code != "">
|
||||
,
|
||||
"Carrier":
|
||||
{
|
||||
"ActorID":"${RFXtoRPprefixCarrier(AncReceipt.carrier_code?trim?json_string)}"
|
||||
}
|
||||
</#if>
|
||||
}
|
||||
}
|
||||
]
|
||||
19
RFXtoRP_HsrAntRec_Created_HeaderMetadata.ftl
Normal file
19
RFXtoRP_HsrAntRec_Created_HeaderMetadata.ftl
Normal file
@@ -0,0 +1,19 @@
|
||||
<#-- use protobuf of class HsrReceiptList to find HARDIS WMS fields names -->
|
||||
|
||||
<#--
|
||||
<#-- Best practices:
|
||||
If the SK is of type:
|
||||
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
||||
- boolean: possible values: true and false
|
||||
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
||||
- decimal number: the separator is a point (e.g. 10.5)
|
||||
"MetaData": [
|
||||
{
|
||||
"Key": "OrderType",
|
||||
"Value": { "String" : "${order.optional_attributes.reason_code}"}
|
||||
}
|
||||
],
|
||||
-->
|
||||
|
||||
|
||||
"MetaData": [ ]
|
||||
10
RFXtoRP_HsrAntRec_Created_LineMetadata.ftl
Normal file
10
RFXtoRP_HsrAntRec_Created_LineMetadata.ftl
Normal file
@@ -0,0 +1,10 @@
|
||||
<#-- use protobuf of class HsrReceiptList to find HARDIS WMS fields names -->
|
||||
|
||||
<#-- Best practices:
|
||||
If the SK is of type:
|
||||
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
||||
- boolean: possible values: true and false
|
||||
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
||||
- decimal number: the separator is a point (e.g. 10.5)-->
|
||||
|
||||
"MetaData": [ ]
|
||||
47
RFXtoRP_HsrAntRec_Created_SegmentationKeys.ftl
Normal file
47
RFXtoRP_HsrAntRec_Created_SegmentationKeys.ftl
Normal file
@@ -0,0 +1,47 @@
|
||||
<#-- use protobuf of class HsrReceiptList to find HARDIS WMS fields names -->
|
||||
|
||||
<#--
|
||||
<#-- Best practices:
|
||||
If the SK is of type:
|
||||
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
||||
- boolean: possible values: true and false
|
||||
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
||||
- decimal number: the separator is a point (e.g. 10.5)
|
||||
"SegmentationKeys": [
|
||||
{
|
||||
"Key": "Grade",
|
||||
"Value": { "String" : "${line.grade_code}"}
|
||||
},
|
||||
{
|
||||
"Key": "Owner",
|
||||
"Value": { "String" : "${line.owner_code}"}
|
||||
},
|
||||
{
|
||||
"Key": "BatchNumber",
|
||||
<#if reflexMvtStockInterface.batch_1 == "">
|
||||
"Value": { "String" : "no batch"}
|
||||
<#else>
|
||||
"Value": { "String" : "${line_without_detail.batch_1}"}
|
||||
</#if>
|
||||
},
|
||||
{
|
||||
"Key": "HeldForSpecificCode",
|
||||
<#if line_without_detail.hold_for_specific_code == "true">
|
||||
"Value": { "Bool" : "True"}
|
||||
<#else>
|
||||
"Value": { "Bool" : "False"}
|
||||
},
|
||||
|
||||
{
|
||||
<#assign manufacturing_date = line_without_detail.ipg_date_of_manufacture_date?datetime(rfx_date_format_default)?iso_utc />
|
||||
"Key": "ManufacturingDate",
|
||||
"Value": "Timestamp": {
|
||||
"AuthorTimeZone": "${time_zone_rfx}",
|
||||
"DateTime": "${manufacturing_date}"
|
||||
}
|
||||
}
|
||||
|
||||
]
|
||||
|
||||
-->
|
||||
"SegmentationKeys": [ ]
|
||||
25
RFXtoRP_HsrAntRec_ReceiptCompleted.ftl
Normal file
25
RFXtoRP_HsrAntRec_ReceiptCompleted.ftl
Normal file
@@ -0,0 +1,25 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#--<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.creation_datetime,time_zone_rfx) /> -->
|
||||
<#assign now = .now?string("yyyy-MM-dd'T'HH:mm:ss'Z'") />
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
<#if AncReceipt.anticipated_receipt_reference?? && AncReceipt.anticipated_receipt_reference!="">
|
||||
"RefID": "${AncReceipt.anticipated_receipt_reference?json_string}",
|
||||
<#else>
|
||||
"RefID": "AR-${AncReceipt.physical_depot_code?trim?json_string}${AncReceipt.activity_code?trim?json_string}${AncReceipt.originator_code?trim?json_string}${AncReceipt.anticipated_receipt_year?json_string}${AncReceipt.anticipated_receipt_number?json_string}",
|
||||
</#if>
|
||||
"RefDate": {
|
||||
"DateTime": "${now}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
|
||||
"Payload": {}
|
||||
|
||||
}
|
||||
]
|
||||
25
RFXtoRP_HsrAntRec_ReceiptExpected.ftl
Normal file
25
RFXtoRP_HsrAntRec_ReceiptExpected.ftl
Normal file
@@ -0,0 +1,25 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#--<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.creation_datetime,time_zone_rfx) /> -->
|
||||
<#assign now = .now?string("yyyy-MM-dd'T'HH:mm:ss'Z'") />
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
<#if AncReceipt.anticipated_receipt_reference?? && AncReceipt.anticipated_receipt_reference!="">
|
||||
"RefID": "${AncReceipt.anticipated_receipt_reference?json_string}",
|
||||
<#else>
|
||||
"RefID": "AR-${AncReceipt.physical_depot_code?trim?json_string}${AncReceipt.activity_code?trim?json_string}${AncReceipt.originator_code?trim?json_string}${AncReceipt.anticipated_receipt_year?json_string}${AncReceipt.anticipated_receipt_number?json_string}",
|
||||
</#if>
|
||||
"RefDate": {
|
||||
"DateTime": "${now}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
|
||||
"Payload": {}
|
||||
|
||||
}
|
||||
]
|
||||
@@ -107,60 +107,85 @@
|
||||
<#include "RFXtoRP_HsrCarrierApt_SegmentationSelections.ftl">,
|
||||
<#include "RFXtoRP_HsrCarrierApt_CarrierInformation.ftl">,
|
||||
<#include "RFXtoRP_HsrCarrierApt_MetadataAppointment.ftl">,
|
||||
<#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0)>
|
||||
"Unloading" :
|
||||
{
|
||||
"Projects" : [{
|
||||
"Commissions": [
|
||||
<#list carrier_apt.physical_receipt_list?filter(l ->l??) as physical_receipt>
|
||||
{
|
||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
||||
<#if physical_receipt.physical_receipt_reference?? && physical_receipt.physical_receipt_reference!="">
|
||||
"OrderID": "${physical_receipt.physical_receipt_reference?json_string}",
|
||||
<#else>
|
||||
"OrderID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year}${physical_receipt.receipt_number}",
|
||||
</#if>
|
||||
"ExecutionflowID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year?json_string}${physical_receipt.receipt_number?json_string}",
|
||||
"ProjectID": "${projectRP}",
|
||||
"PartnerAppID": "${partnerApplicationRP}",
|
||||
"OrganisationID": "${organisationRP}"
|
||||
}<#sep>,</#sep>
|
||||
</#list>
|
||||
],
|
||||
"ProjectID" : "${projectRP}"
|
||||
}]
|
||||
},
|
||||
<#else>
|
||||
<#if appointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||
"Unloading" :
|
||||
<#else>
|
||||
"Loading" :
|
||||
</#if>
|
||||
{
|
||||
"Projects" : [{
|
||||
"Commissions": [{
|
||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
||||
"ProjectID": "${projectRP}",
|
||||
"PartnerAppID": "${partnerApplicationRP}",
|
||||
"OrganisationID": "${organisationRP}"
|
||||
}],
|
||||
"ProjectID" : "${projectRP}"
|
||||
}]
|
||||
},
|
||||
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
||||
"Reason": "UNLOADING AND LOADING / ${carrier_apt.appointment_designation?json_string}",
|
||||
<#else>
|
||||
<#if carrier_apt.appointment_designation?? && carrier_apt.appointment_designation!="">
|
||||
"Reason": "${carrier_apt.appointment_designation?json_string}",
|
||||
<#else>
|
||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||
"Reason": "${carrier_apt.appointment_reference?json_string}",
|
||||
<#else>
|
||||
"Reason": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||
<#-- Add commissions for anticipated and physical receipts if they exist -->
|
||||
<#if ( (carrier_apt.anticipated_receipt_list?? && (carrier_apt.anticipated_receipt_list?filter(l ->l??)?size != 0)) || (carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0))) >
|
||||
<#assign AddComma = false />
|
||||
"Unloading" :
|
||||
{
|
||||
"Projects" : [
|
||||
{
|
||||
"Commissions": [
|
||||
<#list (carrier_apt.physical_receipt_list![])?filter(l -> l??) as physical_receipt>
|
||||
{
|
||||
<#assign AddComma = true />
|
||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
||||
<#if physical_receipt.physical_receipt_reference?? && physical_receipt.physical_receipt_reference!="">
|
||||
"OrderID": "${physical_receipt.physical_receipt_reference?json_string}",
|
||||
<#else>
|
||||
"OrderID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year}${physical_receipt.receipt_number}",
|
||||
</#if>
|
||||
"ExecutionflowID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year?json_string}${physical_receipt.receipt_number?json_string}",
|
||||
"ProjectID": "${projectRP}",
|
||||
"PartnerAppID": "${partnerApplicationRP}",
|
||||
"OrganisationID": "${organisationRP}"
|
||||
}<#sep>,</#sep>
|
||||
</#list>
|
||||
|
||||
<#list (carrier_apt.anticipated_receipt_list![])?filter(l -> l??) as anticipated_receipt>
|
||||
<#if AddComma == true>
|
||||
,
|
||||
<#assign AddComma = false />
|
||||
</#if>
|
||||
{
|
||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
||||
<#if anticipated_receipt.anticipated_receipt_reference?? && anticipated_receipt.anticipated_receipt_reference!="">
|
||||
"OrderID": "${anticipated_receipt.anticipated_receipt_reference?json_string}",
|
||||
<#else>
|
||||
"OrderID": "AR${carrier_apt.physical_depot?json_string}${anticipated_receipt.activity?json_string}${anticipated_receipt.originator_code?json_string}${anticipated_receipt.anticipated_receipt_year}${anticipated_receipt.anticipated_receipt_number}",
|
||||
</#if>
|
||||
"ProjectID": "${projectRP}",
|
||||
"PartnerAppID": "${partnerApplicationRP}",
|
||||
"OrganisationID": "${organisationRP}"
|
||||
}<#sep>,</#sep>
|
||||
</#list>
|
||||
],
|
||||
"ProjectID" : "${projectRP}"
|
||||
}]
|
||||
},
|
||||
<#else>
|
||||
<#if appointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||
"Unloading" :
|
||||
<#else>
|
||||
"Loading" :
|
||||
</#if>
|
||||
{
|
||||
"Projects" : [
|
||||
{
|
||||
"Commissions": [
|
||||
{
|
||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
||||
"ProjectID": "${projectRP}",
|
||||
"PartnerAppID": "${partnerApplicationRP}",
|
||||
"OrganisationID": "${organisationRP}"
|
||||
}
|
||||
],
|
||||
"ProjectID" : "${projectRP}"
|
||||
}]
|
||||
},
|
||||
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
||||
"Reason": "UNLOADING AND LOADING / ${carrier_apt.appointment_designation?json_string}",
|
||||
<#else>
|
||||
<#if carrier_apt.appointment_designation?? && carrier_apt.appointment_designation!="">
|
||||
"Reason": "${carrier_apt.appointment_designation?json_string}",
|
||||
<#else>
|
||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||
"Reason": "${carrier_apt.appointment_reference?json_string}",
|
||||
<#else>
|
||||
"Reason": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
"Slot": {
|
||||
<#-- calcul de de la durée en fonction des start et end time-->
|
||||
"DurationInSeconds": "${duration}",
|
||||
|
||||
@@ -90,34 +90,56 @@
|
||||
</#if>
|
||||
</#if>
|
||||
"TimeZone":"${time_zone_rfx}",
|
||||
<#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0) && ((carrier_apt.unloading_appointment =="true" && carrier_apt.load_appointment =="false") || (carrier_apt.unloading_appointment =="false" && carrier_apt.load_appointment =="true"))>
|
||||
<#-- Add commissions for anticipated and physical receipts if they exist -->
|
||||
<#if ( (carrier_apt.anticipated_receipt_list?? && (carrier_apt.anticipated_receipt_list?filter(l ->l??)?size != 0)) || (carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0))) >
|
||||
<#assign AddComma = false />
|
||||
"Unloading" :
|
||||
{
|
||||
"Projects" : [
|
||||
{
|
||||
"Commissions": [
|
||||
<#list carrier_apt.physical_receipt_list?filter(l ->l??) as physical_receipt>
|
||||
{
|
||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
||||
<#if physical_receipt.physical_receipt_reference?? && physical_receipt.physical_receipt_reference!="">
|
||||
"OrderID": "${physical_receipt.physical_receipt_reference?json_string}",
|
||||
<#else>
|
||||
"OrderID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year}${physical_receipt.receipt_number}",
|
||||
<#list (carrier_apt.physical_receipt_list![])?filter(l -> l??) as physical_receipt>
|
||||
{
|
||||
<#assign AddComma = true />
|
||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
||||
<#if physical_receipt.physical_receipt_reference?? && physical_receipt.physical_receipt_reference!="">
|
||||
"OrderID": "${physical_receipt.physical_receipt_reference?json_string}",
|
||||
<#else>
|
||||
"OrderID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year}${physical_receipt.receipt_number}",
|
||||
</#if>
|
||||
"ExecutionflowID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year?json_string}${physical_receipt.receipt_number?json_string}",
|
||||
"ProjectID": "${projectRP}",
|
||||
"PartnerAppID": "${partnerApplicationRP}",
|
||||
"OrganisationID": "${organisationRP}"
|
||||
}<#sep>,</#sep>
|
||||
</#list>
|
||||
<#list (carrier_apt.anticipated_receipt_list![])?filter(l -> l??) as anticipated_receipt>
|
||||
<#if AddComma == true>
|
||||
,
|
||||
<#assign AddComma = false />
|
||||
</#if>
|
||||
"ExecutionflowID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year?json_string}${physical_receipt.receipt_number?json_string}",
|
||||
"ProjectID": "${projectRP}",
|
||||
"PartnerAppID": "${partnerApplicationRP}",
|
||||
"OrganisationID": "${organisationRP}"
|
||||
}<#sep>,</#sep>
|
||||
</#list>
|
||||
{
|
||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
||||
<#if anticipated_receipt.anticipated_receipt_reference?? && anticipated_receipt.anticipated_receipt_reference!="">
|
||||
"OrderID": "${anticipated_receipt.anticipated_receipt_reference?json_string}",
|
||||
<#else>
|
||||
"OrderID": "AR${carrier_apt.physical_depot?json_string}${anticipated_receipt.activity?json_string}${anticipated_receipt.originator_code?json_string}${anticipated_receipt.anticipated_receipt_year}${anticipated_receipt.anticipated_receipt_number}",
|
||||
</#if>
|
||||
"ProjectID": "${projectRP}",
|
||||
"PartnerAppID": "${partnerApplicationRP}",
|
||||
"OrganisationID": "${organisationRP}"
|
||||
}<#sep>,</#sep>
|
||||
</#list>
|
||||
],
|
||||
"ProjectID" : "${projectRP}"
|
||||
}]
|
||||
},
|
||||
"Reason": "",
|
||||
<#else>
|
||||
<#if appointmentType == AppointmentType.APPOINTMENT_TYPE_LOADING>
|
||||
"Loading" :
|
||||
<#if appointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||
"Unloading" :
|
||||
<#else>
|
||||
"Loading" :
|
||||
</#if>
|
||||
{
|
||||
"Projects" : [
|
||||
{
|
||||
@@ -132,25 +154,7 @@
|
||||
"ProjectID" : "${projectRP}"
|
||||
}]
|
||||
},
|
||||
<#else>
|
||||
<#if appointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||
"Unloading" :
|
||||
{
|
||||
"Projects" : [
|
||||
{
|
||||
"Commissions": [
|
||||
{
|
||||
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
||||
"ProjectID": "${projectRP}",
|
||||
"PartnerAppID": "${partnerApplicationRP}",
|
||||
"OrganisationID": "${organisationRP}"
|
||||
}
|
||||
],
|
||||
"ProjectID" : "${projectRP}"
|
||||
}]
|
||||
},
|
||||
</#if>
|
||||
</#if>
|
||||
|
||||
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
||||
"Reason": "UNLOADING AND LOADING / ${carrier_apt.appointment_designation?json_string}",
|
||||
<#else>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
||||
<#stop >
|
||||
<#break>
|
||||
<#break>
|
||||
|
||||
<#default>
|
||||
<#stop >
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
}
|
||||
]
|
||||
<#else>
|
||||
<#if receipt.line_list ?? && receipt.line_list[0]??>
|
||||
<#if receipt.line_list ?? && receipt.line_list[0]??> <#-- if receipt contains at least one line -->
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||
@@ -70,6 +70,7 @@
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
<#-- if receipt is a transfer and confirmed and all lines are cancelled -->
|
||||
<#if receipt.receipt_type?? && receipt.receipt_type == "030" && receipt.receipt_confirmed == "true" && receipt.confirmation_total_level_1==0 && receipt.confirmation_total_level_2==0 && receipt.confirmation_total_level_3==0>
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||
@@ -78,6 +79,7 @@
|
||||
<#include "RFXtoRP_HsrReceiptList_TransfertExecutionflowCancelled.ftl">
|
||||
}
|
||||
<#else>
|
||||
<#-- if lines receipt are created when the user treats the receipt -->
|
||||
<#if receipt.receipt_type?? && receipt.receipt_type == "030" && receipt.receipt_confirmed == "true">
|
||||
<#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="" && receipt.receipt_reference?? && receipt.receipt_reference!="">
|
||||
<#assign ID = "${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}"/>
|
||||
|
||||
@@ -33,7 +33,18 @@
|
||||
{
|
||||
"Key": "order_number",
|
||||
"Value": "${receipt.receipt_number}"
|
||||
},
|
||||
<#if receipt.line_list[0]?? && receipt.line_list[0].line_anticipated?? && receipt.line_list[0].line_anticipated.anticipated_receipt_year!=0 && receipt.line_list[0].line_anticipated.anticipated_receipt_number!=0 >
|
||||
{
|
||||
"Key": "anticipated",
|
||||
"Value": "true"
|
||||
}
|
||||
<#else>
|
||||
{
|
||||
"Key": "anticipated",
|
||||
"Value": "false"
|
||||
}
|
||||
</#if>
|
||||
],
|
||||
"RefID": "R${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}",
|
||||
"RefDate": {
|
||||
@@ -63,10 +74,14 @@
|
||||
"ActorID": "${RFXtoRPprefixDepot(receipt.physical_depot_code?trim?json_string)}"
|
||||
},
|
||||
"ShipToAcked": true,
|
||||
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
||||
"OrderID":"${receipt.receipt_reference?trim?json_string}",
|
||||
<#if receipt.line_list[0]?? && receipt.line_list[0].line_anticipated?? && receipt.line_list[0].line_anticipated.anticipated_receipt_year!=0 && receipt.line_list[0].line_anticipated.anticipated_receipt_reference?? && receipt.line_list[0].line_anticipated.anticipated_receipt_reference=="" >
|
||||
"OrderID":"AR-${receipt.line_list[0].line_anticipated.anticipated_receipt_depot_code?trim?json_string}${receipt.line_list[0].line_anticipated.anticipated_receipt_activity_code?trim?json_string}${receipt.line_list[0].line_anticipated.anticipated_receipt_originator_code?trim?json_string}${receipt.line_list[0].line_anticipated.anticipated_receipt_year}${receipt.line_list[0].line_anticipated.anticipated_receipt_number}",
|
||||
<#else>
|
||||
"OrderID":"R${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}",
|
||||
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
||||
"OrderID":"${receipt.receipt_reference?trim?json_string}",
|
||||
<#else>
|
||||
"OrderID":"R${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}",
|
||||
</#if>
|
||||
</#if>
|
||||
<#if receipt.carrier_informations.carrier_code != "">
|
||||
"Carrier":
|
||||
@@ -79,7 +94,11 @@
|
||||
"Lines" : [
|
||||
<#list receipt.line_list as line>
|
||||
{
|
||||
"LineID": "${line.receipt_line_number}",
|
||||
<#if line.receipt_reference_line_no?? && line.receipt_reference_line_no!=0>
|
||||
"LineID": "${line.receipt_reference_line_no}",
|
||||
<#else>
|
||||
"LineID": "${line.receipt_line_number}",
|
||||
</#if>
|
||||
<#-- Line Metadata inclusion -->
|
||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl">,
|
||||
"RequestedContent":
|
||||
|
||||
@@ -74,10 +74,10 @@
|
||||
<#else>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipFromAcked>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_PrepOrder_ShipFromAcked.ftl">
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDeleted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_ExecutionflowDeleted.ftl">
|
||||
}
|
||||
]
|
||||
</#if>
|
||||
@@ -441,6 +441,8 @@
|
||||
<#case "appointment_post_physical_receipt_associations_by_number">
|
||||
<#case "appointment_post_physical_receipt_dissociations_by_ref">
|
||||
<#case "appointment_post_physical_receipt_dissociations_by_number">
|
||||
<#case "appointment_post_anticipated_receipt_associations_by_ref">
|
||||
<#case "appointment_post_anticipated_receipt_dissociations_by_number">
|
||||
<#switch restResponsetMsg.status!no_status>
|
||||
<#case no_status>
|
||||
[
|
||||
|
||||
@@ -27,6 +27,10 @@
|
||||
<#case "Updated">
|
||||
<#assign AddComma = false />
|
||||
<#assign appointment = eventRP.data />
|
||||
|
||||
<#if !eventRP.commissionsUpdated!false && !eventRP.reasonUpdated!false && !eventRP.slotUpdated!false && !eventRP.carrierInformationUpdated!false>
|
||||
<#stop>
|
||||
</#if>
|
||||
[
|
||||
<#if appointment?? && (!(appointment.WMSCreated??) || !appointment.WMSCreated) && appointment.Status?? && appointment.Status.Current?? && appointment.Status.Current.StatusCode?? && appointment.Status.Current.StatusCode == AppointmentStatusCode.APPOINTMENT_0150_ALLOCATION_ERROR>
|
||||
{
|
||||
@@ -37,7 +41,7 @@
|
||||
}
|
||||
<#else>
|
||||
<#if eventRP.commissionsUpdated>
|
||||
<#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING && eventRP.addedUnloadCommissions?? && eventRP.addedUnloadCommissions != "">
|
||||
<#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING && eventRP.addedUnloadCommissions?? && eventRP.addedUnloadCommissions != "" && eventRP.addedUnloadCommissions?filter(x -> x.ExecutionflowID != "")?size != 0>
|
||||
<#if eventRP.appointmentCustomFields?has_content>
|
||||
{
|
||||
<#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_number>
|
||||
@@ -55,7 +59,7 @@
|
||||
</#if>
|
||||
<#assign AddComma = true />
|
||||
</#if>
|
||||
<#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING && eventRP.removedUnloadCommissions?? && eventRP.removedUnloadCommissions!="">
|
||||
<#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING && eventRP.removedUnloadCommissions?? && eventRP.removedUnloadCommissions!="" && eventRP.removedUnloadCommissions?filter(x -> x.ExecutionflowID != "")?size != 0>
|
||||
<#if AddComma == true>
|
||||
,
|
||||
</#if>
|
||||
@@ -77,6 +81,36 @@
|
||||
</#if>
|
||||
<#assign AddComma = true />
|
||||
</#if>
|
||||
|
||||
<#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING && eventRP.addedUnloadCommissions?? && eventRP.addedUnloadCommissions != "" && eventRP.addedUnloadCommissions?filter(x -> x.ExecutionflowID == "")?size != 0>
|
||||
<#if AddComma == true>
|
||||
,
|
||||
</#if>
|
||||
<#if eventRP.appointmentCustomFields?has_content>
|
||||
{
|
||||
<#assign apiRestReflexID = ApiRestReflexID.appointment_post_anticipated_receipt_associations_by_number>
|
||||
"apiRestReflexID" : "${apiRestReflexID}",
|
||||
"datas" :
|
||||
<#include "RPtoRFX_CarrierAppointmentAnticipatedReceiptAssociationByNumber.ftl">
|
||||
}
|
||||
</#if>
|
||||
<#assign AddComma = true />
|
||||
</#if>
|
||||
<#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING && eventRP.removedUnloadCommissions?? && eventRP.removedUnloadCommissions!="" && eventRP.removedUnloadCommissions?filter(x -> x.ExecutionflowID == "")?size != 0>
|
||||
<#if AddComma == true>
|
||||
,
|
||||
</#if>
|
||||
|
||||
<#if eventRP.appointmentCustomFields?has_content>
|
||||
{
|
||||
<#assign apiRestReflexID = ApiRestReflexID.appointment_post_anticipated_receipt_dissociations_by_number>
|
||||
"apiRestReflexID" : "${apiRestReflexID}",
|
||||
"datas" :
|
||||
<#include "RPtoRFX_CarrierAppointmentAnticipatedReceiptDissociationByNumber.ftl">
|
||||
}
|
||||
</#if>
|
||||
<#assign AddComma = true />
|
||||
</#if>
|
||||
</#if>
|
||||
<#-- *********************************************** Action = reasonUpdated or slotUpdated ******************** -->
|
||||
<#if eventRP.reasonUpdated || eventRP.slotUpdated || eventRP.carrierInformationUpdated>
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"id" : {"refid" : "${eventRP.refid?json_string}","actorID":"${RPtoRFXprefixDepot(eventRP.actor)}"},
|
||||
"route" : "rest/public/v1/physical_depots/{physical_depot_code}/appointment_years/{appointment_year}/appointment_numbers/{appointment_number}/anticipated_receipt_associations",
|
||||
"method" : "POST",
|
||||
"uri_substitutions": {
|
||||
"physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}",
|
||||
"appointment_year":"${eventRP.appointmentCustomFields.year?json_string}",
|
||||
"appointment_number":"${eventRP.appointmentCustomFields.number?json_string}"
|
||||
},
|
||||
"payload" :
|
||||
{
|
||||
<#assign orderCustomFields = eventRP.orderCustomFields >
|
||||
<#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||
<#assign addedCommissions = eventRP.addedUnloadCommissions />
|
||||
<#else>
|
||||
<#assign addedCommissions = eventRP.addedLoadCommissions />
|
||||
</#if>
|
||||
|
||||
"anticipated_receipt_list": [
|
||||
<#list addedCommissions?filter(l -> l.OrderID??) as addedCommission>
|
||||
{
|
||||
"activity": "${orderCustomFields[addedCommission.OrderID].activity_code?json_string}",
|
||||
"originator_code": "${orderCustomFields[addedCommission.OrderID].originator_code?json_string}",
|
||||
"anticipated_receipt_reference": "${orderCustomFields[addedCommission.OrderID].anticipated_receipt_reference?json_string}",
|
||||
"planned_receipt_date": "${orderCustomFields[addedCommission.OrderID].planned_receipt_datetime?json_string}",
|
||||
"anticipated_receipt_year": "${orderCustomFields[addedCommission.OrderID].anticipated_receipt_year?json_string}",
|
||||
"anticipated_receipt_number": "${orderCustomFields[addedCommission.OrderID].anticipated_receipt_number?json_string}"
|
||||
}
|
||||
<#sep>,</#sep>
|
||||
</#list>
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"id" : {"refid" : "${eventRP.refid?json_string}","actorID":"${RPtoRFXprefixDepot(eventRP.actor)}"},
|
||||
"route" : "rest/public/v1/physical_depots/{physical_depot_code}/appointment_years/{appointment_year}/appointment_numbers/{appointment_number}/anticipated_receipt_dissociations",
|
||||
"method" : "POST",
|
||||
"uri_substitutions": {
|
||||
"physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}",
|
||||
"appointment_year":"${eventRP.appointmentCustomFields.year?json_string}",
|
||||
"appointment_number":"${eventRP.appointmentCustomFields.number?json_string}"
|
||||
},
|
||||
"payload" :
|
||||
{
|
||||
<#assign orderCustomFields = eventRP.orderCustomFields >
|
||||
<#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||
<#assign removedCommissions = eventRP.removedUnloadCommissions />
|
||||
<#else>
|
||||
<#assign removedCommissions = eventRP.removedLoadCommissions />
|
||||
</#if>
|
||||
|
||||
"anticipated_receipt_list": [
|
||||
<#list removedCommissions?filter(l -> l.OrderID??) as removedCommission>
|
||||
{
|
||||
"activity": "${orderCustomFields[removedCommission.OrderID].activity_code?json_string}",
|
||||
"originator_code": "${orderCustomFields[removedCommission.OrderID].originator_code?json_string}",
|
||||
"anticipated_receipt_reference": "${orderCustomFields[removedCommission.OrderID].anticipated_receipt_reference?json_string}",
|
||||
"planned_receipt_date": "${orderCustomFields[removedCommission.OrderID].planned_receipt_datetime?json_string}",
|
||||
"anticipated_receipt_year": "${orderCustomFields[removedCommission.OrderID].anticipated_receipt_year?json_string}",
|
||||
"anticipated_receipt_number": "${orderCustomFields[removedCommission.OrderID].anticipated_receipt_number?json_string}"
|
||||
}
|
||||
<#sep>,</#sep>
|
||||
</#list>
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -36,10 +36,10 @@
|
||||
</#switch>
|
||||
<#include "RPtoRFX_CarrierAppointmentDefaultData.ftl">
|
||||
<#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING >
|
||||
<#if appointment.Unloading?? && appointment.Unloading.Projects?? && appointment.Unloading.Projects[0]?? &&
|
||||
appointment.Unloading.Projects[0].Commissions?? &&
|
||||
appointment.Unloading.Projects[0].Commissions[0]?? && appointment.Unloading.Projects[0].Commissions[0].ExecutionflowID?? && appointment.Unloading.Projects[0].Commissions[0].ExecutionflowID!="" >
|
||||
"physical_receipt_list": [
|
||||
<#if appointment.Unloading?? && appointment.Unloading.Projects?? &&
|
||||
appointment.Unloading.Projects[0]?? &&
|
||||
appointment.Unloading.Projects[0].Commissions??>
|
||||
"physical_receipt_list": [
|
||||
<#list appointment.Unloading.Projects[0].Commissions?filter(l ->l.ExecutionflowID?? && l.ExecutionflowID !="") as commission>
|
||||
<#list eventRP.executionflowCustomFields.entrySet()?filter(l ->l.key == commission.ExecutionflowID && l.value?? && l.value?has_content) as custom>
|
||||
{
|
||||
@@ -54,6 +54,22 @@
|
||||
<#sep>,</#sep>
|
||||
</#list>
|
||||
],
|
||||
"anticipated_receipt_list": [
|
||||
<#list appointment.Unloading.Projects[0].Commissions?filter(l -> (!(l.ExecutionflowID??) || l.ExecutionflowID =="") && (l.OrderID?? && l.OrderID !="")) as commission>
|
||||
<#list eventRP.orderCustomFields.entrySet()?filter(l ->l.key == commission.OrderID && l.value?? && l.value?has_content) as custom>
|
||||
{
|
||||
"activity": "${custom.value.activity_code?json_string}",
|
||||
"originator_code": "${custom.value.originator_code?json_string}",
|
||||
"anticipated_receipt_reference": "${custom.value.anticipated_receipt_reference?json_string}",
|
||||
"planned_receipt_date": "${custom.value.planned_receipt_datetime?json_string}",
|
||||
"anticipated_receipt_year": "${custom.value.anticipated_receipt_year?json_string}",
|
||||
"anticipated_receipt_number": "${custom.value.anticipated_receipt_number?json_string}"
|
||||
}
|
||||
<#sep>,</#sep>
|
||||
</#list>
|
||||
<#sep>,</#sep>
|
||||
</#list>
|
||||
],
|
||||
<#else>
|
||||
"appointment_designation":"${(appointment.Reason!"")!?json_string}",
|
||||
</#if>
|
||||
|
||||
@@ -37,15 +37,15 @@
|
||||
"requested_delivery_start_datetime": "${DateTimeUTCtoRfxLocale(.now?iso_utc?string,time_zone_rfx)}",
|
||||
</#if>
|
||||
"requested_delivery_date_type": "${requested_delivery_date_type}",
|
||||
"consolidated_delivery": "${consolidated_delivery_flag}",
|
||||
"consolidated_delivery": "false",
|
||||
"pick_sequence_code": "${pick_sequence_code}",
|
||||
"intermediate_consignee": "false",
|
||||
"protected": "${protected_flag}",
|
||||
"automatic_generation": "${automatic_generation_flag}",
|
||||
"protected": "false",
|
||||
"automatic_generation": "true",
|
||||
"deactivate": "false",
|
||||
"optional_attributes": {
|
||||
<#include "RPtoRFX_PrepOrder_OptionalAttributes.ftl">
|
||||
"apt_with_end_consignee": "${apt_with_end_consignee_flag}",
|
||||
"apt_with_end_consignee": "false",
|
||||
"apt_with_intermediate": "false",
|
||||
"load_grouping": "${load_grouping}"
|
||||
}
|
||||
|
||||
@@ -18,11 +18,7 @@
|
||||
<#assign originator_code = ""/>
|
||||
<#assign preparation_type_code = "010"/>
|
||||
<#assign requested_delivery_date_type = "010"/>
|
||||
<#assign consolidated_delivery_flag ="false"/>
|
||||
<#assign pick_sequence_code = ""/>
|
||||
<#assign protected_flag ="false"/>
|
||||
<#assign automatic_generation_flag ="false"/>
|
||||
<#assign apt_with_end_consignee_flag="false"/>
|
||||
|
||||
<#-- A supprimer si utilisation de la table de correspondance-->
|
||||
<#--To be deleted if using the correspondence table-->
|
||||
|
||||
Reference in New Issue
Block a user