You've already forked reflex-wms-connector
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ff7a38fc1f | |||
| 49365d0879 | |||
| 77ef62f002 | |||
| 7942a0dfc0 | |||
| 16a6ad77c1 | |||
| 8d87e02969 | |||
| 959a0d02a8 | |||
| ed1d989b2d | |||
| f490cce345 | |||
| 2a70e2ca76 | |||
| a25e4046a3 |
@@ -37,7 +37,11 @@
|
||||
<#if uniqueness>
|
||||
<#local depot = actor>
|
||||
<#else>
|
||||
<#if actor?length gt 4>
|
||||
<#local depot = actor[4..]>
|
||||
<#else>
|
||||
<#local depot = actor>
|
||||
</#if>
|
||||
</#if>
|
||||
<#return (depot)>
|
||||
</#function>
|
||||
@@ -78,7 +82,11 @@
|
||||
<#if uniqueness>
|
||||
<#local supplier = actor>
|
||||
<#else>
|
||||
<#if actor?length gt 4>
|
||||
<#local supplier = actor[4..]>
|
||||
<#else>
|
||||
<#local supplier = actor>
|
||||
</#if>
|
||||
</#if>
|
||||
<#return (supplier)>
|
||||
</#function>
|
||||
@@ -117,7 +125,11 @@
|
||||
<#if uniqueness>
|
||||
<#local carrier = actor>
|
||||
<#else>
|
||||
<#if actor?length gt 4>
|
||||
<#local carrier = actor[4..]>
|
||||
<#else>
|
||||
<#local carrier = actor>
|
||||
</#if>
|
||||
</#if>
|
||||
<#return (carrier)>
|
||||
</#function>
|
||||
@@ -156,7 +168,11 @@
|
||||
<#if uniqueness>
|
||||
<#local consignee = actor>
|
||||
<#else>
|
||||
<#if actor?length gt 4>
|
||||
<#local consignee = actor[4..]>
|
||||
<#else>
|
||||
<#local consignee = actor>
|
||||
</#if>
|
||||
</#if>
|
||||
<#return (consignee)>
|
||||
</#function>
|
||||
@@ -9,7 +9,7 @@
|
||||
<#case "C">
|
||||
<#case "U">
|
||||
<#case "D">
|
||||
<#stop "no generic FTL file available yet for Grades">
|
||||
<#stop>
|
||||
<#break>
|
||||
|
||||
|
||||
|
||||
@@ -9,9 +9,7 @@
|
||||
<#case "C">
|
||||
<#case "U">
|
||||
<#case "D">
|
||||
|
||||
<#stop "no generic FTL file available yet for LV types">
|
||||
|
||||
<#stop>
|
||||
<#break>
|
||||
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<#case "C">
|
||||
<#case "U">
|
||||
<#case "D">
|
||||
<#stop "no generic FTL file available yet for Owners">
|
||||
<#stop>
|
||||
<#break>
|
||||
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign desPatch = JsonUtil.jsonToMap(dataRfx)>
|
||||
|
||||
<#stop "no generic FTL file available yet for desPatch">
|
||||
<#stop>
|
||||
<#break>
|
||||
|
||||
<#case "D">
|
||||
@@ -24,7 +24,7 @@
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign desPatch = JsonUtil.jsonToMap(dataRfx)>
|
||||
|
||||
<#stop "no generic FTL file available yet for desPatch">
|
||||
<#stop>
|
||||
<#break>
|
||||
<#default>
|
||||
<#stop >
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign despNt = JsonUtil.jsonToMap(dataRfx)>
|
||||
|
||||
<#stop "no generic FTL file available yet for despNt">
|
||||
<#stop>
|
||||
<#break>
|
||||
|
||||
<#case "D">
|
||||
@@ -24,7 +24,7 @@
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign despNt = JsonUtil.jsonToMap(dataRfx)>
|
||||
|
||||
<#stop "no generic FTL file available yet for despNt">
|
||||
<#stop>
|
||||
<#break>
|
||||
<#default>
|
||||
<#stop >
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
</#if>
|
||||
"ExternalInfo" : "${reflexMvtStockInterface.stock_move_reference?json_string}",
|
||||
<#if reflexMvtStockInterface.ipg_move_operation_year_number!= 0>
|
||||
"OperationReference": "${reflexMvtStockInterface.ipg_move_operation_year_number} - ${reflexMvtStockInterface.ipg_move_operation_number}",
|
||||
"OperationReference": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}-${reflexMvtStockInterface.ipg_move_operation_year_number}-${reflexMvtStockInterface.ipg_move_operation_number}",
|
||||
</#if>
|
||||
|
||||
"Quantity":
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<#-- **** input parameters ***** -->
|
||||
<#-- input : message HARDIS WMS -->
|
||||
<#-- input : message RFX -->
|
||||
<#-- project : projectId in ReflexPlatform -->
|
||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||
<#include "ActorPrefix.ftl">
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[
|
||||
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) />
|
||||
<#assign ref_datetime2 = AddSecondsToDatetime(ref_datetime?datetime.iso, 1)?iso_utc />
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
@@ -19,7 +20,7 @@
|
||||
</#if>
|
||||
</#if>
|
||||
"RefDate": {
|
||||
"DateTime": "${ref_datetime}",
|
||||
"DateTime": "${ref_datetime2}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -36,35 +36,7 @@
|
||||
<#break>
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = Update ********************-->
|
||||
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||
<#assign ID = "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}" />
|
||||
<#else>
|
||||
<#assign ID = "${carrier_apt.year_number}-${carrier_apt.appointment_number}" />
|
||||
</#if>
|
||||
<#else>
|
||||
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||
<#assign ID = "${carrier_apt.appointment_reference?json_string}" />
|
||||
<#else>
|
||||
<#assign ID = "${carrier_apt.year_number}-${carrier_apt.appointment_number}" />
|
||||
</#if>
|
||||
</#if>
|
||||
<#assign payload = '{"Header": {"ProjectID": "${projectRP}:${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"},"IDs": [{"RefID": "${ID}"}],"Options": {"Only": ["ID.RefID","Payload.WMSCreated"]}}'/>
|
||||
<#assign queryApiReflexPlatformID = QueryApiReflexPlatformID.AppointmentGetByIds>
|
||||
<#assign response = QueryApiReflexPlatformCall.call(queryApiReflexPlatformID,payload) />
|
||||
<#assign appointmentRP = JsonUtil.jsonToMap(response)>
|
||||
|
||||
<#if !appointmentRP?? || !appointmentRP.Objects?? || !appointmentRP.Objects[0]?? || !appointmentRP.Objects[0].ID.RefID?? || !appointmentRP.Objects[0].Payload?? || !appointmentRP.Objects[0].Payload.WMSCreated?? || !appointmentRP.Objects[0].Payload.WMSCreated>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.BookingForceBookAppointment>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl">
|
||||
}
|
||||
]
|
||||
<#else>
|
||||
[
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCustomFieldsUpdated>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
@@ -159,7 +131,6 @@
|
||||
</#if>
|
||||
</#if>
|
||||
]
|
||||
</#if>
|
||||
<#break>
|
||||
<#case "D">
|
||||
<#-- *********************************************** Action = Delete ******************** -->
|
||||
|
||||
@@ -61,8 +61,12 @@
|
||||
</#if>
|
||||
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||
<#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_unloading_end_datetime?datetime.iso) />
|
||||
<#if (duration <= 0)>
|
||||
<#if (duration < 0)>
|
||||
<#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" >
|
||||
<#else>
|
||||
<#if (duration == 0)>
|
||||
<#assign duration = 1 />
|
||||
</#if>
|
||||
</#if>
|
||||
<#else>
|
||||
<#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" >
|
||||
@@ -71,8 +75,12 @@
|
||||
</#if>
|
||||
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_LOADING>
|
||||
<#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_load_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) />
|
||||
<#if (duration <= 0)>
|
||||
<#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" >
|
||||
<#if (duration < 0)>
|
||||
<#stop "planned_load_start_datetime or planned_load_end_datetime field of appointmend are not valid" >
|
||||
<#else>
|
||||
<#if (duration == 0)>
|
||||
<#assign duration = 1 />
|
||||
</#if>
|
||||
</#if>
|
||||
<#else>
|
||||
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
||||
@@ -81,8 +89,12 @@
|
||||
</#if>
|
||||
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||
<#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) />
|
||||
<#if (duration <= 0)>
|
||||
<#if (duration < 0)>
|
||||
<#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend are not valid" >
|
||||
<#else>
|
||||
<#if (duration == 0)>
|
||||
<#assign duration = 1 />
|
||||
</#if>
|
||||
</#if>
|
||||
<#else>
|
||||
<#stop "Appointment type not supported" >
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[
|
||||
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) />
|
||||
<#assign ref_datetime2 = AddSecondsToDatetime(ref_datetime?datetime.iso, 60)?iso_utc />
|
||||
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) />
|
||||
<#assign ref_datetime2 = AddSecondsToDatetime(ref_datetime?datetime.iso, 1)?iso_utc />
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
|
||||
@@ -17,22 +17,14 @@
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
|
||||
}
|
||||
]
|
||||
<#stop>
|
||||
<#break>
|
||||
|
||||
<#case "D">
|
||||
<#-- *********************************************** Action = DELETE *************************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
|
||||
}
|
||||
]
|
||||
<#stop>
|
||||
<#break>
|
||||
|
||||
<#default>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign packBranch = JsonUtil.jsonToMap(dataRfx)>
|
||||
|
||||
<#stop "no generic FTL file available yet for Pack Branch">
|
||||
<#stop>
|
||||
<#break>
|
||||
|
||||
<#case "D">
|
||||
@@ -24,7 +24,7 @@
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign packBranch = JsonUtil.jsonToMap(dataRfx)>
|
||||
|
||||
<#stop "no generic FTL file available yet for Pack Branch">
|
||||
<#stop>
|
||||
<#break>
|
||||
<#default>
|
||||
<#stop >
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign packOrder = JsonUtil.jsonToMap(dataRfx)>
|
||||
|
||||
<#stop "no generic FTL file available yet for Pack Order">
|
||||
<#stop>
|
||||
<#break>
|
||||
|
||||
<#case "D">
|
||||
@@ -24,7 +24,7 @@
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign packOrder = JsonUtil.jsonToMap(dataRfx)>
|
||||
|
||||
<#stop "no generic FTL file available yet for Pack Order">
|
||||
<#stop>
|
||||
<#break>
|
||||
<#default>
|
||||
<#stop >
|
||||
|
||||
@@ -23,16 +23,16 @@
|
||||
},
|
||||
"TechMessage": {
|
||||
"Code": "${restResponsetMsg.status!"no Code"}",
|
||||
"Label": ${strJsonBody}
|
||||
"Label": ${strJsonBody?truncate(32000,'...')}
|
||||
},
|
||||
"UserMessage": {
|
||||
"Code": "${restResponsetMsg.status!"no Code"}",
|
||||
"Label": ${strJsonBody},
|
||||
"Label": ${strJsonBody?truncate(32000,'...'),
|
||||
"Params": []
|
||||
},
|
||||
"DetailElements": [],
|
||||
"CorrelationID": "${id.correlationid!"no Correlationid"}",
|
||||
"ContextPayload": ${strJsonBody},
|
||||
"ContextPayload": ${strJsonBody?truncate(32000,'...')},
|
||||
"Type": "${event}",
|
||||
"Task": "${id.apiRestReflexID!"no Task"}",
|
||||
"OriginalID": "${id.refid!"no OriginalID"?trim?json_string}",
|
||||
|
||||
Reference in New Issue
Block a user