Compare commits

..

12 Commits

Author SHA1 Message Date
ac18299345 Release 2.0.22+2 2026-04-24 11:13:27 +02:00
148d0daffd Merge branch 'release-2.0-SCPN1-10519' into 'release/2.0'
release-2.0-SCPN1-10519 into release/2.0

See merge request r-d-technique/tiers/reflex-wms-connector!270
2026-04-24 09:05:19 +00:00
4e5070a902 Merge branch 'develop' into release-2.0-SCPN1-10519 2026-04-24 09:50:35 +02:00
2b25c4853d back SCPN1 10519 2026-04-24 09:41:03 +02:00
844ecb1558 back SCPN1-10519 2026-04-23 18:33:12 +02:00
837b8f86ed Release 2.0.22+1 2026-04-22 09:42:32 +02:00
4e7d98144d Merge branch 'release2.0-SCPN1-10621' into 'release/2.0'
SCPN1-10621 into "Release2.0 "

See merge request r-d-technique/tiers/reflex-wms-connector!265
2026-04-22 07:20:56 +00:00
3a061c2374 SCPN1-10586 2026-04-22 08:28:24 +02:00
ce7104ee9f Merge branch 'develop' into release2.0-SCPN1-10621 2026-04-21 10:30:44 +02:00
846641ac35 SCPN1-10586 2026-04-21 08:34:49 +02:00
50771c3268 SCPN1-10586 2026-04-20 16:41:00 +02:00
7deb33a7e0 SCPN1-10586 2026-04-20 13:45:27 +02:00
10 changed files with 171 additions and 77 deletions

View File

@@ -36,34 +36,6 @@
<#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>
@@ -76,10 +48,10 @@
<#if carrier_apt.status?? && (carrier_apt.status.status_code=="999" || carrier_apt.status.status_code=="040" || carrier_apt.status.status_code=="030")>
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.BookingCancelAppointment>
<#assign apiReflexPlatformID = ApiReflexPlatformID.BookingForceCancelAppointment>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrCarrierApt_BookingCancelAppointment.ftl">
<#include "RFXtoRP_HsrCarrierApt_BookingForceCancelAppointment.ftl">
}
]
<#else>
@@ -165,17 +137,16 @@
</#if>
</#if>
]
</#if>
<#break>
<#case "D">
<#-- *********************************************** Action = Delete ******************** -->
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.BookingCancelAppointment>
<#assign apiReflexPlatformID = ApiReflexPlatformID.BookingForceCancelAppointment>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrCarrierApt_BookingCancelAppointment.ftl">
<#include "RFXtoRP_HsrCarrierApt_BookingForceCancelAppointment.ftl">
}
]
<#break>

View File

@@ -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" >

View File

@@ -24,6 +24,12 @@
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCustomFieldsUpdated>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPro_ExecutionflowCustomFieldsUpdated.ftl">
}
<#else>
<#-- No line -->

View File

@@ -0,0 +1,44 @@
<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
<#include "ActorPrefix.ftl">
[
{
"Header": {
"ProjectID": "${projectRP}"
},
"Payload" :{},
"ID":{
"CustomFields": [
{
"Key": "depot_code",
"Value": "${preparation_order.physical_depot_code?trim?json_string}"
},
{
"Key": "activity_code",
"Value": "${preparation_order.activity_code?trim?json_string}"
},
{
"Key": "originator_code",
"Value": "${preparation_order.originator_code?trim?json_string}"
},
{
"Key": "reference",
"Value": "${preparation_order.originator_reference?trim?json_string}"
},
{
"Key": "order_year",
"Value": "${preparation_order.preparation_order_year}"
},
{
"Key": "order_number",
"Value": "${preparation_order.preparation_order_number}"
}
],
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
"RefID": "${preparation_order.physical_depot_code?trim?json_string}${preparation_order.activity_code?trim?json_string}${preparation_order.originator_code?trim?json_string}${preparation_order.originator_reference?trim?json_string}"
<#else>
"RefID": "O${preparation_order.physical_depot_code?trim?json_string}${preparation_order.activity_code?trim?json_string}${preparation_order.originator_code?trim?json_string}${preparation_order.preparation_order_year}${preparation_order.preparation_order_number}"
</#if>
}
}
]

View File

@@ -29,6 +29,12 @@
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_TransfertReceiptExpected.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCustomFieldsUpdated>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_TransfertCustomFieldsUpdated.ftl">
}
]
<#else>
@@ -46,6 +52,12 @@
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCustomFieldsUpdated>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_CustomFieldsUpdated.ftl">
}
]
<#else>

View File

@@ -0,0 +1,40 @@
<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
<#include "ActorPrefix.ftl">
[
{
"Header": {
"ProjectID": "${projectRP}"
},
"Payload" :{},
"ID":{
"CustomFields": [
{
"Key": "depot_code",
"Value": "${receipt.physical_depot_code?trim?json_string}"
},
{
"Key": "activity_code",
"Value": "${receipt.activity_code?trim?json_string}"
},
{
"Key": "originator_code",
"Value": "${receipt.originator_code?trim?json_string}"
},
{
"Key": "reference",
"Value": "${receipt.receipt_reference?trim?json_string}"
},
{
"Key": "order_year",
"Value": "${receipt.receipt_year}"
},
{
"Key": "order_number",
"Value": "${receipt.receipt_number}"
}
],
"RefID": "R${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}"
}
}
]

View File

@@ -0,0 +1,48 @@
<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
<#include "ActorPrefix.ftl">
[
{
"Header": {
"ProjectID": "${projectRP}"
},
"Payload" :{},
"ID":{
"CustomFields": [
{
"Key": "depot_code",
<#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="">
"Value": "${receipt.origin_order_line_depot?trim?json_string}"
<#else>
"Value": "${receipt.physical_depot_code?trim?json_string}"
</#if>
},
{
"Key": "activity_code",
"Value": "${receipt.activity_code?trim?json_string}"
},
{
"Key": "originator_code",
"Value": "${receipt.originator_code?trim?json_string}"
},
{
"Key": "reference",
"Value": "${receipt.receipt_reference?trim?json_string}"
},
{
"Key": "order_year",
"Value": "${receipt.receipt_year}"
},
{
"Key": "order_number",
"Value": "${receipt.receipt_number}"
}
],
<#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="">
"RefID": "${receipt.origin_order_line_depot?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}"
<#else>
"RefID": "R${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}"
</#if>
}
}
]

View File

@@ -8,20 +8,13 @@
<#assign projectRP = project>
<#assign organisationRP = organisation>
<<<<<<< HEAD
=======
>>>>>>> develop
<#assign aDateTime = .now>
<#assign no_apiRestReflexID = "no apiRestReflexID">
<#assign no_status = -99999>
<#assign event = "UNKNOW_EVENT" >
<<<<<<< HEAD
=======
<#-- DeleteEF_False a définir dans ce fichier -->
<#-- DeleteEF_False to be defined in this file.-->
<#include "InternalSettings.ftl">
>>>>>>> develop
<#switch id.apiRestReflexID!no_apiRestReflexID>
<#case no_apiRestReflexID>
@@ -68,22 +61,8 @@
<#case 201>
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)>
<<<<<<< HEAD
<#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" >
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipFromAcked>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_PrepOrder_ShipFromAcked.ftl">
}
]
<#else>
<#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "WARN">
=======
<#if preparationOrderPostResponse.status?? && (preparationOrderPostResponse.status == "SUCCESS" || preparationOrderPostResponse.status == "WARN") >
<#if DeleteEF_False>
>>>>>>> develop
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipFromAcked>
@@ -95,23 +74,6 @@
<#else>
[
{
<<<<<<< HEAD
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#assign event = "RP_EXECUTIONFLOW_EVENT">
<#include "RFXtoRP_PlatformLogCreate.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_RestResponseAllocationError.ftl">
}
]
</#if>
=======
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDeleted>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
@@ -136,7 +98,6 @@
<#include "RFXtoRP_RestResponseAllocationError.ftl">
}
]
>>>>>>> develop
</#if>
<#break>
<#default>

View File

@@ -1 +1 @@
2.0.21+1
2.0.22+2