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

@ -2,57 +2,59 @@
<#-- input : message RFX --> <#-- input : message RFX -->
<#-- project : projectId in ReflexPlatform --> <#-- project : projectId in ReflexPlatform -->
<#-- organisation : organisationtId in ReflexPlatform --> <#-- organisation : organisationtId in ReflexPlatform -->
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project> <#assign projectRP = project>
<#assign organisationRP = organisation> <#assign organisationRP = organisation>
<#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">
<#case "D"> </#if>
<#-- *********************************************** Action = DELETE ******************** -->
<#stop "event not supported (Case D)"> <#break>
<#break> <#case "D">
<#-- *********************************************** Action = DELETE ******************** -->
<#stop "event not supported (Case D)">
<#default> <#break>
<#stop "event not supported">
</#switch>
<#default>
<#stop "event not supported">
</#switch>