Modif HsrPrepa 0112231019

This commit is contained in:
Laurie MONTANT 2023-12-01 10:20:01 +01:00
parent e093ea7c07
commit 9bb625bade
2 changed files with 38 additions and 36 deletions

View File

@ -16,7 +16,7 @@
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign preparationStatusInterface = JsonUtil.jsonToMap(dataRfx) /> <#assign preparationStatusInterface = JsonUtil.jsonToMap(dataRfx) />
[ [
<#--**Pick batch runned (100) **--> <#--**Pick batch runned (200) **-->
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "200" > <#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "200" >
{ {
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationExpected> <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationExpected>

View File

@ -10,49 +10,51 @@
<#assign aDateTime = .now> <#assign aDateTime = .now>
<#switch cloudEventMsg.action> <#switch cloudEventMsg.action>
<#case "C"> <#case "C">
<#--<#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 preparationOrder = JsonUtil.jsonToMap(dataRfx)> <#assign preparationOrder = JsonUtil.jsonToMap(dataRfx)>
[
<#if preparationOrder.total_lv_validated !=0>
[
{ {
<#assign apiReflexPlatformID = ApiReflexPlatformID.GoodsPrepared> <#assign apiReflexPlatformID = ApiReflexPlatformID.GoodsPrepared>
"apiReflexPlatformID" : "${apiReflexPlatformID}", "apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" : "datas" :
<#include "RFXtoRP_HsrPrepa_GoodsPrepared.ftl"> <#include "RFXtoRP_HsrPrepa_GoodsPrepared.ftl">
}, },
{ {
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched> <#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
"apiReflexPlatformID" : "${apiReflexPlatformID}", "apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" : "datas" :
<#include "RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl"> <#include "RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl">
} }
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list??) as preparation_line> <#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list??) as preparation_line>
<#list preparation_line.despatched_ipg_list as despatched_ipg> <#list preparation_line.despatched_ipg_list as despatched_ipg>
<#if despatched_ipg.consignment_unit_id != ""> <#if despatched_ipg.consignment_unit_id != "">
, ,
{ {
<#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled> <#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled>
"apiReflexPlatformID" : "${apiReflexPlatformID}", "apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" : "datas" :
<#include "RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl"> <#include "RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl">
} }
</#if> </#if>
</#list> </#list>
</#list> </#list>
] ]
<#break> <#else>
<#stop "no confirmed quantity for the preparation - preparation closed">
</#if>
<#case "D"> <#break>
<#-- *********************************************** Action = DELETE ******************** --> <#case "D">
<#stop "event not supported (Case D)"> <#-- *********************************************** Action = DELETE ******************** -->
<#break> <#stop "event not supported (Case D)">
<#break>
<#default>
<#default> <#stop "event not supported">
<#stop "event not supported">
</#switch> </#switch>