fixv12
This commit is contained in:
parent
fde8ffe813
commit
39914dbdde
@ -1,49 +0,0 @@
|
|||||||
<#-- **** input parameters ***** -->
|
|
||||||
<#-- input : message HARDIS WMS -->
|
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
|
||||||
<#assign projectRP = project>
|
|
||||||
<#assign organisationRP = organisation>
|
|
||||||
|
|
||||||
<#assign aDateTime = .now>
|
|
||||||
|
|
||||||
<#switch cloudEventMsg.action>
|
|
||||||
<#case "C">
|
|
||||||
<#-- *********************************************** Action = CREATE ******************** -->
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
||||||
<#assign ancReceiptLine = JsonUtil.jsonToMap(dataRfx)>
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#stop "create anticipated receipt line">
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#break>
|
|
||||||
<#case "U">
|
|
||||||
<#-- *********************************************** Action = UPDATE ******************** -->
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
||||||
<#assign ancReceiptLine = JsonUtil.jsonToMap(dataRfx)>
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#stop "update anticipated receipt line">
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
<#case "D">
|
|
||||||
<#-- *********************************************** Action = DELETE ******************** -->
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
||||||
<#assign ancReceiptLine = JsonUtil.jsonToMap(dataRfx)>
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#stop "delete anticipated receipt line">
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
|
|
||||||
<#default>
|
|
||||||
<#stop >
|
|
||||||
</#switch>
|
|
||||||
|
|
||||||
@ -1,55 +0,0 @@
|
|||||||
<#-- **** input parameters ***** -->
|
|
||||||
<#-- input : message HARDIS WMS -->
|
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
|
||||||
<#assign projectRP = project>
|
|
||||||
<#assign organisationRP = organisation>
|
|
||||||
|
|
||||||
<#assign aDateTime = .now>
|
|
||||||
|
|
||||||
<#switch cloudEventMsg.action>
|
|
||||||
<#case "C">
|
|
||||||
<#-- *********************************************** Action = CREATE ******************** -->
|
|
||||||
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
||||||
<#assign ancReceipt = JsonUtil.jsonToMap(dataRfx)>
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#--<#assign apiReflexPlatformID = ApiReflexPlatformID.OrderCreated>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrAntRec_Created.ftl">-->
|
|
||||||
<#stop "create anticipated receipt">
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#break>
|
|
||||||
<#case "U">
|
|
||||||
<#-- *********************************************** Action = UPDATE ******************** -->
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
||||||
<#assign ancReceipt = JsonUtil.jsonToMap(dataRfx)>
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#stop "update anticipated receipt">
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
<#case "D">
|
|
||||||
<#-- *********************************************** Action = DELETE ******************** -->
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
||||||
<#assign ancReceipt = JsonUtil.jsonToMap(dataRfx)>
|
|
||||||
[
|
|
||||||
{
|
|
||||||
|
|
||||||
<#stop "delete anticipated receipt">
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
|
|
||||||
<#default>
|
|
||||||
<#stop >
|
|
||||||
</#switch>
|
|
||||||
|
|
||||||
@ -1,81 +0,0 @@
|
|||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
[
|
|
||||||
{
|
|
||||||
<#assign creationDate = RfxDateTimetoUTCWithTimezone(dataRfx.@timestamp,time_zone_rfx) />
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID": {
|
|
||||||
"CustomFields": [
|
|
||||||
{
|
|
||||||
"Key": "anticipated_receipt_reference",
|
|
||||||
"Value": "${ancReceipt.anticipated_receipt_reference?json_string}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Key": "anticipated_receipt_year",
|
|
||||||
"Value": "${ancReceipt.anticipated_receipt_year?json_string}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Key": "anticipated_receipt_number",
|
|
||||||
"Value": "${ancReceipt.anticipated_receipt_number?json_string}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Key": "originator_code",
|
|
||||||
"Value": "${ancReceipt.originator_code?json_string}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Key": "activity_code",
|
|
||||||
"Value": "${ancReceipt.activity_code?json_string}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Key": "depot_code",
|
|
||||||
"Value": "${ancReceipt.physical_depot_code?json_string}"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"RefID": "${ancReceipt.anticipated_receipt_reference?json_string}"
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
"ShipFrom": {
|
|
||||||
"ActorID": "${RFXtoRPprefixSupplier(ancReceipt.original_code?json_string)}"
|
|
||||||
},
|
|
||||||
"ShipTo": {
|
|
||||||
"ActorID": "${RFXtoRPprefixDepot(ancReceipt.physical_depot_code?json_string)}"
|
|
||||||
},
|
|
||||||
"CreationDateTime": {
|
|
||||||
"DateTime": "${creationDate}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
},
|
|
||||||
"LanguageCodeISO6391":"fr",
|
|
||||||
<#-- Header Metadata inclusion -->
|
|
||||||
<#include "RFXtoRP_HsrAntRec_Created_HeaderMetadata.ftl">,
|
|
||||||
"Lines": [
|
|
||||||
<#list ancReceipt.line_list?filter(l -> l??) as line>
|
|
||||||
{
|
|
||||||
<#if line.anticipated_receipt_reference_line_no?? && line.anticipated_receipt_reference_line_no!=0>
|
|
||||||
"LineID": ${line.anticipated_receipt_reference_line_no},
|
|
||||||
<#else>
|
|
||||||
"LineID": ${line.anticipated_receipt_line_number},
|
|
||||||
</#if>
|
|
||||||
<#-- Line Metadata inclusion -->
|
|
||||||
<#include "RFXtoRP_HsrAntRec_Created_LineMetadata.ftl">,
|
|
||||||
"RequestedContent":{
|
|
||||||
"Goods":{
|
|
||||||
"ItemID":"${line.item_code?trim?json_string!"0"}",
|
|
||||||
"LVBranchID":"${line.item_lv_code?trim?json_string!"0"}",
|
|
||||||
<#-- Segmentation Keys inclusion -->
|
|
||||||
<#include "RFXtoRP_HsrAntRec_Created_SegmentationKeys.ftl">
|
|
||||||
},
|
|
||||||
"Quantity" :
|
|
||||||
{
|
|
||||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
|
||||||
"Value": "${line.planned_quantity_in_base_lv!0}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}<#sep>,</#sep>
|
|
||||||
</#list>
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@ -1,19 +0,0 @@
|
|||||||
<#-- use protobuf of class HsrReceiptList to find HARDIS WMS fields names -->
|
|
||||||
|
|
||||||
<#--
|
|
||||||
<#-- Best practices:
|
|
||||||
If the SK is of type:
|
|
||||||
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
|
||||||
- boolean: possible values: true and false
|
|
||||||
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
|
||||||
- decimal number: the separator is a point (e.g. 10.5)
|
|
||||||
"MetaData": [
|
|
||||||
{
|
|
||||||
"Key": "OrderType",
|
|
||||||
"Value": { "String" : "${order.optional_attributes.reason_code}"}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
-->
|
|
||||||
|
|
||||||
|
|
||||||
"MetaData": [ ]
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
<#-- use protobuf of class HsrReceiptList to find HARDIS WMS fields names -->
|
|
||||||
|
|
||||||
<#-- Best practices:
|
|
||||||
If the SK is of type:
|
|
||||||
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
|
||||||
- boolean: possible values: true and false
|
|
||||||
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
|
||||||
- decimal number: the separator is a point (e.g. 10.5)-->
|
|
||||||
|
|
||||||
"MetaData": [ ]
|
|
||||||
@ -1,47 +0,0 @@
|
|||||||
<#-- use protobuf of class HsrReceiptList to find HARDIS WMS fields names -->
|
|
||||||
|
|
||||||
<#--
|
|
||||||
<#-- Best practices:
|
|
||||||
If the SK is of type:
|
|
||||||
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
|
||||||
- boolean: possible values: true and false
|
|
||||||
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
|
||||||
- decimal number: the separator is a point (e.g. 10.5)
|
|
||||||
"SegmentationKeys": [
|
|
||||||
{
|
|
||||||
"Key": "Grade",
|
|
||||||
"Value": { "String" : "${line.grade_code}"}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Key": "Owner",
|
|
||||||
"Value": { "String" : "${line.owner_code}"}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Key": "BatchNumber",
|
|
||||||
<#if reflexMvtStockInterface.batch_1 == "">
|
|
||||||
"Value": { "String" : "no batch"}
|
|
||||||
<#else>
|
|
||||||
"Value": { "String" : "${line_without_detail.batch_1}"}
|
|
||||||
</#if>
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Key": "HeldForSpecificCode",
|
|
||||||
<#if line_without_detail.hold_for_specific_code == "true">
|
|
||||||
"Value": { "Bool" : "True"}
|
|
||||||
<#else>
|
|
||||||
"Value": { "Bool" : "False"}
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
<#assign manufacturing_date = line_without_detail.ipg_date_of_manufacture_date?datetime(rfx_date_format_default)?iso_utc />
|
|
||||||
"Key": "ManufacturingDate",
|
|
||||||
"Value": "Timestamp": {
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}",
|
|
||||||
"DateTime": "${manufacturing_date}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
]
|
|
||||||
|
|
||||||
-->
|
|
||||||
"SegmentationKeys": [ ]
|
|
||||||
Loading…
x
Reference in New Issue
Block a user