Addition of HfGrade and HfOwner

This commit is contained in:
Laure Pascal 2023-09-26 11:53:10 +02:00
parent c5dbe1f5a6
commit d8c89f8639
3 changed files with 115 additions and 72 deletions

28
RFXtoRP_HfGrade.ftl Normal file
View File

@ -0,0 +1,28 @@
<#-- *********************************************** Parameter global ******************** -->
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
<#assign organisationRP = organisation>
<#assign aDateTime = .now>
<#switch cloudEventMsg.action>
<#case "C">
<#case "U">
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign file = JsonUtil.jsonToMap(dataRfx)>
<#noparse><#--TODO RFXtoRP_HfGrade.ftl --></#noparse>
<#--<#include "RFXtoRP_RfxConfigurationRp.ftl"> -->
<#break>
<#case "D">
<#-- *********************************************** Action = DELETE ******************** -->
<#stop "en attente de FTL">
<#break>
<#default>
<#stop>
</#switch>

28
RFXtoRP_HfOwner.ftl Normal file
View File

@ -0,0 +1,28 @@
<#-- *********************************************** Parameter global ******************** -->
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
<#assign organisationRP = organisation>
<#assign aDateTime = .now>
<#switch cloudEventMsg.action>
<#case "C">
<#case "U">
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign file = JsonUtil.jsonToMap(dataRfx)>
<#noparse><#--TODO RFXtoRP_HfOwner.ftl --></#noparse>
<#--<#include "RFXtoRP_RfxConfigurationRp.ftl"> -->
<#break>
<#case "D">
<#-- *********************************************** Action = DELETE ******************** -->
<#stop "en attente de FTL">
<#break>
<#default>
<#stop>
</#switch>

View File

@ -10,85 +10,72 @@
<#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 preparationStatusInterface = JsonUtil.jsonToMap(dataRfx)> <#assign preparationStatusInterface = JsonUtil.jsonToMap(dataRfx) />
[ [
<#--**Pick batch runned (100) **-->
<#--**Pick batch runned (100) **--> <#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>
{ "apiReflexPlatformID" : "${apiReflexPlatformID}",
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationExpected> "datas" :
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaProStatus_PreparationExpected.ftl"> <#include "RFXtoRP_HsaProStatus_PreparationExpected.ftl">
} }
<#else> <#else>
<#-- ** Collection started (300) and Preparation in progress (400)** -->
<#-- ** Collection started (300) and Preparation in progress (400)** --> <#if preparationStatusInterface.preparation_status_type == "100" && (preparationStatusInterface.preparation_status_code == "300" || preparationStatusInterface.preparation_status_code == "400") >
<#if preparationStatusInterface.preparation_status_type == "100" && {
(preparationStatusInterface.preparation_status_code == "300" || <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationStarted>
preparationStatusInterface.preparation_status_code == "400") > "apiReflexPlatformID" : "${apiReflexPlatformID}",
{ "datas" :
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationStarted> <#include "RFXtoRP_HsaProStatus_PreparationStarted.ftl">
"apiReflexPlatformID" : "${apiReflexPlatformID}", }
"datas" : <#else>
<#include "RFXtoRP_HsaProStatus_PreparationStarted.ftl"> <#-- **Preparation to package (500) and preparation completed (550)** -->
} <#if preparationStatusInterface.preparation_status_type == "100" && (preparationStatusInterface.preparation_status_code == "500" || preparationStatusInterface.preparation_status_code == "550")>
<#else> {
<#-- **Preparation to package (500) and preparation completed (550)** --> <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationCompleted>
<#if preparationStatusInterface.preparation_status_type == "100" && "apiReflexPlatformID" : "${apiReflexPlatformID}",
(preparationStatusInterface.preparation_status_code == "500" || "datas" :
preparationStatusInterface.preparation_status_code == "550")> <#include "RFXtoRP_HsaProStatus_PreparationCompleted.ftl">
{ }
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationCompleted> <#else>
"apiReflexPlatformID" : "${apiReflexPlatformID}", <#-- ****Preparation dispatched (600)** -->
"datas" : <#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "600" >
<#include "RFXtoRP_HsaProStatus_PreparationCompleted.ftl"> {
} <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowTransportStarted>
<#else> "apiReflexPlatformID" : "${apiReflexPlatformID}",
<#-- ****Preparation dispatched (600)** --> "datas" :
<#if preparationStatusInterface.preparation_status_type == "100" && <#include "RFXtoRP_HsaProStatus_TransportStarted.ftl">
preparationStatusInterface.preparation_status_code == "600" > }
{ <#else>
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowTransportStarted> <#-- ****Preparation cancelled (650)**** -->
"apiReflexPlatformID" : "${apiReflexPlatformID}", <#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "650" >
"datas" : {
<#include "RFXtoRP_HsaProStatus_TransportStarted.ftl"> <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
} "apiReflexPlatformID" : "${apiReflexPlatformID}",
<#else> "datas" :
<#-- ****Preparation cancelled (650)**** --> <#include "RFXtoRP_HsaProStatus_ExecutionflowCancelled.ftl">
<#if preparationStatusInterface.preparation_status_type == "100" && }
preparationStatusInterface.preparation_status_code == "650" > <#else>
{ <#stop "Reflex WMS status not supported on Reflex Platform">
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled> </#if>
"apiReflexPlatformID" : "${apiReflexPlatformID}", </#if>
"datas" : </#if>
<#include "RFXtoRP_HsaProStatus_ExecutionflowCancelled.ftl"> </#if>
}
<#else>
<#stop "Reflex WMS status not supported on Reflex Platform">
</#if> </#if>
</#if> ]
</#if>
</#if>
</#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>