Controle line_list

This commit is contained in:
Laurie MONTANT 2025-08-06 11:13:02 +02:00
parent 27a762caa8
commit 8863cd66a7
3 changed files with 63 additions and 33 deletions

View File

@ -18,6 +18,7 @@
<#assign preparationOrder = JsonUtil.jsonToMap(dataRfx)> <#assign preparationOrder = JsonUtil.jsonToMap(dataRfx)>
<#if preparationOrder.total_lv_validated !=0> <#if preparationOrder.total_lv_validated !=0>
<#if preparationOrder.preparation_line_lst??>
[ [
{ {
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsPrepared> <#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsPrepared>
@ -95,6 +96,10 @@
</#list> </#list>
<#assign refIDHmap ={}> <#assign refIDHmap ={}>
] ]
<#else>
<#-- No line-->
<#stop >
</#if>
<#else> <#else>
<#-- no confirmed quantity for the preparation - preparation closed--> <#-- no confirmed quantity for the preparation - preparation closed-->
<#stop > <#stop >

View File

@ -19,12 +19,17 @@
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!=""> <#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
<#-- check preparation type code (internal order and reservation are ignored) --> <#-- check preparation type code (internal order and reservation are ignored) -->
<#if preparation_order.preparation_type_code?? && (preparation_order.preparation_type_code == "010" || preparation_order.preparation_type_code == "030")> <#if preparation_order.preparation_type_code?? && (preparation_order.preparation_type_code == "010" || preparation_order.preparation_type_code == "030")>
<#if preparation_order.line_list??>
{ {
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected> <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
"apiReflexPlatformID" : "${apiReflexPlatformID}", "apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" : "datas" :
<#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl"> <#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl">
} }
<#else>
<#-- No line -->
<#stop>
</#if>
<#else> <#else>
<#-- preparation order type not supported --> <#-- preparation order type not supported -->
<#stop> <#stop>
@ -42,12 +47,17 @@
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)> <#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
[ [
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!=""> <#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
<#if preparation_order.line_list??>
{ {
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled> <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
"apiReflexPlatformID" : "${apiReflexPlatformID}", "apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" : "datas" :
<#include "RFXtoRP_HsrPro_ExecutionflowCancelled.ftl"> <#include "RFXtoRP_HsrPro_ExecutionflowCancelled.ftl">
} }
<#else>
<#-- No line -->
<#stop>
</#if>
<#else> <#else>
<#-- PRO reference is empty --> <#-- PRO reference is empty -->
<#stop> <#stop>

View File

@ -19,6 +19,7 @@
<#if receipt.receipt_type == "030"> <#if receipt.receipt_type == "030">
<#stop "ignored message because receipt type = transfert"> <#stop "ignored message because receipt type = transfert">
<#else> <#else>
<#if receipt.line_list ??>
[ [
{ {
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected> <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
@ -35,6 +36,10 @@
} }
] ]
<#else>
<#-- No line-->
<#stop>
</#if>
</#if> </#if>
<#else> <#else>
<#-- "Receipt reference is empty"--> <#-- "Receipt reference is empty"-->
@ -66,6 +71,7 @@
<#if receipt.receipt_type == "030"> <#if receipt.receipt_type == "030">
<#stop "ignored message because receipt type = transfert"> <#stop "ignored message because receipt type = transfert">
<#else> <#else>
<#if receipt.line_list ??>
{ {
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected> <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
"apiReflexPlatformID" : "${apiReflexPlatformID}", "apiReflexPlatformID" : "${apiReflexPlatformID}",
@ -78,6 +84,10 @@
"datas" : "datas" :
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl"> <#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
} }
<#else>
<#-- No line-->
<#stop>
</#if>
</#if> </#if>
</#if> </#if>
</#if> </#if>
@ -94,6 +104,7 @@
<#assign receipt = JsonUtil.jsonToMap(dataRfx)> <#assign receipt = JsonUtil.jsonToMap(dataRfx)>
[ [
<#if receipt.receipt_reference?? && receipt.receipt_reference!=""> <#if receipt.receipt_reference?? && receipt.receipt_reference!="">
<#if receipt.line_list ??>
{ {
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled> <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
@ -101,6 +112,10 @@
"datas" : "datas" :
<#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl"> <#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl">
} }
<#else>
<#-- No line-->
<#stop>
</#if>
<#else> <#else>
<#-- Receipt reference is empty--> <#-- Receipt reference is empty-->
<#stop > <#stop >