Modifs logs

This commit is contained in:
Laurie MONTANT 2024-02-15 10:42:42 +01:00
parent f25f664b9a
commit 3ededd9c62
5 changed files with 71 additions and 72 deletions

View File

@ -10,8 +10,8 @@
<#case "U"> <#case "U">
<#case "D"> <#case "D">
<#--<#stop "no generic FTL file available yet for LV types"> --> <#stop "no generic FTL file available yet for LV types">
<#stop>
<#break> <#break>

View File

@ -1,4 +1,4 @@
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project> <#assign projectRP = project>
<#assign organisationRP = organisation> <#assign organisationRP = organisation>
@ -9,13 +9,13 @@
<#case "U"> <#case "U">
<#-- *********************************************** Action = CREATE or UPDATE ******************** --> <#-- *********************************************** Action = CREATE or UPDATE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign reflexMvtStockInterface = JsonUtil.jsonToMap(dataRfx)> <#assign reflexMvtStockInterface = JsonUtil.jsonToMap(dataRfx)>
<#-- exclusion of the cases of an IPG move with quantity = 0 (weight modification) --> <#-- exclusion of the cases of an IPG move with quantity = 0 (weight modification) -->
<#if reflexMvtStockInterface.ipg_move_quantity_in_base_lvs != 0> <#if reflexMvtStockInterface.ipg_move_quantity_in_base_lvs != 0>
<#-- IPG moves translated into Stock moves --> <#-- IPG moves translated into Stock moves -->
<#if reflexMvtStockInterface.ipg_move_type == "130" || <#if reflexMvtStockInterface.ipg_move_type == "130" ||
reflexMvtStockInterface.ipg_move_type == "200" || reflexMvtStockInterface.ipg_move_type == "200" ||
reflexMvtStockInterface.ipg_move_type == "210" || reflexMvtStockInterface.ipg_move_type == "210" ||
reflexMvtStockInterface.ipg_move_type == "220" || reflexMvtStockInterface.ipg_move_type == "220" ||
@ -25,50 +25,49 @@
reflexMvtStockInterface.ipg_move_type == "290" || reflexMvtStockInterface.ipg_move_type == "290" ||
reflexMvtStockInterface.ipg_move_type == "300" || reflexMvtStockInterface.ipg_move_type == "300" ||
reflexMvtStockInterface.ipg_move_type == "400" || reflexMvtStockInterface.ipg_move_type == "400" ||
reflexMvtStockInterface.ipg_move_type == "410" || reflexMvtStockInterface.ipg_move_type == "410" ||
reflexMvtStockInterface.ipg_move_type == "420" reflexMvtStockInterface.ipg_move_type == "420"
> >
[ [
{ {
<#assign apiReflexPlatformID = ApiReflexPlatformID.StockMoved> <#assign apiReflexPlatformID = ApiReflexPlatformID.StockMoved>
"apiReflexPlatformID" : "${apiReflexPlatformID}", "apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" : "datas" :
<#include "RFXtoRP_HsaIpgMove_StockMoved.ftl"> <#include "RFXtoRP_HsaIpgMove_StockMoved.ftl">
} }
] ]
<#else> <#else>
<#-- IPG moves translated into goods received (all type of receipt) --> <#-- IPG moves translated into goods received (all type of receipt) -->
<#if reflexMvtStockInterface.ipg_move_type == "100" || <#if reflexMvtStockInterface.ipg_move_type == "100" ||
reflexMvtStockInterface.ipg_move_type == "110" || reflexMvtStockInterface.ipg_move_type == "110" ||
reflexMvtStockInterface.ipg_move_type == "120" reflexMvtStockInterface.ipg_move_type == "120"
> >
[ [
{ {
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsReceived> <#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsReceived>
"apiReflexPlatformID" : "${apiReflexPlatformID}", "apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" : "datas" :
<#include "RFXtoRP_HsaIpgMove_GoodsReceived.ftl"> <#include "RFXtoRP_HsaIpgMove_GoodsReceived.ftl">
}
} ]
] <#else>
<#else> <#-- Case of IPG move type volontarilly ignored-->
<#-- Case of IPG move type volontarilly ignored--> <#stop>
<#stop "Move type not supported"> </#if>
</#if>
</#if>
<#else>
<#-- cases of an IPG move with quantity = 0 (weight modification)-->
<#stop "move ignored quantity = 0">
</#if> </#if>
<#else>
<#-- cases of an IPG move with quantity = 0 (weight modification)-->
<#stop>
</#if>
<#break> <#break>
<#case "D"> <#case "D">
<#-- *********************************************** Action = DELETE ******************** --> <#-- *********************************************** Action = DELETE ******************** -->
<#stop "event not supported - Case D "> <#stop "event not supported - Case D ">
<#break> <#break>
<#default> <#default>
<#stop "event not supported"> <#stop "event not supported">
</#switch> </#switch>

View File

@ -58,7 +58,7 @@
<#include "RFXtoRP_HsaProStatus_ExecutionflowCancelled.ftl"> <#include "RFXtoRP_HsaProStatus_ExecutionflowCancelled.ftl">
} }
<#else> <#else>
<#stop "Reflex WMS status not supported on Reflex Platform"> <#stop>
</#if> </#if>
</#if> </#if>
</#if> </#if>

View File

@ -34,7 +34,7 @@
<#stop "preparation order type not supported"> <#stop "preparation order type not supported">
</#if> </#if>
<#else> <#else>
<#stop "PRO reference is null"> <#stop "PRO reference is empty">
</#if> </#if>
} }

View File

@ -1,87 +1,87 @@
<#include "HfRpConfig.ftl"> <#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl"> <#include "ReflexUtils.ftl">
[ [
{ {
<#assign receipt_datetime = RfxDateTimetoUTC(receipt.receipt_datetime,time_zone_offset_rfx) /> <#assign receipt_datetime = RfxDateTimetoUTC(receipt.receipt_datetime,time_zone_offset_rfx) />
<#assign receipt_creation_datetime = RfxDateTimetoUTC(receipt.creation_datetime,time_zone_offset_rfx) /> <#assign receipt_creation_datetime = RfxDateTimetoUTC(receipt.creation_datetime,time_zone_offset_rfx) />
"Header": { "Header": {
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"ID": { "ID": {
"RefID": "${receipt.receipt_reference}", "RefID": "${receipt.receipt_reference}",
"RefDate": { "RefDate": {
"DateTime": "${receipt_creation_datetime}", "DateTime": "${receipt_creation_datetime}",
"AuthorTimeZone": "${time_zone_rfx}" "AuthorTimeZone": "${time_zone_rfx}"
} }
}, },
"Payload": { "Payload": {
"CreationDateTime": { "CreationDateTime": {
"DateTime": "${receipt_creation_datetime}", "DateTime": "${receipt_creation_datetime}",
"AuthorTimeZone": "${time_zone_rfx}" "AuthorTimeZone": "${time_zone_rfx}"
}, },
<#-- Header Metadata inclusion --> <#-- Header Metadata inclusion -->
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl">, <#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl">,
"ShipFrom": "ShipFrom":
{ {
"ActorID": "${receipt.original_code}" "ActorID": "${receipt.original_code}"
}, },
"ShipTo" : "ShipTo" :
{ {
"ActorID": "${receipt.physical_depot_code}" "ActorID": "${receipt.physical_depot_code}"
}, },
"ShipToAcked": true, "ShipToAcked": true,
<#if receipt.carrier_informations.carrier_code != ""> <#if receipt.carrier_informations.carrier_code != "">
"Carrier" : {"ActorID": "${receipt.carrier_informations.carrier_code}"}, "Carrier" : {"ActorID": "${receipt.carrier_informations.carrier_code}"},
</#if> </#if>
<#if receipt.line_list??> <#if receipt.line_list??>
"Lines" : [ "Lines" : [
<#list receipt.line_list as line> <#list receipt.line_list as line>
{ {
"LineID": "${line.receipt_line_number}", "LineID": "${line.receipt_line_number}",
<#-- Line Metadata inclusion --> <#-- Line Metadata inclusion -->
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl">, <#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl">,
"RequestedContent": "RequestedContent":
{ {
"Goods": "Goods":
{ {
"ItemID": "${line.item_code!"0"}", "ItemID": "${line.item_code!"0"}",
"LVBranchID": "${line.item_lv_code!"0"}", "LVBranchID": "${line.item_lv_code!"0"}",
<#if line.line_without_detail??> <#if line.line_without_detail??>
<#if (line.line_without_detail.priority_date?length != 0) && (line.line_without_detail.priority_date?starts_with("00") == false)> <#if (line.line_without_detail.priority_date?length != 0) && (line.line_without_detail.priority_date?starts_with("00") == false)>
<#assign line_without_detail_priority_date = line.line_without_detail.priority_date?datetime(rfx_date_format_default)?iso_utc /> <#assign line_without_detail_priority_date = line.line_without_detail.priority_date?datetime(rfx_date_format_default)?iso_utc />
"PriorityDate": "${line_without_detail_priority_date}", "PriorityDate": "${line_without_detail_priority_date}",
</#if> </#if>
<#else> <#else>
<#stop "line with detail"> <#stop >
</#if> </#if>
<#-- Segmentation Keys inclusion --> <#-- Segmentation Keys inclusion -->
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl"> <#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl">
}, },
"Quantity" : "Quantity" :
{ {
"LVID": "${quantity_in_base_lv_RP_Cst}", "LVID": "${quantity_in_base_lv_RP_Cst}",
"Value": "${line.order_quantity_in_lv!0}" "Value": "${line.order_quantity_in_lv!0}"
} }
} }
} }
<#sep>,</#sep> <#sep>,</#sep>
</#list> </#list>
], ],
</#if> </#if>
"RequestedMilestones" : "RequestedMilestones" :
{ {
"RequestedDeliveryDateTime" : "RequestedDeliveryDateTime" :
{ {
"DateTime": "${receipt_datetime}", "DateTime": "${receipt_datetime}",
"AuthorTimeZone": "${time_zone_rfx}" "AuthorTimeZone": "${time_zone_rfx}"
} }
} }
} }
} }