Compare commits

...

380 Commits

Author SHA1 Message Date
1905105118 Release 1.2.38+1 2025-04-11 10:38:27 +02:00
9cadf3329e Release 1.2.37+2 2025-04-09 11:46:44 +02:00
4502df6fb0 Merge branch 'SCPN1-8597' into 'release/1.2'
SCPN1-8597

See merge request r-d-technique/tiers/reflex-wms-connector!96
2025-04-09 09:46:01 +00:00
3ca4b61e3b SCPN1-8597 2025-04-09 11:44:48 +02:00
4a26fd9249 Release 1.2.37+1 2025-04-09 10:24:39 +02:00
4624bab7ad Release 1.2.36+1 2025-04-08 15:41:19 +02:00
c754edaafb Release 1.2.35+1 2025-04-07 12:31:37 +02:00
adff1396c1 Merge branch 'connector-1.2-to-visibility1.10' into 'release/1.2'
connector-1.2-to-visibility1.10

See merge request r-d-technique/tiers/reflex-wms-connector!95
2025-04-07 09:32:40 +00:00
0b70c90257 Merge branch 'develop-1.2' into connector-1.2-to-visibility1.10
# Conflicts:
#	RFXtoRP_HsaDispute.ftl
#	RFXtoRP_HsaDispute_Created.ftl
#	RFXtoRP_HsaIpgMove_StockMoved.ftl
#	RFXtoRP_HsrDepot_ActorCreated.ftl
#	RFXtoRP_HsrPrepa.ftl
#	RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl
2025-03-31 17:21:37 +02:00
2828c01cc4 modifs HU received 2025-03-26 15:08:56 +01:00
4553507e3b modifs HU 2025-03-26 14:59:09 +01:00
830db1493b modifs receipt 2025-03-24 15:58:33 +01:00
79ad7f53e8 dispute 2025-03-21 14:30:15 +01:00
c280b2c83a hsrdepot 2025-03-21 14:27:52 +01:00
3a0bbdc479 claim reference empty 2025-03-21 11:21:59 +01:00
1e9ce7cdc4 claim 2025-03-20 18:02:43 +01:00
eefc7070ac SCPN1-8474
(cherry picked from commit 53c400be49)
2025-03-20 17:38:36 +01:00
f9c62d5ee4 SCPN1-8474
(cherry picked from commit 02e8dc2566)
2025-03-20 17:11:58 +01:00
bcf77601b9 SCPN1-8496 2025-03-20 13:52:24 +01:00
1670a22218 SCPN1-8483
(cherry picked from commit 8ee7527ba4)
2025-03-19 11:48:17 +01:00
cdc78d71b1 Release 1.2.34+1 2025-03-19 11:16:37 +01:00
6b840c0ce7 Merge branch 'SCPN1-8483' into 'release/1.2'
SCPN1-8483

See merge request r-d-technique/tiers/reflex-wms-connector!93
2025-03-19 10:14:45 +00:00
8ee7527ba4 SCPN1-8483 2025-03-19 10:52:07 +01:00
1be67f65b2 modif 2025-03-19 10:41:13 +01:00
dec9a4b17f displayID 2025-03-19 10:38:29 +01:00
eb6182c337 Release 1.2.33+3 2025-03-13 10:38:21 +01:00
9f63f0ee62 Modifs Claim 2025-03-13 10:35:14 +01:00
5b3de10184 modif claim 2025-03-13 10:27:05 +01:00
8cfd636c72 Merge branch 'SCPN1-8401' into 'release/1.2'
SCPN1-8401

See merge request r-d-technique/tiers/reflex-wms-connector!91
2025-03-13 09:19:19 +00:00
18808b6033 modifs Claim_order 2025-03-13 10:01:06 +01:00
a849b1c92e update URL in readme.md
(cherry picked from commit 5963948635)
2025-03-12 15:05:32 +01:00
810e0eaa89 SCPN1-8401
(cherry picked from commit 0cec20a8aa91ce5d958a9d6087d4778f86f2c5fd)
2025-03-07 14:17:58 +01:00
1dc77965ce SCPN1-8401 2025-03-07 14:14:28 +01:00
9aee7a9448 SCPN1-8401 (syntaxe error in RXftoRP-HsrReceiptList_ExecutionflowDetected.ftl et RXftoRP-HsrReceiptList_ExecutionflowReceiptComplet.ftl)
(cherry picked from commit 2681a4dc24)
2025-03-06 16:14:47 +01:00
d4765890e5 SCPN1-8401 (syntaxe error in RXftoRP-HsrPro_ExecutionflowDetected.ftl)
(cherry picked from commit 9380d39bb6)
2025-03-04 14:29:03 +01:00
9997441edb Merge branch 'develop' of https://gitlab.hardis-group.com/r-d-technique/tiers/reflex-wms-connector into develop 2025-02-28 09:45:55 +01:00
d2a00ffe2e claim 2025-02-28 09:45:48 +01:00
45a31fb33f SCPN1-8401
(cherry picked from commit 724d4dd0c756a8c2f5b461874b36cd513feafbbd)
2025-02-27 17:56:42 +01:00
58bcf838bd Release 1.2.33+2 2025-02-25 17:42:12 +01:00
24f17f434e Merge branch 'SCPN1-8183' into 'release/1.2'
move 520

See merge request r-d-technique/tiers/reflex-wms-connector!88
2025-02-25 16:15:19 +00:00
c16c48b270 move 520
(cherry picked from commit df2332b17e)
2025-02-25 15:58:32 +01:00
57d4cb6be2 modifs hsrprepa 2025-02-19 17:45:45 +01:00
29e16f12cc Release 1.2.33+1 2025-02-18 10:08:14 +01:00
c74470b780 Merge branch 'SCPN1-8183' into 'release/1.2'
SCPN1-8383

See merge request r-d-technique/tiers/reflex-wms-connector!87
2025-02-18 08:59:45 +00:00
fab2238278 SCPN1-8383 2025-02-18 09:35:16 +01:00
432cca8ec9 Release 1.2.32+1 2025-02-12 10:24:01 +01:00
172d6ead58 trackingNumberSource 2025-02-11 17:54:26 +01:00
57533e8735 SCPN1-8280 2025-02-11 17:53:39 +01:00
4d59a53517 modifs 2025-02-10 11:56:10 +01:00
71a73bded4 modif 2025-02-10 11:06:00 +01:00
0e0397708f modif 2025-02-07 16:15:15 +01:00
6319051741 modif 2025-02-07 16:05:57 +01:00
d955ccdbc4 include 2025-02-07 15:56:20 +01:00
817209a095 Merge branch 'develop' of https://gitlab.hardis-group.com/r-d-technique/tiers/reflex-wms-connector into develop 2025-02-07 10:50:57 +01:00
af0d846271 HU 2025-02-07 10:50:35 +01:00
fda736c295 SCPN1-8291 2025-02-07 10:11:04 +01:00
2318bee797 SCPN1-8291 2025-02-06 09:50:00 +01:00
df2332b17e move 520 2025-01-21 15:41:31 +01:00
1de373be9c Merge branch 'query_in_ftl' into 'develop'
SCPN1-8043

See merge request r-d-technique/tiers/reflex-wms-connector!84
2025-01-16 17:00:28 +00:00
e806da1129 SCPN1-8043 2025-01-16 17:59:55 +01:00
b40475626e Merge branch 'query_in_ftl' into 'develop'
SCPN1-8043

See merge request r-d-technique/tiers/reflex-wms-connector!83
2025-01-13 15:28:57 +00:00
559fff82e5 SCPN1-8043 2025-01-13 16:23:17 +01:00
37f73115ff Merge branch 'query_in_ftl' into 'develop'
SCPN1-8043

See merge request r-d-technique/tiers/reflex-wms-connector!82
2025-01-07 16:42:00 +00:00
a7bf18f25d SCPN1-8043 2025-01-07 17:40:55 +01:00
498ef5a5bf SCPN1-8043 2025-01-07 11:16:32 +01:00
b6415fa316 commit first 2025-01-06 17:56:10 +01:00
08e4b04f7f Release 1.2.31+1 2024-12-13 15:34:11 +01:00
bf0ae15a50 Release 1.2.30+1 2024-12-04 09:05:53 +01:00
3f7cd7a245 Merge branch 'pour-1.9' into 'release/1.2'
pour 1.9

See merge request r-d-technique/tiers/reflex-wms-connector!81
2024-12-04 07:09:16 +00:00
173deec755 pour 1.9 2024-12-04 08:08:26 +01:00
d3c7d5a96c modifs 2024-12-02 16:26:44 +01:00
329747d225 modifs ID Claim 2024-12-02 16:21:14 +01:00
f5e6c2b22e modif trim 2024-12-02 16:03:45 +01:00
85bfe55af7 Release 1.2.29+4 2024-11-19 11:47:55 +01:00
730750b898 Merge branch 'SCPN1-7609' into 'release/1.2'
Correction priority date SCPN1-7609

See merge request r-d-technique/tiers/reflex-wms-connector!78
2024-11-19 10:46:07 +00:00
d85abf8235 Correction priority date
(cherry picked from commit e41309e744)
2024-11-19 11:38:58 +01:00
e41309e744 Correction priority date 2024-11-19 11:17:59 +01:00
46a9a82e12 Release 1.2.29+3 2024-11-18 11:44:58 +01:00
ae0b82b6e4 Merge branch 'SCPN1-7578' into 'release/1.2'
SCPN1-7578

See merge request r-d-technique/tiers/reflex-wms-connector!76
2024-11-18 10:41:23 +00:00
5fc26e6015 SCPN1-7578 2024-11-18 11:36:01 +01:00
20d77f21ed CountryCode 2024-11-18 11:20:56 +01:00
3c11695650 CountryCode 2024-11-18 10:25:57 +01:00
5c6e200d3e suppression logs d'erreurs 2024-11-13 10:50:10 +01:00
d896aa95f4 SCPN1-7518 2024-11-12 17:59:03 +01:00
236c2d754c Release 1.2.29+2 2024-11-12 14:28:03 +01:00
5499e3059f Merge branch 'SCPN1-7528' into 'release/1.2'
json_string SCPN1-7528

See merge request r-d-technique/tiers/reflex-wms-connector!74
2024-11-12 13:21:27 +00:00
cae9bf80bb json_string
(cherry picked from commit 4d24367b58)
2024-11-12 14:13:28 +01:00
ea58acc353 Merge branch 'develop' of https://gitlab.hardis-group.com/r-d-technique/tiers/reflex-wms-connector into develop 2024-11-12 10:16:13 +01:00
4d24367b58 json_string 2024-11-12 10:16:06 +01:00
5901619f6a SCPN1-7518 2024-11-08 16:39:08 +01:00
ed0141584b Release 1.2.29+1 2024-11-06 14:48:50 +01:00
19c87e38df Merge branch 'develop' of https://gitlab.hardis-group.com/r-d-technique/tiers/reflex-wms-connector into develop 2024-11-05 16:36:54 +01:00
821b58b3bf Claim 2024-11-05 16:36:47 +01:00
31f38e9626 SCPN1-7496 2024-11-05 11:37:39 +01:00
e6a27c2ba2 Release 1.2.28+5 2024-11-05 11:31:06 +01:00
0a26159dc9 Merge branch 'SCPN1-7496' into 'release/1.2'
SCPN1-7496

See merge request r-d-technique/tiers/reflex-wms-connector!71
2024-11-05 10:29:16 +00:00
a4f3bf8151 SCPN1-7496 2024-11-05 11:28:00 +01:00
867fdc5743 SCPN1-7496 2024-11-05 11:10:04 +01:00
5d799566fe unicité 2024-11-04 17:13:19 +01:00
867a894e2e unicité 2024-11-04 10:49:32 +01:00
a11124d144 unicité 2024-11-04 10:42:40 +01:00
b69bfa50ba Release 1.2.28+4 2024-10-29 15:20:15 +01:00
834abe1b78 SCPN1-7418 2024-10-29 15:17:50 +01:00
dbfcccfdd9 modifs 2024-10-29 13:49:45 +01:00
0c4e85067b correction 2024-10-29 11:24:45 +01:00
b1e5d51ba0 modifs uniqueness 2024-10-29 11:18:35 +01:00
e190a16ddc Release 1.2.28+3 2024-10-24 10:22:41 +02:00
e63b14d0ff SCPN1-7421 2024-10-24 10:05:02 +02:00
1e42f6d81c modifs HsrReceipt 2024-10-18 15:52:08 +02:00
04bc005cda Release 1.2.28+2 2024-10-17 11:07:16 +02:00
6e46d30221 Merge branch 'SCPN1-6728' into 'release/1.2'
SCPN1-6728

See merge request r-d-technique/tiers/reflex-wms-connector!67
2024-10-17 09:04:24 +00:00
1f2d3ab212 SCPN1-6728 2024-10-17 10:36:14 +02:00
8aab4296a2 update "uniqueness" variable 2024-10-16 17:37:17 +02:00
8160342c63 update "uniqueness" variable 2024-10-16 16:23:43 +02:00
72abd3b22a update "uniqueness" variable 2024-10-16 16:04:00 +02:00
bcddf351a0 modifs 2024-10-16 11:51:25 +02:00
9c229997b3 espace 2024-10-16 09:40:53 +02:00
cdbb00ea4c modifs 2024-10-16 09:13:07 +02:00
ffbeb4cadc modifs 2024-10-15 17:03:15 +02:00
f736d62ee4 modifs 2024-10-15 17:00:34 +02:00
6f636b4ee7 modifs 2024-10-15 16:56:15 +02:00
0406a2ff3a Merge branch 'develop' of https://gitlab.hardis-group.com/r-d-technique/tiers/reflex-wms-connector into develop 2024-10-15 16:54:31 +02:00
833ed4ebd6 modifs 2024-10-15 16:54:24 +02:00
90bfd41f41 Ajout du flux LoadInfo 2024-10-15 16:19:31 +02:00
771915ad19 Release 1.2.28+1 2024-10-14 11:51:48 +02:00
4a1fe56381 Merge branch 'SCPN1-7341' into 'release/1.2'
SCPN1-7341

See merge request r-d-technique/tiers/reflex-wms-connector!65
2024-10-14 07:57:53 +00:00
a9a357d4ed SCPN1-7341 2024-10-14 09:56:41 +02:00
557828b459 modifs nom 2024-10-11 11:01:13 +02:00
1cc34e6657 modifs depot 2024-10-10 14:08:43 +02:00
42571ef2a1 modifs 2024-10-09 17:13:05 +02:00
63db993164 modifs dispute 2024-10-09 17:07:16 +02:00
86335ba52d modifs 2024-10-09 16:06:17 +02:00
37773416ff modifs 2024-10-09 15:17:53 +02:00
e9e09a5eb1 modifs 2024-10-09 15:03:29 +02:00
234918a77e modifs 2024-10-09 14:56:26 +02:00
8d4067a58e modifs 2024-10-09 11:32:48 +02:00
aa62c276d1 modifs 2024-10-08 14:19:15 +02:00
de5a9b431e modifs 2024-10-08 11:44:47 +02:00
deba22e9d4 modifs 2024-10-08 11:12:47 +02:00
81720b2547 modifs 2024-10-08 10:20:15 +02:00
ed8aff1e3c SCPN1-7052 2024-10-08 10:00:14 +02:00
153df99ed1 modifs 2024-10-08 09:25:04 +02:00
65601133f1 unicité 2024-10-07 14:52:28 +02:00
0e3e60b45a Release 1.2.27+2 2024-10-03 15:39:13 +02:00
f0e27a6f88 Merge branch 'SCPN1-7302' into 'release/1.2'
SCPN1-7302

See merge request r-d-technique/tiers/reflex-wms-connector!63
2024-10-03 13:31:09 +00:00
f72bcc2537 SCPN1-7302 2024-10-03 15:30:18 +02:00
9700548214 Merge branch 'SCPN1-7302' into 'release/1.2'
modifs

See merge request r-d-technique/tiers/reflex-wms-connector!62
2024-10-03 13:15:28 +00:00
96aec6555c SCPN1-7302 2024-10-03 15:08:49 +02:00
54511c55f1 modifs
(cherry picked from commit e2c0735dc7)
2024-10-03 15:06:18 +02:00
de828ed606 modifs
(cherry picked from commit 25011e68e6)
2024-10-03 15:05:45 +02:00
25011e68e6 modifs 2024-10-03 14:46:45 +02:00
3a9f26cef2 modifs 2024-10-01 11:25:06 +02:00
7c1b05d76e modifs 2024-10-01 11:07:39 +02:00
134e44185a modifs 2024-10-01 10:12:12 +02:00
49b2f6e17a modifs 2024-10-01 10:07:43 +02:00
6400c985a2 message 2024-09-30 16:59:22 +02:00
e97066c118 modifs labelled 2024-09-30 15:28:24 +02:00
9f02fce236 Merge branch 'develop' of https://gitlab.hardis-group.com/r-d-technique/tiers/reflex-wms-connector into develop 2024-09-30 15:19:33 +02:00
10bb90bf92 modifs 2024-09-30 15:19:24 +02:00
e53e4ec9a0 SCPN1-7265 2024-09-30 12:05:38 +02:00
9524923f0c SCPN1-7265 2024-09-27 10:08:36 +02:00
138bcdadf8 Merge branch 'develop' of https://gitlab.hardis-group.com/r-d-technique/tiers/reflex-wms-connector into develop 2024-09-26 16:09:30 +02:00
e2c0735dc7 modifs 2024-09-26 15:58:37 +02:00
aba22026bb date tracking 2024-09-26 15:58:04 +02:00
eaa7ef1b9b Release 1.2.27+1 2024-09-25 16:12:56 +02:00
360c0743bc SCPN1-7088 2024-09-20 17:22:27 +02:00
307ae9ebe2 modifs 2024-09-17 17:29:04 +02:00
80a34b354d modifs 2024-09-17 16:28:49 +02:00
09ec0e4509 modifs 2024-09-17 11:46:24 +02:00
c05a4653ba modifs 2024-09-17 10:25:53 +02:00
956105fc38 modifs uniqueness 2024-09-16 16:12:43 +02:00
d91d15c1c9 modifs 2024-09-16 15:25:39 +02:00
550c0047da modifs 2024-09-16 15:25:10 +02:00
a8b044fdba modifs 2024-09-16 14:54:43 +02:00
89fae85a2f modifs 2024-09-16 14:48:12 +02:00
bfc96d37ab modifs 2024-09-16 14:35:15 +02:00
c742c3639f modifs 2024-09-16 14:30:11 +02:00
d60a75cbbc modifs 2024-09-16 14:25:29 +02:00
cde81b3e8b modifs 2024-09-16 14:20:20 +02:00
75a9a1727c modifs 2024-09-16 14:12:45 +02:00
6d45f474d4 modifs 2024-09-16 14:04:35 +02:00
7857dfd696 modifs 2024-09-16 13:54:09 +02:00
4c84e4195b Release 1.2.26+1 2024-09-13 10:38:27 +02:00
113c94f100 Merge branch 'SCPN1-7155' into 'release/1.2'
SCPN1-7155

See merge request r-d-technique/tiers/reflex-wms-connector!59
2024-09-13 08:09:08 +00:00
01d58746d8 modifs 2024-09-12 17:07:33 +02:00
7963b351aa SCPN1-7155 2024-09-12 14:11:04 +02:00
ab7c45bcd7 SCPN1-7155 2024-09-12 11:55:45 +02:00
f4f0a50493 modifs 2024-09-11 15:12:17 +02:00
65fed72146 modifs 2024-09-11 15:09:41 +02:00
0a0121c020 modifs 2024-09-11 14:59:45 +02:00
50fb9b467f modifs 2024-09-06 16:21:09 +02:00
843bf837b2 motifs 2024-09-06 16:14:11 +02:00
8425747b42 Release 1.2.25+2 2024-08-29 10:59:28 +02:00
03e20e7aed Merge branch 'SCPN1-7065' into 'release/1.2'
SCPN1-7065

See merge request r-d-technique/tiers/reflex-wms-connector!57
2024-08-29 08:48:06 +00:00
04b7974c77 SCPN1-7065
(cherry picked from commit ca33a85694)
2024-08-29 10:37:54 +02:00
ca33a85694 SCPN1-7065 2024-08-29 10:34:55 +02:00
087346139d Release 1.2.25+1 2024-08-08 16:55:33 +02:00
c183ade001 hsadispute 2024-08-08 11:47:14 +02:00
d4b927b7f7 hsrdispute 2024-08-08 10:55:39 +02:00
0a4263d551 Release 1.2.24+1 2024-08-07 12:23:46 +02:00
b00302c8e3 Release 1.2.23+2 2024-08-07 08:44:43 +02:00
55b7b54b44 Merge branch 'SCPN1-6998' into 'release/1.2'
SCPN1-6998

See merge request r-d-technique/tiers/reflex-wms-connector!54
2024-08-07 06:43:11 +00:00
26003c24f2 SCPN1-6998 2024-08-07 08:38:34 +02:00
08cf8ec1a6 add hsaDispute flow 2024-08-06 17:40:16 +02:00
66d002052c Merge branch 'develop' of https://gitlab.hardis-group.com/r-d-technique/tiers/reflex-wms-connector into develop 2024-08-06 17:13:10 +02:00
949d4c6a8d CC vide 2024-08-06 17:13:04 +02:00
0468700574 Release 1.2.23+1 2024-08-06 16:08:37 +02:00
fe35481144 Merge branch 'SCPN1-6998' into 'release/1.2'
SCPN1-6998

See merge request r-d-technique/tiers/reflex-wms-connector!52
2024-08-06 13:48:36 +00:00
d21204a949 SCPN1-6998 2024-08-06 15:41:22 +02:00
2b828c2f4b code country ISO 2024-08-06 14:18:02 +02:00
a9fec0b5f9 country 2024-08-06 11:29:02 +02:00
b7f383d531 country code 2 2024-08-06 11:26:18 +02:00
d21a863060 country code 2024-08-06 11:21:18 +02:00
9ee9743b81 Code ico controle 2024-08-06 10:54:28 +02:00
b5ef671512 MD Actor 2024-07-31 17:15:44 +02:00
46421972a8 Release 1.2.22+1 2024-07-29 17:33:09 +02:00
ccca6d1592 Release 1.2.21+1 2024-07-29 17:32:32 +02:00
3eb072f36d Mouvements 2024-07-26 14:06:19 +02:00
68622896f0 Release 1.2.20+1 2024-07-24 10:47:24 +02:00
fea5691ddd Release 1.2.19+1 2024-07-22 10:18:15 +02:00
2fb5dcd103 Merge branch 'SCPN1-6912' into 'release/1.2'
Merge branch 'SCPN1-6564' into 'release/1.2'

See merge request r-d-technique/tiers/reflex-wms-connector!48
2024-07-22 07:54:20 +00:00
04253d939f Merge branch 'develop' into SCPN1-6912 2024-07-19 11:24:12 +02:00
f98e963b76 modifs HsrPRo 2024-07-19 11:22:18 +02:00
5c0b112c39 Modifs 170724 2024-07-17 11:07:36 +02:00
c3d1ceb0c5 ODP 2024-07-12 11:17:30 +02:00
b80623e631 Release 1.2.18+1 2024-07-12 10:51:31 +02:00
45e8c4fee2 ajout MD HuAdded 2024-07-05 10:40:55 +02:00
23a87c1995 Release 1.2.17+2 2024-06-28 15:12:20 +02:00
a3a2fa3b23 Merge branch '1.2.17+2' into 'release/1.2'
adjust json_string

See merge request r-d-technique/tiers/reflex-wms-connector!45
2024-06-27 08:27:17 +00:00
22b26ac7d3 adjust json_string
(cherry picked from commit af29a11b22)
2024-06-25 17:30:03 +02:00
af29a11b22 adjust json_string 2024-06-25 17:29:36 +02:00
74b976b367 adjust json_string 2024-06-24 16:20:09 +02:00
0b3f07add9 adjust json-string 2024-06-24 11:47:44 +02:00
28659b1157 Release 1.2.17+1 2024-06-24 10:54:19 +02:00
3de6a2f6a9 add json_string 2024-06-24 08:38:44 +02:00
4afc7fa50c securisation 2024-06-21 13:49:56 +02:00
6910fb80a8 SCPN1-6605 MovementCreated
(cherry picked from commit e8510d079c)
2024-06-21 13:32:56 +02:00
1052849c12 correction dans le cas où la commande n'a pas de ligne... 2024-06-21 13:30:15 +02:00
044fda9d16 correction dans le cas où la commande n'a pas de ligne... 2024-06-21 13:28:44 +02:00
e8510d079c SCPN1-6605 MovementCreated 2024-06-07 11:15:47 +02:00
24a94caf29 Release 1.2.16+5 2024-06-06 09:45:59 +02:00
aa19de32a5 Merge branch 'SCPN1-6692' into 'develop'
SCPN1-6692

Closes SCPN1-6692

See merge request r-d-technique/tiers/reflex-wms-connector!43
2024-06-06 07:44:29 +00:00
513a5c2c3e SCPN1-6692
(cherry picked from commit 2524859cd4)
2024-06-06 09:16:38 +02:00
2524859cd4 SCPN1-6692 2024-06-06 09:15:09 +02:00
011540fc51 Release 1.2.16+4 2024-05-30 17:20:55 +02:00
06147dd8d4 SCPN1-6642 SCPN1-6641 2024-05-30 17:18:16 +02:00
5e9804db40 Merge branch 'SCPN1-6641' into 'release/1.2'
SCPN1-6641 et SCPN1-6642

See merge request r-d-technique/tiers/reflex-wms-connector!42
2024-05-30 15:05:08 +00:00
e344cca043 SCPN1-6642 2024-05-30 16:30:59 +02:00
b0b4714df9 SCPN1-6641 2024-05-30 14:30:09 +02:00
9cbacc0ebc priority date 2024-05-17 11:00:25 +02:00
c31d6de4a2 Merge branch 'SCPN1-6564' into 'release/1.2'
SCPN1-6564

See merge request r-d-technique/tiers/reflex-wms-connector!38

(cherry picked from commit c0dd029d1f)
2024-05-17 10:57:10 +02:00
15bd095feb Release 1.2.16+3 2024-05-16 17:55:49 +02:00
c0dd029d1f Merge branch 'SCPN1-6564' into 'release/1.2'
SCPN1-6564

See merge request r-d-technique/tiers/reflex-wms-connector!38
2024-05-16 15:30:52 +00:00
2e0d61310b SCPN1-6564 2024-05-16 17:00:32 +02:00
f62ccadba5 Release 1.2.16+2 2024-05-13 17:07:22 +02:00
2c29166ccb Merge branch 'SCPN1-6535' into 'release/1.2'
modifs HUGP

See merge request r-d-technique/tiers/reflex-wms-connector!36
2024-05-13 15:05:20 +00:00
4534155f2e modifs HUGP
(cherry picked from commit b3da874dd3)
2024-05-13 16:42:15 +02:00
b3da874dd3 modifs HUGP 2024-05-13 16:00:46 +02:00
5948467818 Release 1.2.16+1 2024-05-02 10:21:58 +02:00
c63e4ff5c8 Release 1.2.15+8 2024-04-24 18:23:25 +02:00
457cfc85c2 Merge branch 'SCPN1-6461' into 'release/1.2'
SCPN1-6461

See merge request r-d-technique/tiers/reflex-wms-connector!33
2024-04-24 16:19:29 +00:00
6809b32410 Création de commande
(cherry picked from commit 82dfc05cdb)
2024-04-24 17:49:09 +02:00
82dfc05cdb Création de commande 2024-04-24 15:09:45 +02:00
eda5fe4e07 modifs hsrprepa 2024-04-15 10:16:14 +02:00
26654a9820 modifs 2024-04-12 09:37:03 +02:00
37a5e64e83 Release 1.2.15+7 2024-04-11 11:22:18 +02:00
2f31833bc3 Merge branch 'versio-1.2.15' into 'release/1.2'
Modifs RPtoRFX 1701240947 SCPN1-6379

See merge request r-d-technique/tiers/reflex-wms-connector!31
2024-04-11 09:21:32 +00:00
cff0f18d8a modifs ipgmove
(cherry picked from commit 6b6cef5332)
2024-04-11 11:12:11 +02:00
6b6cef5332 modifs ipgmove 2024-04-11 11:01:05 +02:00
22b78b4ffe Release 1.2.15+6 2024-04-10 16:57:58 +02:00
25bf3110e9 Merge branch 'versio-1.2.15' into 'release/1.2'
modifs hsrpro SCPN1-6374

See merge request r-d-technique/tiers/reflex-wms-connector!29
2024-04-10 14:56:34 +00:00
0a32ead29a modifs hsrpro
(cherry picked from commit d7c9c72762)
2024-04-10 16:39:48 +02:00
d7c9c72762 modifs hsrpro 2024-04-10 16:25:27 +02:00
46a9dc8996 Release 1.2.15+5 2024-04-09 17:45:00 +02:00
1eb262c91c Merge branch 'versio-1.2.15' into 'release/1.2'
SCPN1-6368

See merge request r-d-technique/tiers/reflex-wms-connector!28
2024-04-09 15:40:44 +00:00
2588fda3a8 modifs ipg
(cherry picked from commit 87efb21e64)
2024-04-09 17:16:18 +02:00
87efb21e64 modifs ipg 2024-04-09 16:53:34 +02:00
d060d3eb10 Release 1.2.15+4 2024-03-27 15:03:49 +01:00
28e99e9a2b Merge branch 'version-1.2.15' into 'release/1.2'
SCPN1-6284

See merge request r-d-technique/tiers/reflex-wms-connector!26
2024-03-27 14:01:44 +00:00
78b0b467a3 Merge branch 'develop' into version-1.2.15 2024-03-26 14:07:53 +01:00
eca09f2e9e Merge branch 'develop' of https://gitlab.hardis-group.com/r-d-technique/tiers/reflex-wms-connector into SCPN1-6203 2024-03-26 11:46:09 +01:00
cfb8e2ab5a modifs HUadded 2024-03-26 11:21:10 +01:00
d1512d4269 modifs date packing 2024-03-26 11:08:38 +01:00
264f9131d0 modifs goods 2024-03-26 10:26:59 +01:00
fd9f248619 modifs goods 2024-03-26 10:19:20 +01:00
0fff71b759 modifs goods 2024-03-26 10:09:15 +01:00
196ab387ac modifs date 2024-03-26 10:00:03 +01:00
5cafa068a7 Modifs date emballage 2024-03-25 18:03:45 +01:00
6f287e878a Release 1.2.15+3 2024-03-21 17:39:10 +01:00
c3a23254b1 Merge branch 'version-1.2.15' into 'release/1.2'
Version 1.2.15

See merge request r-d-technique/tiers/reflex-wms-connector!25
2024-03-21 16:32:23 +00:00
c47672b8cc Merge branch 'develop' into version-1.2.15 2024-03-21 17:27:44 +01:00
12483253f1 modifs 2024-03-21 17:04:46 +01:00
f0f6e39407 modifs 2024-03-21 16:51:18 +01:00
fb0bab260a modifs 2024-03-21 16:48:52 +01:00
040ba2a392 modifs 2024-03-21 16:45:40 +01:00
753de14f97 modifs HuAddes 2024-03-21 16:22:59 +01:00
9cdcd2784d Release 1.2.15+2 2024-03-21 09:38:35 +01:00
cfe6bddf8d Merge branch 'version-1.2.15' into 'release/1.2'
Version 1.2.15

See merge request r-d-technique/tiers/reflex-wms-connector!24
2024-03-21 07:48:06 +00:00
0cb3cc7dd0 update priority_date 2024-03-21 08:45:48 +01:00
59a7783203 modifs priority date 2024-03-20 17:12:01 +01:00
03362d6a8b modifs HuAdded 2024-03-20 17:07:47 +01:00
f7125548db modifs moved 2024-03-20 10:55:37 +01:00
92e37e8baa modifs ipgmoved 2024-03-20 10:42:42 +01:00
6b633663e9 Release 1.2.15+1 2024-03-19 16:50:50 +01:00
c801c574ab Merge branch 'version-1.2.15' into 'release/1.2'
Version 1.2.15

See merge request r-d-technique/tiers/reflex-wms-connector!23
2024-03-19 15:04:39 +00:00
6282266c6d Merge branch 'develop' into version-1.2.15 2024-03-19 08:53:51 +01:00
be2229d184 Modifs 2024-03-18 17:19:26 +01:00
0067755ee4 Modifs 2024-03-18 15:36:55 +01:00
03953258d6 modifs 2024-03-18 10:06:06 +01:00
cb9d61bfe9 version-1.2.15 2024-03-15 16:55:08 +01:00
591b49cd88 modifs 2024-03-15 10:56:08 +01:00
cc5357369d modifs 2024-03-15 10:42:28 +01:00
c03129855e modifs 2024-03-15 09:45:24 +01:00
0211b91069 modifs 2024-03-15 09:38:15 +01:00
53afac0ccf modifs 2024-03-14 12:01:40 +01:00
349642fe25 modifs 2024-03-14 11:58:35 +01:00
4802c74fb8 modifs ref vide 2024-03-14 11:51:49 +01:00
c6370e2eb7 SCPN1-6203 2024-03-13 18:07:47 +01:00
e5f775605f Merge branch 'develop' of https://gitlab.hardis-group.com/r-d-technique/tiers/reflex-wms-connector into develop 2024-03-12 17:47:47 +01:00
8575ad0de2 Modifs 2024-03-12 17:47:35 +01:00
c7d7aaec16 Modifs pro cancelled 2024-03-12 17:09:22 +01:00
60c6f812d1 Release 1.2.14+1 2024-03-12 10:02:52 +01:00
c2f6537e0c Merge branch 'version-1.7' into 'release/1.2'
Version 1.7

See merge request r-d-technique/tiers/reflex-wms-connector!20
2024-03-12 08:56:33 +00:00
f5970127b0 update version 2024-03-12 09:55:32 +01:00
33c7ab08a7 reverted VERSION 2024-03-12 08:51:41 +00:00
fb8f9ca651 Release 1.2.14+1 2024-03-12 09:31:26 +01:00
86afce4b0d reverted VERSION 2024-03-12 08:29:59 +00:00
16c7d6b686 Merge branch 'develop' into version-1.7
# Conflicts:
#	RFXtoRP_HfDtlStockLs_StockSnapshotted.ftl
#	RFXtoRP_HfLvTypeList.ftl
#	RFXtoRP_HsaIpgMove.ftl
#	RFXtoRP_HsaIpgMove_GoodsReceived.ftl
#	RFXtoRP_HsaIpgMove_StockMoved.ftl
#	RFXtoRP_HsaItmLv_LogisticVariantUpdated.ftl
#	RFXtoRP_HsaItm_ItemCreated.ftl
#	RFXtoRP_HsaProStatus.ftl
#	RFXtoRP_HsrPrepa.ftl
#	RFXtoRP_HsrPrepa_CarrierUpdated.ftl
#	RFXtoRP_HsrPrepa_GoodsPrepared.ftl
#	RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl
#	RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl
#	RFXtoRP_HsrPro.ftl
#	RFXtoRP_HsrPro_ExecutionflowDetected.ftl
#	RFXtoRP_HsrReceiptList.ftl
#	RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl
#	ReflexUtils.ftl
#	VERSION
2024-03-12 08:11:21 +01:00
9cffad8ffb Snapshot reflex-wms-connector 1.4.0-SNAPSHOT 2024-03-11 17:12:45 +01:00
fc919c2199 Release 1.2.13+1 2024-03-11 16:13:48 +01:00
48052a8112 SCPN1-6130 2024-03-11 14:25:42 +01:00
5af4faf052 modifs 2024-03-07 10:16:44 +01:00
dc362f6826 modifs 2024-03-05 17:30:56 +01:00
3ef86f9e5c modifs 2024-03-05 17:03:32 +01:00
97b3eb3d97 SCPN1-6130 2024-03-05 15:05:51 +01:00
3b98560221 modifs 2024-03-04 10:30:24 +01:00
7eee45993e modif 2024-02-29 17:13:39 +01:00
76c17efbec modifs 2024-02-29 16:48:02 +01:00
1038471fd0 modifs 2024-02-29 16:23:09 +01:00
76c071fab7 modif receipt 2024-02-29 13:53:59 +01:00
3ed530fb09 modifs trim json 2024-02-29 13:34:59 +01:00
da8939ec74 modifs 2024-02-29 11:57:41 +01:00
4193d6e48c modifs 2024-02-29 11:54:30 +01:00
d038e1f6ce modifs order 2024-02-29 11:01:52 +01:00
f4b1864337 Priority date goods 2024-02-27 16:05:43 +01:00
37f5fbf364 modif hsrprepa 2024-02-26 16:21:44 +01:00
a18f41ed78 Modifs prioritydate 2024-02-22 16:29:08 +01:00
b6aa1d544e ajout fonction jsonString 2024-02-19 18:12:05 +01:00
3ededd9c62 Modifs logs 2024-02-15 10:42:42 +01:00
f25f664b9a Modifs HsrPro 2024-02-15 10:30:51 +01:00
feee703166 Modifs 2024-02-15 10:19:31 +01:00
c183b1398e Modifs LMO 2024-02-14 17:43:20 +01:00
e5981b5b0d Modifs HSAProstatus 2024-02-08 17:51:28 +01:00
ceac740066 modifs HsaProstatut 2024-02-08 17:23:25 +01:00
9aa9500f0b Modifs HSRprpaGP 2024-02-06 15:56:41 +01:00
585ac07746 Modifs HsrPrepaGP 2024-02-06 15:41:57 +01:00
4a806b3977 Modifs HSRPrepaGP 2024-02-06 15:26:24 +01:00
eedd7cb16a Modifs hsrprepaGP 2024-02-06 15:00:52 +01:00
387721fd82 Modifs HSRPrepa 0502241451 2024-02-05 14:51:55 +01:00
d334812615 Modifs HsrPrepa 2024-02-02 17:29:04 +01:00
071b5e47b0 Modifs HsrPrepa 2024-02-02 17:15:32 +01:00
ba9c557ae5 Modifs HSRprepa 2024-02-02 17:04:50 +01:00
869dc5e2f7 Modifs RPtoRFX_Receipts 2301241132 2024-01-23 11:32:31 +01:00
252302e688 Modifs RPtoRFX_Receipts 2301241118 2024-01-23 11:18:52 +01:00
56cd76fe0e Modifs RPtoRFX 2301241050 2024-01-23 10:50:44 +01:00
262e22d970 Modifs date 1901241548 2024-01-19 15:51:08 +01:00
ed809f872d Modifs HsaIpgMove-Rec 1801241412 2024-01-18 14:12:33 +01:00
ca30958d35 Modifs RPtoRFX 1701240947 2024-01-17 09:48:01 +01:00
824a52a588 Modifs 1601241713 2024-01-16 17:14:01 +01:00
60cadad51f Modifs 1601241710 2024-01-16 17:10:40 +01:00
123d1dce90 Modifs date 1601241705 2024-01-16 17:06:17 +01:00
4073c63a75 Modifs 1601241500 2024-01-16 15:00:05 +01:00
b8aea218ce Modifs 1601241452 2024-01-16 14:53:23 +01:00
380b6ea116 Modifs Hsrprepa 1601241448 2024-01-16 14:48:17 +01:00
59db159c29 modifs trackinhHULabelled 1601241437 2024-01-16 14:37:51 +01:00
c7fbfe21fb Modifs emalis 1601241352 2024-01-16 13:52:38 +01:00
12e29c6644 Modifs 1601241121 2024-01-16 11:21:04 +01:00
fb1980d07a Ajout Statut HU 1601241049 2024-01-16 10:49:13 +01:00
736054e237 Modifs hsrprepa dimension 1501241759 2024-01-15 17:59:50 +01:00
4eb68902bf Modifs 1201241553 2024-01-12 15:54:08 +01:00
82 changed files with 2206 additions and 1069 deletions

162
ActorPrefix.ftl Normal file
View File

@@ -0,0 +1,162 @@
<#-- --------------------------------------------------------------------------------------- -->
<#-- Actor Prefix 4 cars -->
<#-- --------------------------------------------------------------------------------------- -->
<#-- For Depot -->
<#function RFXtoRPprefixDepot depot>
<#if uniqueness >
<#local actor = depot>
<#else>
<#if text_language_rfx ="fr">
<#local actor = "DEP_"+depot>
<#else>
<#if text_language_rfx ="it">
<#local actor = "DEP_"+depot>
<#else>
<#if text_language_rfx ="es">
<#local actor = "DEP_"+depot>
<#else>
<#if text_language_rfx ="pl">
<#local actor = "MAG_"+depot>
<#else>
<#if text_language_rfx ="nl">
<#local actor = "DEP_"+depot>
<#else>
<#local actor = "DEP_"+depot>
</#if>
</#if>
</#if>
</#if>
</#if>
</#if>
<#return (actor)>
</#function>
<#function RPtoRFXprefixDepot actor>
<#if uniqueness>
<#local depot = actor>
<#else>
<#local depot = actor[4..]>
</#if>
<#return (depot)>
</#function>
<#-- For Supplier -->
<#function RFXtoRPprefixSupplier supplier>
<#if uniqueness>
<#local actor = supplier>
<#else>
<#if text_language_rfx ="fr">
<#local actor = "FOU_"+supplier>
<#else>
<#if text_language_rfx ="it">
<#local actor = "FOR_"+supplier>
<#else>
<#if text_language_rfx ="es">
<#local actor = "PRO_"+supplier>
<#else>
<#if text_language_rfx ="pl">
<#local actor = "DOS_"+supplier>
<#else>
<#if text_language_rfx ="nl">
<#local actor = "LEV_"+supplier>
<#else>
<#local actor = "SUP_"+supplier>
</#if>
</#if>
</#if>
</#if>
</#if>
</#if>
<#return (actor)>
</#function>
<#function RPtoRFXprefixSupplier actor>
<#if uniqueness>
<#local supplier = actor>
<#else>
<#local supplier = actor[4..]>
</#if>
<#return (supplier)>
</#function>
<#-- For Carrier -->
<#function RFXtoRPprefixCarrier carrier>
<#if uniqueness>
<#local actor = carrier>
<#else>
<#if text_language_rfx ="fr">
<#local actor = "TRA_"+carrier>
<#else>
<#if text_language_rfx ="it">
<#local actor = "VET_"+carrier>
<#else>
<#if text_language_rfx ="es">
<#local actor = "TRA_"+carrier>
<#else>
<#if text_language_rfx ="pl">
<#local actor = "PRZ_"+carrier>
<#else>
<#if text_language_rfx ="nl">
<#local actor = "VER_"+carrier>
<#else>
<#local actor = "CAR_"+carrier>
</#if>
</#if>
</#if>
</#if>
</#if>
</#if>
<#return (actor)>
</#function>
<#function RPtoRFXprefixCarrier actor>
<#if uniqueness>
<#local carrier = actor>
<#else>
<#local carrier = actor[4..]>
</#if>
<#return (carrier)>
</#function>
<#-- For Consignee -->
<#function RFXtoRPprefixConsignee consignee>
<#if uniqueness>
<#local actor = consignee>
<#else>
<#if text_language_rfx ="fr">
<#local actor = "DES_"+consignee>
<#else>
<#if text_language_rfx ="it">
<#local actor = "DES_"+consignee>
<#else>
<#if text_language_rfx ="es">
<#local actor = "DES_"+consignee>
<#else>
<#if text_language_rfx ="pl">
<#local actor = "ODB_"+consignee>
<#else>
<#if text_language_rfx ="nl">
<#local actor = "ONT_"+consignee>
<#else>
<#local actor = "CON_"+consignee>
</#if>
</#if>
</#if>
</#if>
</#if>
</#if>
<#return (actor)>
</#function>
<#function RPtoRFXprefixConsignee actor>
<#if uniqueness>
<#local consignee = actor>
<#else>
<#local consignee = actor[4..]>
</#if>
<#return (consignee)>
</#function>

View File

@@ -0,0 +1 @@
<#assign trackingNumberSource = 3>

View File

@@ -6,7 +6,7 @@
<#include "HfRpConfig.ftl">
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
<#assign organisationRP = organisation>
@@ -16,45 +16,45 @@
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign reflexStockPicturesInterface = JsonUtil.jsonToMap(dataRfx)>
<#-- idSnapshot MUST BE UNIQUE regardless of the number of messages in the stock image -->
<#if cloudEventMsg.messageSet??>
<#if cloudEventMsg.messageSet??>
<#assign idSnapshot = cloudEventMsg.messageSet />
<#else>
<#assign idSnapshot = cloudEventMsg.id />
</#if>
</#if>
<#list reflexStockPicturesInterface.detailled_stock_list as stock>
<#if stock.stock_type_code != "200">
<#stop "stock type different from 200">
<#break>
</#if>
</#list>
[
{
<#stop>
<#break>
</#if>
</#list>
[
{
<#if sum_elt??>
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorSnapshotCompleted>
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorSnapshotCompleted>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HfDtlStockLs_ActorSnapshotCompleted.ftl">
"datas" :
<#include "RFXtoRP_HfDtlStockLs_ActorSnapshotCompleted.ftl">
<#else>
<#assign apiReflexPlatformID = ApiReflexPlatformID.StockSnapshotted>
<#assign apiReflexPlatformID = ApiReflexPlatformID.StockSnapshotted>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
"datas" :
<#include "RFXtoRP_HfDtlStockLs_StockSnapshotted.ftl">
</#if>
</#if>
}
]
]
<#break>
<#case "D">
<#-- *********************************************** Action = DELETE ******************** -->
<#stop "event not supported">
<#stop >
<#break>
<#default>
<#stop "event not supported">
<#stop >
</#switch>

View File

@@ -1,27 +1,29 @@
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[
<#list reflexStockPicturesInterface.detailled_stock_list as stock>
{
"Header": {
"ProjectID": "${projectRP}"
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${stock.physical_depot_code}"
},
"Payload": {
<#assign generation_date = RfxDateTimetoUTC(stock.generation_date,time_zone_offset_rfx) />
"RefID": "${RFXtoRPprefixDepot(stock.physical_depot_code)}"
},
"Payload": {
<#assign generation_date = RfxDateTimetoUTCWithTimezone(stock.generation_date,time_zone_rfx) />
"Snapshot": {
"EndDateTime": {
"DateTime": "${generation_date}",
"AuthorTimeZone": "${time_zone_rfx}"
},
"ID": "${stock.physical_depot_code}-${idSnapshot}",
"MessageNb": ${sum_elt}
"DateTime": "${generation_date}",
"AuthorTimeZone": "${time_zone_rfx}"
},
"ID": "${stock.physical_depot_code}-${idSnapshot}",
"MessageNb": ${sum_elt}
}
}
}
<#break>
</#list>
</#list>
]

View File

@@ -1,40 +1,44 @@
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[
<#list reflexStockPicturesInterface.detailled_stock_list as stock>
{
"Header": {
"ProjectID": "${projectRP}"
"ProjectID": "${projectRP}"
},
"Payload": {
"ActorID": "${stock.physical_depot_code}",
<#assign generation_date = RfxDateTimetoUTC(stock.generation_date,time_zone_offset_rfx) />
"ActorID": "${RFXtoRPprefixDepot(stock.physical_depot_code)}",
<#assign generation_date = RfxDateTimetoUTCWithTimezone(stock.generation_date,time_zone_rfx) />
"Snapshot": {
"DateTime": {
"DateTime": "${generation_date}",
"AuthorTimeZone": "${time_zone_rfx}"
},
"ID": "${stock.physical_depot_code}-${idSnapshot}",
"Quantity":
{
"Value" : "${stock.quantity_in_base_lvs!"0"}",
"LVID": "${quantity_in_base_lv_RP_Cst}"
}
"DateTime": "${generation_date}",
"AuthorTimeZone": "${time_zone_rfx}"
},
"ID": "${stock.physical_depot_code}-${idSnapshot}",
"Quantity":
{
"Value" : "${stock.quantity_in_base_lvs!"0"}",
"LVID": "${quantity_in_base_lv_RP_Cst}"
}
},
"Goods": {
"ItemID": "${stock.item_code?trim?json_string}",
"LVBranchID": "${stock.item_logistical_variant_code}",
<#assign priority_date = stock.priority_date?datetime(rfx_date_format_default)?iso_utc />
<#assign priority_date = stock.priority_date?datetime(rfx_date_format_default)?iso_utc />
<#if (stock.priority_date!="") && (stock.priority_date?starts_with("00")== false) >
"PriorityDate" : "${priority_date}",
</#if>
<#else>
"PriorityDate": "1970-01-01T00:00:00Z",
</#if>
<#-- Segmentation keys inclusion -->
<#include "RFXtoRP_HfDtlStockLs_StockSnapshotted_SegmentationKeys.ftl">
}
}
}
}<#sep>,</#sep>
</#list>
</#list>
]

View File

@@ -17,21 +17,21 @@
"Value": { "String" : "no batch"}
<#else>
"Value": { "String" : "${stock.batch_1}"}
</#if>
</#if>
},
{
"Key": "HeldForSpecificCode",
"Value": { "Bool" : "${stock.held_for_specific_code}"}
},
{
<#assign manufacturing_datetime = RfxDateTimetoUTC(stock.Date_of_manufacture,time_zone_offset_rfx) />
<#assign manufacturing_datetime = RfxDateTimetoUTCWithTimezone(stock.Date_of_manufacture,time_zone_rfx) />
"Key": "ManufacturingDate",
"Value": "Timestamp": {
"AuthorTimeZone": "${time_zone_rfx}",
"DateTime": "${manufacturing_datetime}"
}
}
}
]
-->

View File

@@ -1,5 +1,5 @@
<#-- *********************************************** Parameter global ******************** -->
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
<#assign organisationRP = organisation>
<#include "HfExpGrpList.ftl">
@@ -15,14 +15,14 @@
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign file = JsonUtil.jsonToMap(dataRfx)>
<#assign temp = ExpiryGroupList64>
<#assign temp = ExpiryGroupList64>
<#list file.expiry_group_list as expiry_group>
<#assign temp = JsonUtil.update(temp,cloudEventMsg.action,expiry_group.exipiry_group_code,Date_Tye_Code_KV[expiry_group.priority_date_type_code])>
</#list>
<#assign output = JsonUtil.print(temp)>
${output}
${output}
<#break>
<#default>
<#stop >
</#switch>

View File

@@ -1,5 +1,5 @@
<#-- *********************************************** Parameter global ******************** -->
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
<#assign organisationRP = organisation>
@@ -9,11 +9,11 @@
<#case "C">
<#case "U">
<#case "D">
<#stop "no generic FTL file available yet for Grades">
<#stop "no generic FTL file available yet for Grades">
<#break>
<#default>
<#stop "event not supported">
<#stop >
</#switch>

View File

@@ -1,5 +1,5 @@
<#-- *********************************************** Parameter global ******************** -->
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
<#assign organisationRP = organisation>
@@ -10,12 +10,12 @@
<#case "U">
<#case "D">
<#stop "no generic FTL file available yet for LV types">
<#stop "no generic FTL file available yet for LV types">
<#break>
<#default>
<#stop "event not supported">
<#stop >
</#switch>

View File

@@ -1,5 +1,5 @@
<#-- *********************************************** Parameter global ******************** -->
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
<#assign organisationRP = organisation>
@@ -9,11 +9,11 @@
<#case "C">
<#case "U">
<#case "D">
<#stop "no generic FTL file available yet for Owners">
<#stop "no generic FTL file available yet for Owners">
<#break>
<#default>
<#stop "event not supported">
<#stop >
</#switch>

View File

@@ -4,7 +4,7 @@ those parameters are stored in FTL file HfRpConfig.ftl for later use in some of
*** -->
<#-- *********************************************** Parameter global ******************** -->
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
<#assign organisationRP = organisation>
@@ -16,18 +16,18 @@ those parameters are stored in FTL file HfRpConfig.ftl for later use in some of
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign file = JsonUtil.jsonToMap(dataRfx)>
<#include "RFXtoRP_RfxConfigurationRp.ftl">
<#break>
<#case "D">
<#-- *********************************************** Action = DELETE ******************** -->
<#stop "deletion of config not supported">
<#break>
<#default>
<#stop "event not supported">
<#stop >
</#switch>

View File

@@ -3,7 +3,7 @@
<#-- project : projectId in ReflexPlatform -->
<#-- organisation : organisationtId in ReflexPlatform -->
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
<#assign organisationRP = organisation>
@@ -14,33 +14,33 @@
<#case "U">
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign carrier = JsonUtil.jsonToMap(dataRfx)>
[
<#assign carrier = JsonUtil.jsonToMap(dataRfx)>
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaCarrier_ActorCreated.ftl">
"datas" :
<#include "RFXtoRP_HsaCarrier_ActorCreated.ftl">
}
]
]
<#break>
<#case "D">
<#-- *********************************************** Action = DELETE ******************************* -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign carrier = JsonUtil.jsonToMap(dataRfx)>
[
<#assign carrier = JsonUtil.jsonToMap(dataRfx)>
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorDeleted>
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorDeleted>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaCarrier_ActorDeleted.ftl">
"datas" :
<#include "RFXtoRP_HsaCarrier_ActorDeleted.ftl">
}
]
]
<#break>
<#default>
<#stop "event not supported">
<#stop >
</#switch>

View File

@@ -1,35 +1,40 @@
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[
{
{
"Header": {
"ProjectID": "${projectRP}"
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${carrier.carrier_code?trim?json_string}"
"RefID": "${RFXtoRPprefixCarrier(carrier.carrier_code?trim?json_string)}"
},
"Payload": {
"Name": "${carrier.carrier_designation?json_string}",
"ManagedStock": false,
"IsCarrier": true,
<#-- ***Partner ID could be added here *** -->
<#-- "PartnerID": "${}", -->
<#--
<#include "RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl">,
-->
<#include "RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl">,
"Address":
{
<#-- if Reflex WMS address is structured -->
<#if carrier.carrier_structured_address?? >
<#if carrier.carrier_structured_address?? >
"Name": "${carrier.carrier_structured_address.name_or_company?json_string}",
"StreetAddressOne" : "${carrier.carrier_structured_address.street_and_PO?json_string}",
"StreetAddressTwo" : "${carrier.carrier_structured_address.additionnal_data?json_string}",
"StreetAddressTwo" : "${carrier.carrier_structured_address.additionnal_data?json_string}",
"PostalCode" : "${carrier.carrier_structured_address.postal_code?json_string}",
"City" : "${carrier.carrier_structured_address.post_code_area_name?json_string}",
"CountryCode" : "${carrier.carrier_structured_address.country_code?json_string}",
<#assign isCountryCode = JsonUtil.isCountryCode(carrier.carrier_structured_address.country_code?upper_case) />
<#if isCountryCode>
"CountryCode" : "${carrier.carrier_structured_address.country_code?upper_case?json_string}",
<#else>
"CountryCode" : "",
</#if>
"ProvinceCode": "${carrier.carrier_structured_address.territorial_div_code?json_string}",
"State": "${carrier.carrier_structured_address.country_designation?json_string}"
@@ -39,16 +44,17 @@
"Name": "${carrier.address.company_name?json_string}",
"StreetAddressOne" : "${carrier.address.address_1?json_string}",
"StreetAddressTwo" : "${carrier.address.address_2?json_string}",
"StreetAddressThree" : "${carrier.address.address_3?json_string}"
</#if>
</#if>
"StreetAddressThree" : "${carrier.address.address_3?json_string}",
"CountryCode" : ""
</#if>
</#if>
},
<#if carrier.address??>
"Phones": ["${carrier.address.telephone?json_string}",
"Phones": ["${carrier.address.telephone?json_string}",
"${carrier.address.other_number?json_string}"
],
</#if>
"Typology": "TYPOLOGY_CARRIER"
}
}
}
]

View File

@@ -1,12 +1,14 @@
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[
{
{
"Header": {
"ProjectID": "${projectRP}"
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${carrier.carrier_code?trim?json_string}"
"RefID": "${RFXtoRPprefixCarrier(carrier.carrier_code?trim?json_string)}"
},
"Payload": {}
}
}
]

View File

@@ -3,7 +3,7 @@
<#-- project : projectId in ReflexPlatform -->
<#-- organisation : organisationtId in ReflexPlatform -->
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
<#assign organisationRP = organisation>
@@ -14,33 +14,33 @@
<#case "U">
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
[
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaCons_ActorCreated.ftl">
"datas" :
<#include "RFXtoRP_HsaCons_ActorCreated.ftl">
}
]
]
<#break>
<#case "D">
<#-- *********************************************** Action = DELETE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
[
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorDeleted>
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorDeleted>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaCons_ActorDeleted.ftl">
"datas" :
<#include "RFXtoRP_HsaCons_ActorDeleted.ftl">
}
]
]
<#break>
<#default>
<#stop "event not supported">
<#stop >
</#switch>

View File

@@ -1,12 +1,14 @@
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${actor.code?trim?json_string}"
"RefID": "${RFXtoRPprefixConsignee(actor.code?trim?json_string)}"
},
"Payload": {
"Name": "${actor.designation?json_string}",
"ManagedStock": false,
@@ -14,10 +16,10 @@
<#-- ***Partner ID could be added here *** -->
<#-- "PartnerID": "${}", -->
<#--
<#include "RFXtoRP_HsaCons_ActorCreated_Metadata.ftl">,
-->
"Address":
{
@@ -26,28 +28,34 @@
"Name": "${actor.consignee_structured_address.name_or_company?json_string}",
"StreetAddressOne" : "${actor.consignee_structured_address.street_and_PO?json_string}",
"StreetAddressTwo" : "${actor.consignee_structured_address.additionnal_data?json_string}",
"StreetAddressTwo" : "${actor.consignee_structured_address.additionnal_data?json_string}",
"PostalCode" : "${actor.consignee_structured_address.postal_code?json_string}",
"City" : "${actor.consignee_structured_address.post_code_area_name?json_string}",
"CountryCode" : "${actor.consignee_structured_address.country_code?json_string}",
<#assign isCountryCode = JsonUtil.isCountryCode(actor.consignee_structured_address.country_code?upper_case) />
<#if isCountryCode>
"CountryCode" : "${actor.consignee_structured_address.country_code?upper_case?json_string}",
<#else>
"CountryCode" : "",
</#if>
"ProvinceCode": "${actor.consignee_structured_address.territorial_div_code?json_string}",
"State": "${actor.consignee_structured_address.country_designation?json_string}"
<#-- if Reflex WMS is not structured -->
<#else>
<#else>
<#if actor.address?? >
"Name": "${actor.address.company_name?json_string}",
"StreetAddressOne" : "${actor.address.address_1?json_string}",
"StreetAddressTwo" : "${actor.address.address_2?json_string}",
"StreetAddressThree" : "${actor.address.address_3?json_string}"
</#if>
</#if>
},
<#if actor.address?? >
"Phones": ["${actor.address.telephone?json_string}",
"StreetAddressThree" : "${actor.address.address_3?json_string}",
"CountryCode" : ""
</#if>
</#if>
},
<#if actor.address?? >
"Phones": ["${actor.address.telephone?json_string}",
"${actor.address.other_number?json_string}"
],
],
</#if>
"Typology": "TYPOLOGY_UNKNOWN"
}

View File

@@ -1,12 +1,14 @@
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[
{
{
"Header": {
"ProjectID": "${projectRP}"
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${actor.code?trim?json_string}"
"RefID": "${RFXtoRPprefixConsignee(actor.code?trim?json_string)}"
},
"Payload": {}
}
]

47
RFXtoRP_HsaDispute.ftl Normal file
View File

@@ -0,0 +1,47 @@
<#-- **** input parameters ***** -->
<#-- input : message RFX -->
<#-- project : projectId in ReflexPlatform -->
<#-- organisation : organisationtId in ReflexPlatform -->
<#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 dispute = JsonUtil.jsonToMap(dataRfx)>
[
<#if dispute.dispute_closed == true >
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimCreated>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaDispute_Created.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimMessageSent>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaDispute_MessageSent.ftl">
}
<#else>
<#stop>
</#if>
]
<#break>
<#case "D">
<#-- *********************************************** Action = DELETE ******************** -->
<#stop>
<#break>
<#default>
<#stop>
</#switch>

View File

@@ -0,0 +1,67 @@
<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
<#include "Table.ftl">
[
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID": {
<#if dispute.dispute_preparation??>
<#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0>
"RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_activity_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
<#else>
<#stop "preparation order list is empty" >
</#if>
<#else>
<#if dispute.dispute_reception??>
"RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
</#if>
</#if>
},
"Payload": {
<#if dispute.dispute_reference?? && dispute.dispute_reference!="">
"Title":"${dispute.dispute_reference?trim?json_string}",
<#else>
"Title":"",
</#if>
"Criticality":"${TableCriticality[dispute.dispute_criticity]}",
"Amount": {
<#assign isCurrencyCode = JsonUtil.isCurrencyCode(dispute.dispute_amount_unit?upper_case) />
<#if isCurrencyCode>
"Currency" : "${dispute.dispute_amount_unit?upper_case?json_string}",
<#else>
<#if TableAmount[dispute.dispute_amount_unit?json_string]??>
"Currency" : "${TableAmount[dispute.dispute_amount_unit?json_string]}",
<#else>
"Currency" : "XXX",
</#if>
</#if>
"Value": "${dispute.dispute_amount}"
},
<#if dispute.dispute_type_code=="050" >
<#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0>
"EntityID":"${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string}",
<#else>
<#stop "preparation order list is empty" >
</#if>
<#else>
<#if dispute.dispute_type_code=="070" || dispute.dispute_type_code=="030" >
"EntityID":"${dispute.dispute_reception.reception_reference?trim?json_string}",
<#else>
<#stop "Type not supported" >
</#if>
</#if>
<#-- To configure -->
<#include "RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl">
<#if TableReasonCode[dispute.dispute_reason_code]??>
"ClaimTypeID":"${TableReasonCode[dispute.dispute_reason_code]}"
<#else>
<#stop "Claim reason code not supported" >
</#if>
}
}
]

View File

@@ -0,0 +1,124 @@
<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
[
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID": {
<#if dispute.dispute_preparation??>
<#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0>
"RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_activity_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
<#else>
<#stop "preparation order list is empty" >
</#if>
<#else>
<#if dispute.dispute_reception??>
"RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
</#if>
</#if>
},
"Payload": {
<#if dispute.dispute_preparation??>
"Message": "${dispute.dispute_reference?trim?json_string}"
<#else>
<#if dispute.dispute_reception??>
"Message": "${dispute.dispute_reception.reception_reference?trim?json_string}"
</#if>
</#if>
}
},
<#if dispute.dispute_quantity!=0 && dispute.dispute_item??>
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID": {
<#if dispute.dispute_preparation??>
<#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0>
"RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_activity_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
<#else>
<#stop "preparation order list is empty" >
</#if>
<#else>
<#if dispute.dispute_reception??>
"RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
</#if>
</#if>
},
"Payload": {
"Message": "${dispute.dispute_item.item_code?trim?json_string} - ${dispute.dispute_quantity}${dispute.dispute_quantity_unit}"
}
},
<#elseif dispute.dispute_item??>
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID": {
<#if dispute.dispute_preparation??>
<#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0>
"RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_activity_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
<#else>
<#stop "preparation order list is empty" >
</#if>
<#else>
<#if dispute.dispute_reception??>
"RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
</#if>
</#if>
},
"Payload": {
"Message": "${dispute.dispute_item.item_code?trim?json_string}"
}
},
<#elseif dispute.dispute_quantity!=0>
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID": {
<#if dispute.dispute_preparation??>
<#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0>
"RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_activity_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
<#else>
<#stop "preparation order list is empty" >
</#if>
<#else>
<#if dispute.dispute_reception??>
"RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
</#if>
</#if>
},
"Payload": {
"Message": "${dispute.dispute_quantity}${dispute.dispute_quantity_unit}"
}
},
</#if>
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID": {
<#if dispute.dispute_preparation??>
<#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0>
"RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_activity_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
<#else>
<#stop "preparation order list is empty" >
</#if>
<#else>
<#if dispute.dispute_reception??>
"RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
</#if>
</#if>
},
"Payload": {
"Message": " ${dispute.dispute_description?trim?json_string}"
}
}
]

View File

@@ -0,0 +1,7 @@
<#-- Specify table for reason code -->
<#assign TableReasonCode = {}/>

View File

@@ -1,4 +1,4 @@
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
<#assign organisationRP = organisation>
@@ -9,66 +9,74 @@
<#case "U">
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign reflexMvtStockInterface = JsonUtil.jsonToMap(dataRfx)>
<#assign reflexMvtStockInterface = JsonUtil.jsonToMap(dataRfx)>
<#-- exclusion of the cases of an IPG move with quantity = 0 (weight modification) -->
<#if reflexMvtStockInterface.ipg_move_quantity_in_base_lvs != 0>
<#-- IPG moves translated into Stock moves -->
<#if reflexMvtStockInterface.ipg_move_type == "130" ||
reflexMvtStockInterface.ipg_move_type == "200" ||
reflexMvtStockInterface.ipg_move_type == "210" ||
reflexMvtStockInterface.ipg_move_type == "220" ||
reflexMvtStockInterface.ipg_move_type == "230" ||
reflexMvtStockInterface.ipg_move_type == "240" ||
reflexMvtStockInterface.ipg_move_type == "260" ||
reflexMvtStockInterface.ipg_move_type == "290" ||
reflexMvtStockInterface.ipg_move_type == "300" ||
reflexMvtStockInterface.ipg_move_type == "400" ||
reflexMvtStockInterface.ipg_move_type == "410" ||
reflexMvtStockInterface.ipg_move_type == "420"
>
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.StockMoved>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaIpgMove_StockMoved.ftl">
}
]
<#-- IPG moves translated into Stock moves -->
<#if reflexMvtStockInterface.ipg_move_type == "130" ||
reflexMvtStockInterface.ipg_move_type == "200" ||
reflexMvtStockInterface.ipg_move_type == "210" ||
reflexMvtStockInterface.ipg_move_type == "220" ||
reflexMvtStockInterface.ipg_move_type == "230" ||
reflexMvtStockInterface.ipg_move_type == "240" ||
reflexMvtStockInterface.ipg_move_type == "260" ||
reflexMvtStockInterface.ipg_move_type == "290" ||
reflexMvtStockInterface.ipg_move_type == "300" ||
reflexMvtStockInterface.ipg_move_type == "350" ||
reflexMvtStockInterface.ipg_move_type == "370" ||
reflexMvtStockInterface.ipg_move_type == "400" ||
reflexMvtStockInterface.ipg_move_type == "410" ||
reflexMvtStockInterface.ipg_move_type == "420" ||
reflexMvtStockInterface.ipg_move_type == "455" ||
reflexMvtStockInterface.ipg_move_type == "460" ||
reflexMvtStockInterface.ipg_move_type == "465" ||
(reflexMvtStockInterface.ipg_move_type == "520" && reflexMvtStockInterface.ipg_move_creation_program == "HFST69")
>
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.MovementCreated>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaIpgMove_StockMoved.ftl">
}
]
<#else>
<#-- IPG moves translated into goods received (all type of receipt) -->
<#if reflexMvtStockInterface.ipg_move_type == "100" ||
reflexMvtStockInterface.ipg_move_type == "110" ||
reflexMvtStockInterface.ipg_move_type == "120"
>
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsReceived>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaIpgMove_GoodsReceived.ftl">
}
]
<#else>
<#-- Case of IPG move type volontarilly ignored-->
<#stop>
</#if>
</#if>
<#else>
<#-- cases of an IPG move with quantity = 0 (weight modification)-->
<#stop>
<#-- IPG moves translated into goods received (all type of receipt) -->
<#if (reflexMvtStockInterface.ipg_move_type == "100" ||
reflexMvtStockInterface.ipg_move_type == "110" ||
reflexMvtStockInterface.ipg_move_type == "120") >
<#if reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!="">
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsReceived>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaIpgMove_GoodsReceived.ftl">
}
]
<#else>
<#-- Case of IPG move type volontarilly ignored-->
<#stop " Reference receipt is empty">
</#if>
<#else>
<#stop>
</#if>
</#if>
<#else>
<#-- cases of an IPG move with quantity = 0 (weight modification)-->
<#stop>
</#if>
<#break>
<#case "D">
<#-- *********************************************** Action = DELETE ******************** -->
<#stop "event not supported - Case D ">
<#stop >
<#break>
<#default>
<#stop "event not supported">
<#stop>
</#switch>

View File

@@ -1,44 +1,50 @@
<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
<#include "ActorPrefix.ftl">
[
<#assign receipt_confirmation_datetime = RfxDateTimetoUTC(reflexMvtStockInterface.ipg_move_creation_datetime,time_zone_offset_rfx) />
<#assign receipt_confirmation_datetime = RfxDateTimetoUTCWithTimezone(reflexMvtStockInterface.ipg_move_creation_datetime,time_zone_rfx) />
<#assign priority_date = reflexMvtStockInterface.ipg_priority_date?datetime(rfx_date_format_default)?iso_utc />
{
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${reflexMvtStockInterface.hd_number?trim?json_string}"
},
},
"Payload": {
"ReceivedContents" :[
{
"DateTime": {
"DateTime": "${receipt_confirmation_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"
"AuthorTimeZone": "${time_zone_rfx}"
},
"Goods": {
"ItemID": "${reflexMvtStockInterface.item_code?trim?json_string}",
"LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}",
"PriorityDate": "${priority_date}",
<#if (reflexMvtStockInterface.ipg_priority_date!="") && (reflexMvtStockInterface.ipg_priority_date?starts_with("00")== false) >
"PriorityDate": "${priority_date}",
<#else>
"PriorityDate": "1970-01-01T00:00:00Z",
</#if>
<#-- Goods received Segmentation Keys inclusion -->
<#include "RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl">
},
<#if reflexMvtStockInterface.receipt_reference!="">
"ExecutionflowID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}",
<#else>
"ExecutionflowID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}",
</#if>
"LineID": "${reflexMvtStockInterface.receipt_line_number}",
"ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}",
"Quantity": {
"LineID": "${reflexMvtStockInterface.receipt_line_number}",
"ActorID": "${RFXtoRPprefixDepot(reflexMvtStockInterface.physical_depot_code?trim?json_string)}",
"Quantity": {
"LVID": "${quantity_in_base_lv_RP_Cst}",
"Value": ${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs}
"Value": ${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs}
}
}
]
}
}
}
]

View File

@@ -18,21 +18,21 @@
"Value": { "String" : "no batch"}
<#else>
"Value": { "String" : "${reflexMvtStockInterface.batch_1}"}
</#if>
</#if>
},
{
"Key": "HeldForSpecificCode",
"Value": { "Bool" : "${reflexMvtStockInterface.ipg_specific_code_held}"}
},
{
<#assign manufacturing_date = reflexMvtStockInterface.manufacture_date?datetime(rfx_date_format_default)?iso_utc />
<#assign manufacturing_date = reflexMvtStockInterface.manufacture_date?datetime(rfx_date_format_default)?iso_utc />
"Key": "ManufacturingDate",
"Value": "Timestamp": {
"AuthorTimeZone": "${time_zone_rfx}",
"DateTime": "${manufacturing_date}"
}
}
}
]
-->

View File

@@ -1,5 +1,6 @@
<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
<#include "ActorPrefix.ftl">
<#assign MoveType_KV = {"130":"STOCK_MOVEMENT_TYPE_PRODUCTION",
"200":"STOCK_MOVEMENT_TYPE_FIX",
@@ -10,31 +11,41 @@
"260":"STOCK_MOVEMENT_TYPE_REQUALIFICATION",
"290":"STOCK_MOVEMENT_TYPE_REQUALIFICATION",
"300":"STOCK_MOVEMENT_TYPE_REQUALIFICATION",
"350":"STOCK_MOVEMENT_TYPE_USE_OF_GOODS",
"370":"STOCK_MOVEMENT_TYPE_USE_OF_GOODS",
"400":"STOCK_MOVEMENT_TYPE_FIX",
"410":"STOCK_MOVEMENT_TYPE_FIX",
"420":"STOCK_MOVEMENT_TYPE_REQUALIFICATION"}>
<#assign generation_date = RfxDateTimetoUTC(reflexMvtStockInterface.ipg_move_creation_datetime,time_zone_offset_rfx) />
"420":"STOCK_MOVEMENT_TYPE_REQUALIFICATION",
"455":"STOCK_MOVEMENT_TYPE_FIX",
"460":"STOCK_MOVEMENT_TYPE_FIX",
"465":"STOCK_MOVEMENT_TYPE_FIX",
"520":"STOCK_MOVEMENT_TYPE_OUTBOUND"
}>
<#assign generation_date = RfxDateTimetoUTCWithTimezone(reflexMvtStockInterface.ipg_move_creation_datetime,time_zone_rfx) />
<#assign ipg_priority_datetime = reflexMvtStockInterface.ipg_priority_date?datetime(rfx_date_format_default)?iso_utc />
[
{
{
"Header": {
"ProjectID": "${projectRP}"
"ProjectID": "${projectRP}"
},
"Payload": {
"Goods": {
"ItemID": "${reflexMvtStockInterface.item_code?trim?json_string}",
"PriorityDate": "${ipg_priority_datetime}",
<#if (reflexMvtStockInterface.ipg_priority_date!="") && (reflexMvtStockInterface.ipg_priority_date?starts_with("00")== false) >
"PriorityDate": "${ipg_priority_datetime}",
<#else>
"PriorityDate": "1970-01-01T00:00:00Z",
</#if>
<#-- Segmentation keys inclusions -->
<#include "RFXtoRP_HsaIpgMove_StockMoved_SegmentationKeys.ftl">,
"LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}"
},
"ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}",
"ActorID": "${RFXtoRPprefixDepot(reflexMvtStockInterface.physical_depot_code?trim?json_string)}",
"Movement": {
"DateTime": {
"DateTime": "${generation_date}",
"AuthorTimeZone": "${time_zone_rfx}"
@@ -42,16 +53,20 @@
"Author": "ReflexWMS-${reflexMvtStockInterface.ipg_move_creation_user_code?json_string}",
"ExternalMoveRef" : "${reflexMvtStockInterface.ipg_move_year_number} - ${reflexMvtStockInterface.ipg_move_number}",
"Type": "${MoveType_KV[reflexMvtStockInterface.ipg_move_type]!reflexMvtStockInterface.ipg_move_type}",
"Reason": "${reflexMvtStockInterface.miscellaneous_receipts_despatches_code?json_string}",
<#if reflexMvtStockInterface.ipg_move_type == "520" >
"Reason": " Transfert ${RFXtoRPprefixDepot(reflexMvtStockInterface.physical_depot_code?trim?json_string)} to ${RFXtoRPprefixDepot(reflexMvtStockInterface.transfer_consignee_physical_depot_code?trim?json_string)}",
<#else>
"Reason": "${reflexMvtStockInterface.miscellaneous_receipts_despatches_code?json_string}",
</#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}",
</#if>
</#if>
"Quantity":
{
"LVID": "${quantity_in_base_lv_RP_Cst}",
<#if reflexMvtStockInterface.move_sign == "+">
<#if reflexMvtStockInterface.move_sign == "+" || reflexMvtStockInterface.ipg_move_quantity_in_base_lvs <= 0 >
"Value": ${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs}
<#else>
"Value": -${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs}

View File

@@ -3,7 +3,7 @@
<#-- project : projectId in ReflexPlatform -->
<#-- organisation : organisationtId in ReflexPlatform -->
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
<#assign organisationRP = organisation>
@@ -15,37 +15,37 @@
<#case "U">
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign item = JsonUtil.jsonToMap(dataRfx)>
[
<#assign item = JsonUtil.jsonToMap(dataRfx)>
[
{
<#if item.logistical_variant_list?? >
<#assign apiReflexPlatformID = ApiReflexPlatformID.ItemCreated>
<#assign apiReflexPlatformID = ApiReflexPlatformID.ItemCreated>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaItm_ItemCreated.ftl">
"datas" :
<#include "RFXtoRP_HsaItm_ItemCreated.ftl">
<#else>
<#stop "no LV for the item">
</#if>
}
]
<#break>
<#case "D">
<#-- *********************************************** Action = DELETE ******************************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign item = JsonUtil.jsonToMap(dataRfx)>
[
<#assign item = JsonUtil.jsonToMap(dataRfx)>
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ItemDeleted>
<#assign apiReflexPlatformID = ApiReflexPlatformID.ItemDeleted>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaItm_ItemDeleted.ftl">
"datas" :
<#include "RFXtoRP_HsaItm_ItemDeleted.ftl">
}
]
]
<#break>
<#default>
<#stop "event not supported">
<#stop >
</#switch>

View File

@@ -3,7 +3,7 @@
<#-- project : projectId in ReflexPlatform -->
<#-- organisation : organisationtId in ReflexPlatform -->
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
<#assign organisationRP = organisation>
@@ -15,31 +15,31 @@
<#case "U">
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign lv = JsonUtil.jsonToMap(dataRfx)>
[
<#assign lv = JsonUtil.jsonToMap(dataRfx)>
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ItemLogisticVariantUpdated>
<#assign apiReflexPlatformID = ApiReflexPlatformID.ItemLogisticVariantUpdated>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaItmLv_LogisticVariantUpdated.ftl">
"datas" :
<#include "RFXtoRP_HsaItmLv_LogisticVariantUpdated.ftl">
}
]
]
<#break>
<#case "D">
<#-- *********************************************** Action = DELETE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign lv = JsonUtil.jsonToMap(dataRfx)>
[
<#assign lv = JsonUtil.jsonToMap(dataRfx)>
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ItemLogisticVariantRemoved>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaItmLv_LogisticVariantRemoved.ftl">
"datas" :
<#include "RFXtoRP_HsaItmLv_LogisticVariantRemoved.ftl">
}
]
<#break>
]
<#break>
<#default>
<#stop "event not supported">
<#stop >
</#switch>

View File

@@ -1,14 +1,14 @@
<#include "HfRpConfig.ftl">
[
{
{
"Header": {
"ProjectID": "${projectRP}"
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${lv.item_code?trim?json_string}"
},
"Payload": {
"RemovedLogisticVariantIDs":["${lv.logistical_variant_code}"]
}
"RemovedLogisticVariantIDs":["${lv.logistical_variant_code}"]
}
}
]

View File

@@ -1,37 +1,37 @@
<#include "HfRpConfig.ftl">
[
{
{
"Header": {
"ProjectID": "${projectRP}"
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${lv.item_code?trim?json_string}"
},
"Payload": {
"LogisticVariants": [
{
{
"LVID": "${lv.logistical_variant_code?json_string}",
"Name" : "${lv.lv_type_code?json_string}",
<#if lv.id_list??>
<#if lv.id_list??>
"Codes": [
<#list lv.id_list as id>
{
"Key": "${id.logistical_variant_ID_type_code?json_string!""}",
"Value": "${id.logistical_variant_ID_code?json_string!""}"
"Key": "${(id.logistical_variant_ID_type_code!"")?json_string}",
"Value": "${(id.logistical_variant_ID_code!"")?json_string}"
}<#sep>,</#sep>
</#list>
],
</#if>
<#-- LV Metadata inclusion -->
</#list>
],
</#if>
<#-- LV Metadata inclusion -->
<#include "RFXtoRP_HsaItmLv_LogisticVariantUpdated_Metadata.ftl">,
"IsBaseLogisticVariant": ${lv.base_lv},
<#if lv.base_lv != "true">
"RefLV": "${lv.subpackaging_lv_code?json_string}",
</#if>
"QuantityInRefLV": ${lv.quantity_in_subpackaging_lv},
"NetWeight": {
@@ -39,35 +39,35 @@
"Unit": "${weight_unit_rfx}"
},
"GrossWeight": {
"Value": ${lv.gross_weight},
"Value": ${lv.gross_weight},
"Unit": "${weight_unit_rfx}"
},
"Volume": {
"Value": ${lv.volume},
"Unit": "${volume_unit_rfx}"
},
},
"Height": {
"Value": ${lv.height},
"Unit": "${length_unit_rfx}"
},
},
"Width": {
"Value": ${lv.width},
"Unit": "${length_unit_rfx}"
},
},
"Length": {
"Value": ${lv.depth},
"Unit": "${length_unit_rfx}"
},
},
<#if lv.packaging_lv == "true">
"BranchIDs": ["${lv.logistical_variant_code}"]
<#else>
"BranchIDs": []
</#if>
</#if>
}
]
]
}
}
]

View File

@@ -1,9 +1,9 @@
<#include "HfRpConfig.ftl">
<#include "HfExpGrpList.ftl">
[
{
{
"Header": {
"ProjectID": "${projectRP}"
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${item.item_code?trim?json_string}"
@@ -12,91 +12,95 @@
"DescriptionsByLanguage": [{
"ShortDescription": "${item.short_designation?json_string}",
"LongDescription": "${item.designation?json_string}",
"TechnicalDetails": "${item.item_description?json_string}",
"TechnicalDetails": "${item.item_description?json_string}",
"LanguageCodeISO6391": "${text_language_rfx}"
}
],
}
],
"ExpiryConstraint": {
"Type": "${ExpiryGroupList[item.expiry_group_code]!"UNKNOWN_DATE"}"
"Type": "${ExpiryGroupList[item.expiry_group_code]!"UNKNOWN_DATE"}"
},
<#-- Item metadata inclusion -->
<#-- Item metadata inclusion -->
<#include "RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl">,
<#-- Item Photo URI could be added here -->
<#--"PhotoURI": " ", -->
<#if item.url?? && item.url!="">
"PhotoURI": "${item.url?json_string}",
</#if>
<#-- Loop for the Logistical Variants - LV -->
<#if item.logistical_variant_list??>
<#if item.logistical_variant_list??>
"LogisticVariants": [
<#list item.logistical_variant_list as logistical_variant>
{
<#list item.logistical_variant_list as logistical_variant>
{
"LVID": "${logistical_variant.logistical_variant_code?json_string}",
"Name" : "${logistical_variant.lv_type_code?json_string}",
<#if logistical_variant.id_list??>
<#if logistical_variant.id_list??>
"Codes": [
<#list logistical_variant.id_list as id>
{
"Key": "${id.logistical_variant_ID_type_code?json_string!""}",
"Value": "${id.logistical_variant_ID_code?json_string!""}"
"Key": "${(id.logistical_variant_ID_type_code!"")?json_string}",
"Value": "${(id.logistical_variant_ID_code!"")?json_string}"
}<#sep>,</#sep>
</#list>
],
</#if>
</#list>
],
</#if>
<#-- LV Metadata inclusion -->
<#include "RFXtoRP_HsaItm_ItemCreated_LogisticVariantMetadata.ftl">,
"IsBaseLogisticVariant": ${logistical_variant.base_lv},
<#include "RFXtoRP_HsaItm_ItemCreated_LogisticVariantMetadata.ftl">,
<#if logistical_variant.base_lv?? && logistical_variant.base_lv!="">
"IsBaseLogisticVariant": ${logistical_variant.base_lv},
</#if>
<#if logistical_variant.base_lv != "true">
"RefLV": "${logistical_variant.subpackaging_lv_code?json_string}",
</#if>
"QuantityInRefLV": ${logistical_variant.quantity_in_subpackaging_lv},
"NetWeight": {
"Value": ${logistical_variant.net_weight},
"Unit": "${weight_unit_rfx}"
},
"GrossWeight": {
"Value": ${logistical_variant.gross_weight},
"Value": ${logistical_variant.gross_weight},
"Unit": "${weight_unit_rfx}"
},
"Volume": {
"Value": ${logistical_variant.volume},
"Unit": "${volume_unit_rfx}"
},
},
"Height": {
"Value": ${logistical_variant.height},
"Unit": "${length_unit_rfx}"
},
},
"Width": {
"Value": ${logistical_variant.width},
"Unit": "${length_unit_rfx}"
},
},
"Length": {
"Value": ${logistical_variant.depth},
"Unit": "${length_unit_rfx}"
},
},
<#if logistical_variant.packaging_lv == "true">
"BranchIDs": ["${logistical_variant.logistical_variant_code}"]
<#else>
"BranchIDs": []
</#if>
</#if>
}
<#sep>,</#sep>
</#list>
]
<#sep>,</#sep>
</#list>
]
</#if>
<#-- End of LV loop -->
}
}
]

View File

@@ -1,12 +1,12 @@
<#include "HfRpConfig.ftl">
[
{
{
"Header": {
"ProjectID": "${projectRP}"
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${item.item_code?trim?json_string}"
},
"Payload": {}
"Payload": {}
}
]

40
RFXtoRP_HsaLstCarSta.ftl Normal file
View File

@@ -0,0 +1,40 @@
<#-- **** input parameters ***** -->
<#-- input : message RFX -->
<#-- project : projectId in ReflexPlatform -->
<#-- organisation : organisationtId in ReflexPlatform -->
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
<#assign organisationRP = organisation>
<#assign aDateTime = .now>
<#stop>
<#switch cloudEventMsg.action>
<#case "C">
<#case "U">
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
[
{
}
]
<#break>
<#case "D">
<#-- *********************************************** Action = DELETE *************************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
[
{
}
]
<#break>
<#default>
<#stop >
</#switch>

View File

@@ -3,7 +3,7 @@
<#-- project : projectId in ReflexPlatform -->
<#-- organisation : organisationtId in ReflexPlatform -->
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
<#assign organisationRP = organisation>
@@ -14,68 +14,68 @@
<#case "U">
<#-- Action = CREATE or UPDATE -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign preparationStatusInterface = JsonUtil.jsonToMap(dataRfx) />
<#assign preparationStatusInterface = JsonUtil.jsonToMap(dataRfx) />
[
<#--**Pick batch runned (200) **-->
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "200" >
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationExpected>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaProStatus_PreparationExpected.ftl">
}
<#else>
<#-- ** 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_order_originator_reference?? && preparationStatusInterface.preparation_order_originator_reference!="">
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "200" >
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationStarted>
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationExpected>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaProStatus_PreparationStarted.ftl">
"datas" :
<#include "RFXtoRP_HsaProStatus_PreparationExpected.ftl">
}
<#else>
<#-- **Preparation to package (500) and preparation completed (550)** -->
<#if preparationStatusInterface.preparation_status_type == "100" && (preparationStatusInterface.preparation_status_code == "500" || preparationStatusInterface.preparation_status_code == "550")>
<#-- ** Collection started (300) and Preparation in progress (400)** -->
<#if preparationStatusInterface.preparation_status_type == "100" && (preparationStatusInterface.preparation_status_code == "300" || preparationStatusInterface.preparation_status_code == "400") >
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationCompleted>
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationStarted>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaProStatus_PreparationCompleted.ftl">
"datas" :
<#include "RFXtoRP_HsaProStatus_PreparationStarted.ftl">
}
<#else>
<#-- ****Preparation dispatched (600)** -->
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "600" >
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowTransportStarted>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaProStatus_TransportStarted.ftl">
}
<#else>
<#-- ****Preparation cancelled (650)**** -->
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "650" >
<#-- ****Preparation dispatched (600)** -->
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "600" >
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationCompleted>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaProStatus_ExecutionflowCancelled.ftl">
"datas" :
<#include "RFXtoRP_HsaProStatus_PreparationCompleted.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowTransportStarted>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaProStatus_TransportStarted.ftl">
}
<#else>
<#-- ****Preparation cancelled (650)**** -->
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "650" >
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaProStatus_ExecutionflowCancelled.ftl">
}
<#else>
<#stop>
</#if>
<#stop>
</#if>
</#if>
</#if>
</#if>
<#else>
<#stop "PRO reference is empty">
</#if>
]
]
<#break>
<#case "D">
<#-- *********************************************** Action = DELETE ******************** -->
<#stop "event not supported (case D)">
<#stop >
<#break>
<#default>
<#stop "event not supported">
<#stop >
</#switch>

View File

@@ -1,11 +1,11 @@
<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
<#assign preparation_status_datetime = RfxDateTimetoUTC(preparationStatusInterface.preparation_status_datetime,time_zone_offset_rfx) />
<#assign preparation_status_datetime = RfxDateTimetoUTCWithTimezone(preparationStatusInterface.preparation_status_datetime,time_zone_rfx) />
[
{
{
"Header": {
"ProjectID": "${projectRP}"
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",

View File

@@ -1,10 +1,10 @@
<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
<#assign preparation_status_datetime = RfxDateTimetoUTC(preparationStatusInterface.preparation_status_datetime,time_zone_offset_rfx) />
<#assign preparation_status_datetime = RfxDateTimetoUTCWithTimezone(preparationStatusInterface.preparation_status_datetime,time_zone_rfx) />
[
{
{
"Header": {
"ProjectID": "${projectRP}"
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
@@ -13,8 +13,8 @@
"AuthorTimeZone": "${time_zone_rfx}"
}
},
"Payload": {}
}
]

View File

@@ -1,10 +1,10 @@
<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
<#assign preparation_status_datetime = RfxDateTimetoUTC(preparationStatusInterface.preparation_status_datetime,time_zone_offset_rfx) />
<#assign preparation_status_datetime = RfxDateTimetoUTCWithTimezone(preparationStatusInterface.preparation_status_datetime,time_zone_rfx) />
[
{
{
"Header": {
"ProjectID": "${projectRP}"
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
@@ -13,8 +13,8 @@
"AuthorTimeZone": "${time_zone_rfx}"
}
},
"Payload": {}
}
]

View File

@@ -1,10 +1,10 @@
<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
<#assign preparation_status_datetime = RfxDateTimetoUTC(preparationStatusInterface.preparation_status_datetime,time_zone_offset_rfx) />
<#assign preparation_status_datetime = RfxDateTimetoUTCWithTimezone(preparationStatusInterface.preparation_status_datetime,time_zone_rfx) />
[
{
{
"Header": {
"ProjectID": "${projectRP}"
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
@@ -13,8 +13,8 @@
"AuthorTimeZone": "${time_zone_rfx}"
}
},
"Payload": {}
}
]

View File

@@ -1,10 +1,10 @@
<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
<#assign preparation_status_datetime = RfxDateTimetoUTC(preparationStatusInterface.preparation_status_datetime,time_zone_offset_rfx) />
<#assign preparation_status_datetime = RfxDateTimetoUTCWithTimezone(preparationStatusInterface.preparation_status_datetime,time_zone_rfx) />
[
{
{
"Header": {
"ProjectID": "${projectRP}"
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
@@ -13,8 +13,8 @@
"AuthorTimeZone": "${time_zone_rfx}"
}
},
"Payload": {}
}
]

View File

@@ -3,7 +3,7 @@
<#-- project : projectId in ReflexPlatform -->
<#-- organisation : organisationtId in ReflexPlatform -->
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
<#assign organisationRP = organisation>
@@ -14,33 +14,33 @@
<#case "U">
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
[
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaSup_ActorCreated.ftl">
"datas" :
<#include "RFXtoRP_HsaSup_ActorCreated.ftl">
}
]
]
<#break>
<#case "D">
<#-- *********************************************** Action = DELETE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
[
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorDeleted>
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorDeleted>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaSup_ActorDeleted.ftl">
"datas" :
<#include "RFXtoRP_HsaSup_ActorDeleted.ftl">
}
]
]
<#break>
<#default>
<#stop "event not supported">
<#stop >
</#switch>

View File

@@ -1,54 +1,60 @@
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[
{
{
"Header": {
"ProjectID": "${projectRP}"
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${actor.code?trim?json_string}"
"RefID": "${RFXtoRPprefixSupplier(actor.code?trim?json_string)}"
},
"Payload": {
"Name": "${actor.designation?json_string}",
"ManagedStock": false,
"IsCarrier": false,
"IsCarrier": false,
<#-- ***Partner ID could be added here *** -->
<#-- "PartnerID": "${}", -->
<#--
<#include "RFXtoRP_HsaSup_ActorCreated_Metadata.ftl">,
-->
"Address":
{
<#-- if Reflex WMS address is structured -->
<#if actor.supplier_structured_address?? >
<#if actor.supplier_structured_address?? >
"Name": "${actor.supplier_structured_address.name_or_company?json_string}",
"StreetAddressOne" : "${actor.supplier_structured_address.street_and_PO?json_string}",
"StreetAddressTwo" : "${actor.supplier_structured_address.additionnal_data?json_string}",
"StreetAddressTwo" : "${actor.supplier_structured_address.additionnal_data?json_string}",
"PostalCode" : "${actor.supplier_structured_address.postal_code?json_string}",
"City" : "${actor.supplier_structured_address.post_code_area_name?json_string}",
"CountryCode" : "${actor.supplier_structured_address.country_code?json_string}",
<#assign isCountryCode = JsonUtil.isCountryCode(actor.supplier_structured_address.country_code?upper_case) />
<#if isCountryCode>
"CountryCode" : "${actor.supplier_structured_address.country_code?upper_case?json_string}",
<#else>
"CountryCode" : "",
</#if>
"ProvinceCode": "${actor.supplier_structured_address.territorial_div_code?json_string}",
"State": "${actor.supplier_structured_address.country_designation?json_string}"
<#-- if Reflex WMS address is not structured -->
<#else>
<#if actor.optional_attributes?? >
"Name": "${actor.optional_attributes.company_name?json_string}",
"StreetAddressOne" : "${actor.optional_attributes.address_1?json_string}",
"StreetAddressTwo" : "${actor.optional_attributes.address_2?json_string}",
"StreetAddressThree" : "${actor.optional_attributes.address_3?json_string}"
"StreetAddressThree" : "${actor.optional_attributes.address_3?json_string}",
"CountryCode" : ""
</#if>
</#if>
},
<#if actor.optional_attributes?? >
"Phones": ["${actor.optional_attributes.telephone?json_string}",
"Phones": ["${actor.optional_attributes.telephone?json_string}",
"${actor.optional_attributes.other_number?json_string}"
],
</#if>
"Typology": "TYPOLOGY_UNKNOWN"
}
}
}
]

View File

@@ -1,12 +1,14 @@
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[
{
{
"Header": {
"ProjectID": "${projectRP}"
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${actor.code?trim?json_string}"
"RefID": "${RFXtoRPprefixSupplier(actor.code?trim?json_string)}"
},
"Payload": {}
}
}
]

40
RFXtoRP_HsrCarrierApt.ftl Normal file
View File

@@ -0,0 +1,40 @@
<#-- **** input parameters ***** -->
<#-- input : message RFX -->
<#-- project : projectId in ReflexPlatform -->
<#-- organisation : organisationtId in ReflexPlatform -->
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
<#assign organisationRP = organisation>
<#assign aDateTime = .now>
<#stop>
<#switch cloudEventMsg.action>
<#case "C">
<#case "U">
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
[
{
}
]
<#break>
<#case "D">
<#-- *********************************************** Action = DELETE *************************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
[
{
}
]
<#break>
<#default>
<#stop >
</#switch>

View File

@@ -3,7 +3,7 @@
<#-- project : projectId in ReflexPlatform -->
<#-- organisation : organisationtId in ReflexPlatform -->
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
<#assign organisationRP = organisation>
@@ -14,33 +14,33 @@
<#case "U">
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
[
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrDepot_ActorCreated.ftl">
"datas" :
<#include "RFXtoRP_HsrDepot_ActorCreated.ftl">
}
]
]
<#break>
<#case "D">
<#-- *********************************************** Action = DELETE *************************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
[
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorDeleted>
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorDeleted>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrDepot_ActorDeleted.ftl">
"datas" :
<#include "RFXtoRP_HsrDepot_ActorDeleted.ftl">
}
]
]
<#break>
<#default>
<#stop "event not supported">
<#stop >
</#switch>

View File

@@ -1,50 +1,61 @@
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[
{
{
"Header": {
"ProjectID": "${projectRP}"
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${depot.physical_depot_code?trim?json_string}"
"RefID": "${RFXtoRPprefixDepot(depot.physical_depot_code?trim?json_string)}"
},
"Payload": {
"Name": "${depot.physical_depot_designation?json_string}",
"ManagedStock": true,
"IsCarrier": false,
<#-- ***Partner ID could be added here *** -->
<#-- "PartnerID": "${}", -->
<#--
<#include "RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl">,
-->
"Address":
{
<#-- if Reflex WMS address is structured -->
<#if depot.physical_depot_structured_address?? >
<#if depot.physical_depot_structured_address?? >
"Name": "${depot.physical_depot_structured_address.name_or_company?json_string}",
"StreetAddressOne" : "${depot.physical_depot_structured_address.street_and_PO?json_string}",
"StreetAddressTwo" : "${depot.physical_depot_structured_address.additionnal_data?json_string}",
"StreetAddressTwo" : "${depot.physical_depot_structured_address.additionnal_data?json_string}",
"PostalCode" : "${depot.physical_depot_structured_address.postal_code?json_string}",
"City" : "${depot.physical_depot_structured_address.post_code_area_name?json_string}",
"CountryCode" : "${depot.physical_depot_structured_address.country_code?json_string}",
<#assign isCountryCode = JsonUtil.isCountryCode(depot.physical_depot_structured_address.country_code?upper_case) />
<#if isCountryCode >
"CountryCode" : "${depot.physical_depot_structured_address.country_code?upper_case?json_string}",
<#else>
"CountryCode" : "",
</#if>
"ProvinceCode": "${depot.physical_depot_structured_address.territorial_div_code?json_string}",
"State": "${depot.physical_depot_structured_address.country_designation?json_string}"
<#-- if Reflex WMS address is not structured -->
<#else>
<#if depot.physical_depot_address??>
"Name": "${depot.physical_depot_address.company_name?json_string}",
"StreetAddressOne" : "${depot.physical_depot_address.address_1?json_string}",
"StreetAddressTwo" : "${depot.physical_depot_address.address_2?json_string}",
"StreetAddressThree" : "${depot.physical_depot_address.address_3?json_string}"
"StreetAddressThree" : "${depot.physical_depot_address.address_3?json_string}",
"CountryCode" : ""
</#if>
</#if>
},
"Phones": ["${depot.physical_depot_address.telephone?json_string}",
"${depot.physical_depot_address.other_number?json_string}"
],
<#if depot.physical_depot_address??>
"Phones": ["${depot.physical_depot_address.telephone?json_string}",
"${depot.physical_depot_address.other_number?json_string}"
],
</#if>
"Typology": "TYPOLOGY_UNKNOWN"
}
}
}
]

View File

@@ -1,12 +1,14 @@
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[
{
{
"Header": {
"ProjectID": "${projectRP}"
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${depot.physical_depot_code?trim?json_string}"
"RefID": "${RFXtoRPprefixDepot(depot.physical_depot_code?trim?json_string)}"
},
"Payload": {}
}
}
]

40
RFXtoRP_HsrLoadInfo.ftl Normal file
View File

@@ -0,0 +1,40 @@
<#-- **** input parameters ***** -->
<#-- input : message RFX -->
<#-- project : projectId in ReflexPlatform -->
<#-- organisation : organisationtId in ReflexPlatform -->
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
<#assign organisationRP = organisation>
<#assign aDateTime = .now>
<#stop>
<#switch cloudEventMsg.action>
<#case "C">
<#case "U">
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
[
{
}
]
<#break>
<#case "D">
<#-- *********************************************** Action = DELETE *************************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
[
{
}
]
<#break>
<#default>
<#stop >
</#switch>

View File

@@ -2,59 +2,109 @@
<#-- input : message RFX -->
<#-- project : projectId in ReflexPlatform -->
<#-- organisation : organisationtId in ReflexPlatform -->
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#include "ReflexUtils.ftl">
<#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 preparationOrder = JsonUtil.jsonToMap(dataRfx)>
<#if preparationOrder.total_lv_validated !=0>
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsPrepared>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_GoodsPrepared.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl">
}
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list??) as preparation_line>
<#list preparation_line.despatched_ipg_list as despatched_ipg>
<#if despatched_ipg.consignment_unit_id != "">
,
<#assign preparationOrder = JsonUtil.jsonToMap(dataRfx)>
<#if preparationOrder.total_lv_validated !=0>
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled>
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsPrepared>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl">
"datas" :
<#include "RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl">
}
</#if>
<#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="">
,
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCarrierUpdated>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_CarrierUpdated.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.OrderCarrierUpdated>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl">
}
</#if>
<#assign refIDHmap ={}>
<#assign hd_numberHmap ={}>
<#assign hd_numberHmapHUadded ={}>
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") as preparation_line>
<#list preparation_line.despatched_ipg_list as despatched_ipg>
<#assign HUadded_packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) />
<#if !hd_numberHmap[despatched_ipg.hd_number]?? >
<#assign hd_numberHmap += {despatched_ipg.hd_number,despatched_ipg.hd_number}>
,
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl">
}
</#if>
<#if despatched_ipg.carton_number != "000000000000000000" && despatched_ipg.carton_number!=despatched_ipg.hd_number >
,
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitHUsAdded>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_HandlingunitHUsAdded.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl">
}
<#if !hd_numberHmapHUadded[despatched_ipg.hd_number]??>
<#assign hd_numberHmapHUadded += {despatched_ipg.hd_number,despatched_ipg.hd_number}>
,
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPrepa_HUsAdded_TrackingHuLabelled.ftl">
}
</#if>
</#if>
</#list>
</#list>
</#list>
]
<#else>
<#stop "no confirmed quantity for the preparation - preparation closed">
</#if>
<#assign refIDHmap ={}>
]
<#else>
<#stop "no confirmed quantity for the preparation - preparation closed">
</#if>
<#break>
<#case "D">
<#-- *********************************************** Action = DELETE ******************** -->
<#stop "event not supported (Case D)">
<#stop>
<#break>
<#default>
<#stop "event not supported">
<#stop>
</#switch>

View File

@@ -0,0 +1,34 @@
<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
<#include "ActorPrefix.ftl">
[
<#assign refIDHmap_local ={}>
<#list preparationOrder.preparation_line_lst?filter(l ->l.preparation_order_originator_reference!="") as preparation_line>
<#assign OrderOriginReference = preparation_line.preparation_order_originator_reference?trim?json_string>
<#if !refIDHmap_local[OrderOriginReference]?? >
<#if refIDHmap_local?size != 0 >
,
</#if>
<#assign refIDHmap_local +={OrderOriginReference,OrderOriginReference}>
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID":{
"RefID": "${OrderOriginReference}"
},
"Payload":{
"Carrier": {
"ActorID": "${RFXtoRPprefixCarrier(preparationOrder.load_data.carrier_code?trim?json_string)}"
}
<#-- Add transport grade code
<#if preparationOrder.transport_grade_code!="">
,
"CarrierService":"${preparationOrder.transport_grade_code?trim?json_string}"
</#if> -->
}
}
</#if>
</#list>
<#assign refIDHmap_local ={}>
]

View File

@@ -1,89 +0,0 @@
<#include "HfRpConfig.ftl">
[
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list??) as preparation_line>
<#list preparation_line.despatched_ipg_list as despatched_ipg>
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID": {
<#if despatched_ipg.carton_number != "000000000000000000">
"RefID": "${despatched_ipg.carton_number}"
<#else>
"RefID": "${despatched_ipg.hd_number}"
</#if>
},
"Payload": {
"Information" :{
<#if despatched_ipg.carton_number != "000000000000000000">
"ContainerType": "${despatched_ipg.carton_type_code}"
<#else>
"ContainerType": "${despatched_ipg.hd_type_code}"
</#if>
},
<#-- HU Metadata inclusin inclusion -->
<#include "RFXtoRP_HsrPrepa_GoodsPrepared_HandlingUnitMetadata.ftl">
,
"PreparedContents" :[
{
"Goods": {
"ItemID": "${preparation_line.item_code?trim?json_string}",
"LVBranchID": "${preparation_line.item_lv_code?json_string}",
<#if (despatched_ipg.ipg_manufacture_date?length != 0) && (despatched_ipg.ipg_manufacture_date?starts_with("00") == false)>
<#assign priority_date = despatched_ipg.ipg_manufacture_date?datetime(rfx_date_format_default)?iso_utc />
"PriorityDate": "${priority_date}",
<#else>
<#if (despatched_ipg.ipg_receipt_date?length != 0) && (despatched_ipg.ipg_receipt_date?starts_with("00")== false)>
<#assign priority_date = despatched_ipg.ipg_receipt_date?datetime(rfx_date_format_default)?iso_utc />
"PriorityDate": "${priority_date}",
<#else>
<#if (despatched_ipg.ipg_best_before_date?length != 0) && (despatched_ipg.ipg_best_before_date?starts_with("00")== false)>
<#assign priority_date = despatched_ipg.ipg_best_before_date?datetime(rfx_date_format_default)?iso_utc />
"PriorityDate": "${priority_date}",
<#else>
<#if (despatched_ipg.ipg_sell_by_date?length != 0) && (despatched_ipg.ipg_sell_by_date?starts_with("00")== false)>
<#assign priority_date = despatched_ipg.ipg_sell_by_date?datetime(rfx_date_format_default)?iso_utc />
"PriorityDate": "${priority_date}",
<#else>
<#if (despatched_ipg.ipg_use_by_date?length != 0) && (despatched_ipg.ipg_use_by_date?starts_with("00")== false)>
<#assign priority_date = despatched_ipg.ipg_use_by_date?datetime(rfx_date_format_default)?iso_utc />
"PriorityDate": "${priority_date}",
<#else>
<#if (preparationOrder.stock_despatch_at_preparation_datetime?length != 0) && (preparationOrder.stock_despatch_at_preparation_datetime?starts_with("00")== false)>
<#assign priority_date = preparationOrder.stock_despatch_at_preparation_datetime?datetime(rfx_date_format_default)?iso_utc />
"PriorityDate": "${priority_date}",
<#else>
"PriorityDate": "1970-01-01T00:00:00Z",
</#if>
</#if>
</#if>
</#if>
</#if>
</#if>
<#-- Segmentation Keys inclusion -->
<#include "RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl">
},
"ExecutionflowID": "${preparation_line.preparation_order_originator_reference?trim?json_string}",
<#if (preparation_line.pro_originator_reference_line_number!0) != 0>
"LineID": "${preparation_line.pro_originator_reference_line_number}",
<#else>
"LineID": "${preparation_line.pro_line_number!0}",
</#if>
"ActorID": "${preparationOrder.physical_depot_code?trim?json_string}",
"Quantity": {
"LVID": "${quantity_in_base_lv_RP_Cst}",
"Value": ${despatched_ipg.quantity_lvs}
}
}
]
}
}<#sep>,</#sep>
</#list>
<#sep>,</#sep>
</#list>
]

View File

@@ -2,8 +2,6 @@
<#--
"MetaData" :[
]
]
-->
"MetaData": [ ]

View File

@@ -15,7 +15,7 @@
"Value": { "String" : "no batch"}
<#else>
"Value": { "String" : "${despatched_ipg.batch_number}"}
</#if>
</#if>
},
{
"Key": "HeldForSpecificCode",
@@ -24,15 +24,14 @@
<#else>
"Value": { "Bool" : "False"}
},
{
<#assign manufacturing_date = despatched_ipg.ipg_manufacture_date?datetime(rfx_date_format_default)?iso_utc />
<#assign manufacturing_date = despatched_ipg.ipg_manufacture_date?datetime(rfx_date_format_default)?iso_utc />
"Key": "ManufacturingDate",
"Value": "Timestamp": {
"AuthorTimeZone": "${time_zone_rfx}",
"DateTime": "${manufacturing_date}"
}
}
}
]

View File

@@ -0,0 +1,29 @@
<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
[
<#assign dispatched3_datetime = RfxDateTimetoUTCWithTimezone(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_rfx) />
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list??) as preparation_line3>
<#list preparation_line3.despatched_ipg_list?filter(j ->j.carton_number!="000000000000000000") as despatched_ipg3>
<#if !refIDHmap[despatched_ipg3.carton_number]?? >
<#if refIDHmap?size != 0 >
,
</#if>
<#assign refIDHmap += {despatched_ipg3.carton_number,despatched_ipg3.carton_number}>
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${despatched_ipg3.carton_number}",
"RefDate": {
"DateTime": "${dispatched3_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"
}
},
"Payload": { }
}
</#if>
</#list>
</#list>
]

View File

@@ -0,0 +1,9 @@
<#-- use protobuf of class HsrPrepa to find Reflex WMS fields names -->
<#--
"MetaData" :[
]
-->
"MetaData": [ ]

View File

@@ -0,0 +1,27 @@
<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
<#include "ActorPrefix.ftl">
[
<#assign dispatched_datetime5 = RfxDateTimetoUTCWithTimezone(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_rfx) />
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID": {
"RefID":"${despatched_ipg.hd_number}",
"RefDate": {
"DateTime": "${dispatched_datetime5}",
"AuthorTimeZone": "${time_zone_rfx}"
}
},
"Payload": {
"HandlingunitID": "${despatched_ipg.hd_number}"
<#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" >
,
"HUCarrier":{
"ActorID": "${RFXtoRPprefixCarrier(preparationOrder.load_data.carrier_code?trim?json_string)}"
}
</#if>
}
}
]

View File

@@ -1,27 +1,28 @@
<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
[
<#assign dispatched_datetime = RfxDateTimetoUTC(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_offset_rfx) />
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list??) as preparation_line>
<#assign dispatched_datetime = RfxDateTimetoUTCWithTimezone(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_rfx) />
<#assign refIDHmap_local ={}>
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") as preparation_line>
<#list preparation_line.despatched_ipg_list as despatched_ipg>
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID": {
<#if despatched_ipg.carton_number != "000000000000000000">
"RefID": "${despatched_ipg.carton_number}",
<#else>
"RefID": "${despatched_ipg.hd_number}",
<#if !refIDHmap_local[despatched_ipg.hd_number]?? >
<#if refIDHmap_local?size != 0 >
,
</#if>
<#assign refIDHmap_local +={despatched_ipg.hd_number,despatched_ipg.hd_number}>
{
"Header": {"ProjectID": "${projectRP}"},
"ID": {
"RefID": "${despatched_ipg.hd_number}",
"RefDate": {
"DateTime": "${dispatched_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"
}
},
"Payload": { }
}
</#if>
"RefDate": {
"DateTime": "${dispatched_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"
}
},
"Payload": { }
}<#sep>,</#sep>
</#list>
<#sep>,</#sep>
</#list>
</#list>
</#list>
<#assign refIDHmap_local ={}>
]

View File

@@ -0,0 +1,134 @@
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") as preparation_line>
<#list preparation_line.despatched_ipg_list as despatched_ipg>
<#assign packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) />
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID": {
"RefDate": {
"AuthorTimeZone": "${time_zone_rfx}",
"DateTime": "${packing_datetime}"
},
<#if despatched_ipg.carton_number != "000000000000000000">
"RefID": "${despatched_ipg.carton_number}"
<#else>
"RefID": "${despatched_ipg.hd_number}"
</#if>
},
"Payload": {
"Information" :{
<#if despatched_ipg.carton_number != "000000000000000000">
"ContainerType": "${despatched_ipg.carton_type_code?json_string}"
<#if preparation_line.despatched_cartons_list?? >
<#list preparation_line.despatched_cartons_list?filter(l -> l?? && l.carton_number==despatched_ipg.carton_number) as dimensionCarton>
,
"Length": {
"Unit": "${length_unit_rfx}",
"Value": "${dimensionCarton.overall_depth}"
},
"Weight": {
"Unit": "${weight_unit_rfx}",
"Value": "${dimensionCarton.carton_gross_weight}"
},
"Height": {
"Unit": "${length_unit_rfx}",
"Value": "${dimensionCarton.overall_height}"
},
"Width": {
"Unit": "${length_unit_rfx}",
"Value": "${dimensionCarton.overall_width}"
}
</#list>
</#if>
<#else>
"ContainerType": "${despatched_ipg.hd_type_code?json_string}"
<#if preparation_line.despatched_hds_list??>
<#list preparation_line.despatched_hds_list?filter(j -> j?? && j.handling_device_number==despatched_ipg.hd_number) as dimensionHU>
,
"Length": {
"Unit": "${length_unit_rfx}",
"Value": "${dimensionHU.hd_type_depth}"
},
"Weight": {
"Unit": "${weight_unit_rfx}",
"Value": "${dimensionHU.hd_gross_weight}"
},
"Width": {
"Unit": "${length_unit_rfx}",
"Value": "${dimensionHU.hd_type_width}"
}
</#list>
</#if>
</#if>
},
<#-- HU Metadata inclusin inclusion -->
<#include "RFXtoRP_HsrPrepa_GoodsPrepared_HandlingUnitMetadata.ftl">
,
"PreparedContents" :[
{
"Goods": {
"ItemID": "${preparation_line.item_code?trim?json_string}",
"LVBranchID": "${preparation_line.item_lv_code?json_string}",
<#if (despatched_ipg.ipg_use_by_date?length != 0) && (despatched_ipg.ipg_use_by_date?starts_with("00")== false)>
<#assign priority_date = despatched_ipg.ipg_use_by_date?datetime(rfx_date_format_default)?iso_utc />
"PriorityDate": "${priority_date}",
<#else>
<#if (despatched_ipg.ipg_best_before_date?length != 0) && (despatched_ipg.ipg_best_before_date?starts_with("00")== false)>
<#assign priority_date = despatched_ipg.ipg_best_before_date?datetime(rfx_date_format_default)?iso_utc />
"PriorityDate": "${priority_date}",
<#else>
<#if (despatched_ipg.ipg_sell_by_date?length != 0) && (despatched_ipg.ipg_sell_by_date?starts_with("00")== false)>
<#assign priority_date = despatched_ipg.ipg_sell_by_date?datetime(rfx_date_format_default)?iso_utc />
"PriorityDate": "${priority_date}",
<#else>
<#if (despatched_ipg.ipg_manufacture_date?length != 0) && (despatched_ipg.ipg_manufacture_date?starts_with("00") == false)>
<#assign priority_date = despatched_ipg.ipg_manufacture_date?datetime(rfx_date_format_default)?iso_utc />
"PriorityDate": "${priority_date}",
<#else>
<#if (despatched_ipg.ipg_receipt_date?length != 0) && (despatched_ipg.ipg_receipt_date?starts_with("00")== false)>
<#assign priority_date = despatched_ipg.ipg_receipt_date?datetime(rfx_date_format_default)?iso_utc />
"PriorityDate": "${priority_date}",
<#else>
<#if (preparationOrder.stock_despatch_at_preparation_datetime?length != 0) && (preparationOrder.stock_despatch_at_preparation_datetime?starts_with("00")== false)>
<#assign priority_date = preparationOrder.stock_despatch_at_preparation_datetime?datetime(rfx_date_format_default)?iso_utc />
"PriorityDate": "${priority_date}",
<#else>
"PriorityDate": "1970-01-01T00:00:00Z",
</#if>
</#if>
</#if>
</#if>
</#if>
</#if>
<#-- Segmentation Keys inclusion -->
<#include "RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl">
},
"ExecutionflowID": "${preparation_line.preparation_order_originator_reference?trim?json_string}",
<#if (preparation_line.pro_originator_reference_line_number!0) != 0>
"LineID": "${preparation_line.pro_originator_reference_line_number}",
<#else>
"LineID": "${preparation_line.pro_line_number!0}",
</#if>
"ActorID": "${RFXtoRPprefixDepot(preparationOrder.physical_depot_code?trim?json_string)}",
"Quantity": {
"LVID": "${quantity_in_base_lv_RP_Cst}",
"Value": ${despatched_ipg.quantity_lvs}
}
}
]
}
}<#sep>,</#sep>
</#list>
<#sep>,</#sep>
</#list>
]

View File

@@ -0,0 +1,43 @@
<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
[
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID": {
"RefDate": {
"AuthorTimeZone": "${time_zone_rfx}",
"DateTime": "${HUadded_packing_datetime}"
},
"RefID": "${despatched_ipg.hd_number}"
},
"Payload": {
"IncludedHandlingunitIDs": [ "${despatched_ipg.carton_number}" ]
<#if preparation_line.despatched_hds_list?? && preparation_line.despatched_hds_list[0]??>
,
"Information": {
"ContainerType": "${preparation_line.despatched_hds_list[0].hd_type_code}",
"Length": {
"Unit": "${length_unit_rfx}",
"Value": ${preparation_line.despatched_hds_list[0].hd_type_depth}
},
"Weight": {
"Unit": "${weight_unit_rfx}",
"Value": ${preparation_line.despatched_hds_list[0].hd_gross_weight}
},
"Width": {
"Unit": "${length_unit_rfx}",
"Value": ${preparation_line.despatched_hds_list[0].hd_type_width}
}
}
</#if>,
<#-- HU Metadata inclusin inclusion -->
<#include "RFXtoRP_HsrPrepa_HUsAdded_Metadata.ftl">
}
}
]

View File

@@ -0,0 +1,29 @@
<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
<#include "ActorPrefix.ftl">
[
<#assign refIDHmap_local ={}>
<#list preparationOrder.preparation_line_lst?filter(l ->l.preparation_order_originator_reference!="") as preparation_line>
<#assign OrderOriginReference = preparation_line.preparation_order_originator_reference?trim?json_string>
<#if !refIDHmap_local[OrderOriginReference]?? >
<#if refIDHmap_local?size != 0 >
,
</#if>
<#assign refIDHmap_local +={OrderOriginReference,OrderOriginReference}>
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID":{
"RefID": "${OrderOriginReference}"
},
"Payload":{
"Carrier": {
"ActorID": "${RFXtoRPprefixCarrier(preparationOrder.load_data.carrier_code?trim?json_string)}"
}
}
}
</#if>
</#list>
<#assign refIDHmap_local ={}>
]

View File

@@ -1,20 +1,40 @@
<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
<#include "ActorPrefix.ftl">
[
{
<#assign dispatched_datetime4 = RfxDateTimetoUTCWithTimezone(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_rfx) />
{
"Header": {
"ProjectID": "${projectRP}"
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${despatched_ipg.consignment_unit_id?trim?json_string}"
<#if despatched_ipg.consignment_unit_id!="">
"RefID": "${despatched_ipg.consignment_unit_id?trim?json_string}",
<#else>
<#if despatched_ipg.carton_number != "000000000000000000">
"RefID":"${despatched_ipg.carton_number}",
<#else>
"RefID":"${despatched_ipg.hd_number}",
</#if>
</#if>
"RefDate": {
"DateTime": "${dispatched_datetime4}",
"AuthorTimeZone": "${time_zone_rfx}"
}
},
"Payload": {
<#if despatched_ipg.carton_number != "000000000000000000">
<#if despatched_ipg.carton_number != "000000000000000000">
"HandlingunitID": "${despatched_ipg.carton_number}"
<#else>
"HandlingunitID": "${despatched_ipg.hd_number}"
</#if>
<#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" >
,
"HUCarrier":{
"ActorID": "${RFXtoRPprefixCarrier(preparationOrder.load_data.carrier_code?trim?json_string)}"
}
</#if>
}
}
]
]

View File

@@ -3,7 +3,7 @@
<#-- project : projectId in ReflexPlatform -->
<#-- organisation : organisationtId in ReflexPlatform -->
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
<#assign organisationRP = organisation>
@@ -14,49 +14,55 @@
<#case "U">
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
[
{
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
<#-- check preparation type code (internal order and reservation are ignored) -->
<#if preparation_order.preparation_type_code == "010" || preparation_order.preparation_type_code == "030">
<#-- Only if preparation order not confirmed -->
<#if preparation_order.preparation_order_confirmed == "false" >
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl">
<#else>
<#stop "preparation order already confirmed">
</#if>
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
[
<#else>
<#stop "preparation order type not supported">
</#if>
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
<#-- check preparation type code (internal order and reservation are ignored) -->
<#if preparation_order.preparation_type_code == "010" || preparation_order.preparation_type_code == "030">
<#-- Only if preparation order not confirmed -->
<#if preparation_order.preparation_order_confirmed == "false" >
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl">
}
<#else>
<#-- preparation order already confirmed -->
<#stop>
</#if>
<#else>
<#-- preparation order type not supported -->
<#stop>
</#if>
<#else>
<#stop "PRO reference is empty">
</#if>
}
]
]
<#break>
<#case "D">
<#-- *********************************************** Action = DELETE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
[
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrPro_ExecutionflowCancelled.ftl">
}
]
"datas" :
<#include "RFXtoRP_HsrPro_ExecutionflowCancelled.ftl">
}
<#else>
<#stop "PRO reference is empty">
</#if>
]
<#break>
<#default>
<#stop "event not supported">
<#stop >
</#switch>

View File

@@ -1,10 +1,10 @@
<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
<#assign preparation_status_datetime = RfxDateTimetoUTC(preparation_order.modification_datetime,time_zone_offset_rfx) />
<#assign preparation_status_datetime = RfxDateTimetoUTCWithTimezone(preparation_order.modification_datetime,time_zone_rfx) />
[
{
{
"Header": {
"ProjectID": "${projectRP}"
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${preparation_order.originator_reference?trim?json_string}",

View File

@@ -1,124 +1,126 @@
<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
<#include "ActorPrefix.ftl">
[
{
<#assign planned_final_delivery_start_datetime = RfxDateTimetoUTC(preparation_order.planned_final_delivery_start_datetime,time_zone_offset_rfx) />
<#assign pro_creation_datetime = RfxDateTimetoUTC(preparation_order.creation_datetime,time_zone_offset_rfx) />
{
<#assign planned_final_delivery_start_datetime = RfxDateTimetoUTCWithTimezone(preparation_order.planned_final_delivery_start_datetime,time_zone_rfx) />
<#assign pro_creation_datetime = RfxDateTimetoUTCWithTimezone(preparation_order.creation_datetime,time_zone_rfx) />
"Header": {
"ProjectID": "${projectRP}"
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${preparation_order.originator_reference?trim?json_string}",
"RefDate": {
"DateTime": "${pro_creation_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"
"AuthorTimeZone": "${time_zone_rfx}"
}
},
"Payload": {
"CreationDateTime": {
"DateTime": "${pro_creation_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"
},
"AuthorTimeZone": "${time_zone_rfx}"
},
<#-- Header Metadata inclusion -->
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_HeaderMetadata.ftl">,
<#-- Add transport grade code
<#-- Add transport grade code
<#if preparation_order.transport_grade_code!="">
"CarrierService":"${preparation_order.transport_grade_code?trim?json_string}",
</#if> -->
"ShipFrom": {
"ActorID": "${preparation_order.physical_depot_code?trim?json_string}"
"ShipFrom": {
"ActorID": "${RFXtoRPprefixDepot(preparation_order.physical_depot_code?trim?json_string)}"
},
"ShipFromAcked": true,
"ShipFromAcked": true,
"ShipTo": {
<#if
<#-- preparation_order.address.type_code == "" &&
preparation_order.address.title_code == "" &&
preparation_order.address.first_name == "" &&
preparation_order.address.last_name == "" &&
preparation_order.address.mail_address == "" &&
preparation_order.address.contact_type_code == "" &&
preparation_order.address.mobile_phone_number == "" &&
preparation_order.address.land_line_phone_number == "" &&
<#if
<#-- preparation_order.address.type_code == "" &&
preparation_order.address.title_code == "" &&
preparation_order.address.first_name == "" &&
preparation_order.address.last_name == "" &&
preparation_order.address.mail_address == "" &&
preparation_order.address.contact_type_code == "" &&
preparation_order.address.mobile_phone_number == "" &&
preparation_order.address.land_line_phone_number == "" &&
preparation_order.address.fax_number == "" && -->
preparation_order.address.address_type_code == "" &&
preparation_order.address.name_or_company_name == "" &&
preparation_order.address.additional_address_data_1 == "" &&
preparation_order.address.additional_address_data_2 == "" &&
preparation_order.address.post_code_area_name == "" &&
preparation_order.address.territorial_division_code == "" &&
preparation_order.address.postal_code == "" &&
preparation_order.address.iso_country_code == "">
"ActorID": "${preparation_order.end_consignee_code}"
<#else>
"Actor":
{
"Name" : "${preparation_order.address.name_or_company_name?json_string!""}",
preparation_order.address.address_type_code == "" &&
preparation_order.address.name_or_company_name == "" &&
preparation_order.address.additional_address_data_1 == "" &&
preparation_order.address.additional_address_data_2 == "" &&
preparation_order.address.post_code_area_name == "" &&
preparation_order.address.territorial_division_code == "" &&
preparation_order.address.postal_code == "" &&
preparation_order.address.iso_country_code == "">
"ActorID": "${RFXtoRPprefixConsignee(preparation_order.end_consignee_code?json_string)}"
<#else>
"Actor":
{
"Name" : "${(preparation_order.address.name_or_company_name!"")?json_string}",
"Address" :
{
"City" : "${preparation_order.address.post_code_area_name?json_string!""}",
"CountryCode" : "${preparation_order.address.iso_country_code!""}",
"PostalCode" : "${preparation_order.address.postal_code!""}",
"StreetAddressOne" : "${preparation_order.address.street_and_number_and_po_box?json_string!""}",
"StreetAddressTwo" : "${preparation_order.address.additional_address_data_1?json_string!""}",
"StreetAddressThree" : "${preparation_order.address.additional_address_data_2?json_string!""}"
"City" : "${(preparation_order.address.post_code_area_name!"")?json_string}",
<#assign isCountryCode = JsonUtil.isCountryCode(preparation_order.address.iso_country_code?upper_case) />
<#if isCountryCode>
"CountryCode" : "${(preparation_order.address.iso_country_code!"")?json_string}",
<#else>
"CountryCode" : "",
</#if>
"PostalCode" : "${(preparation_order.address.postal_code!"")?json_string}",
"StreetAddressOne" : "${(preparation_order.address.street_and_number_and_po_box!"")?json_string}",
"StreetAddressTwo" : "${(preparation_order.address.additional_address_data_1!"")?json_string}",
"StreetAddressThree" : "${(preparation_order.address.additional_address_data_2!"")?json_string}"
}
},
"Contact" :
"Contact" :
{
"FirstName" : "${preparation_order.address.first_name?json_string!""}",
"LastName" : "${preparation_order.address.last_name?json_string!""}",
"Emails" : ${splitEmailsIntoArray(preparation_order.address.mail_address!""?json_string)},
"Phones" : ["${preparation_order.address.mobile_phone_number?json_string!""}","${preparation_order.address.land_line_phone_number?json_string!""}", "${preparation_order.address.fax_number?json_string!""}" ]
}
</#if>
"FirstName" : "${(preparation_order.address.first_name!"")?json_string}",
"LastName" : "${(preparation_order.address.last_name!"")?json_string}",
"Emails" : ${splitEmailsIntoArray((preparation_order.address.mail_address!"")?json_string)},
"Phones" : ["${(preparation_order.address.mobile_phone_number!"")?json_string}","${(preparation_order.address.land_line_phone_number!"")?json_string}", "${(preparation_order.address.fax_number!"")?json_string}" ]
}
</#if>
},
<#if preparation_order.line_list??>
<#if preparation_order.line_list??>
"Lines" : [
<#list preparation_order.line_list as preparation_order_line >
{
<#if (preparation_order_line.originator_reference_line_number!0) != 0>
{
<#if (preparation_order_line.originator_reference_line_number!0) != 0>
"LineID": "${preparation_order_line.originator_reference_line_number}",
<#else>
"LineID": "${preparation_order_line.preparation_order_line_number!0}",
</#if>
<#-- Line Metadata inclusion -->
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_LineMetadata.ftl">,
"RequestedContent":
{
"Goods":
"RequestedContent":
{
"Goods":
{
"ItemID": "${preparation_order_line.item_code?trim?json_string!"0"}",
"LVBranchID": "${preparation_order_line.item_lv_code?json_string!"0"}",
<#if (preparation_order_line.optional_attributes.forced_priority_date?length != 0) && (preparation_order_line.optional_attributes.forced_priority_date?starts_with("00") == false)>
<#assign forced_priority_date = preparation_order_line.optional_attributes.forced_priority_date?datetime(rfx_date_format_default)?iso_utc />
"PriorityDate": "${forced_priority_date}",
<#assign forced_priority_date = preparation_order_line.optional_attributes.forced_priority_date?datetime(rfx_date_format_default)?iso_utc />
"PriorityDate": "${forced_priority_date}",
</#if>
<#-- Segmentation Keys inclusion -->
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_SegmentationKeys.ftl">
},
"Quantity" :
"Quantity" :
{
"LVID": "${quantity_in_base_lv_RP_Cst}",
"Value": "${preparation_order_line.base_lv_quantity_to_prepare!0}"
"Value": "${preparation_order_line.base_lv_quantity_to_prepare!0}"
}
}
}<#sep>,</#sep>
</#list>
</#list>
],
</#if>
"RequestedMilestones" :
{
"RequestedDeliveryDateTime" :
"RequestedDeliveryDateTime" :
{
"DateTime": "${planned_final_delivery_start_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"
}
}
"DateTime": "${planned_final_delivery_start_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"
}
}
}
}
]

View File

@@ -3,7 +3,7 @@
<#-- project : projectId in ReflexPlatform -->
<#-- organisation : organisationtId in ReflexPlatform -->
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
<#assign organisationRP = organisation>
@@ -12,86 +12,92 @@
<#switch cloudEventMsg.action>
<#case "C">
<#-- *********************************************** Action = CREATE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
<#if receipt.receipt_reference ?? && receipt.receipt_reference!="">
<#if receipt.receipt_type = "030">
<#stop "ignored message because receipt type = transfert">
<#else>
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
}
]
</#if>
<#if receipt.receipt_type = "030">
<#stop "ignored message because receipt type = transfert">
<#else>
<#stop "Receipt reference is empty">
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
}
]
</#if>
<#else>
<#stop "Receipt reference is empty">
</#if>
<#break>
<#case "U">
<#-- *********************************************** Action = UPDATE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
[
<#if receipt.receipt_confirmed == "true" >
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ReceiptCompleted>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_ReceiptCompleted.ftl">
}
<#else>
<#if receipt.receipt_type = "030">
<#stop "ignored message because receipt type = transfert">
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
[
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
<#if receipt.receipt_confirmed == "true" >
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl">
}
<#else>
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
}
<#if receipt.receipt_type = "030">
<#stop "ignored message because receipt type = transfert">
<#else>
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
}
</#if>
</#if>
<#else>
<#stop "Receipt reference is empty">
</#if>
</#if>
]
]
<#break>
<#case "D">
<#-- *********************************************** Action = DELETE ******************** -->
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
[
{
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
[
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl">
}
]
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl">
}
<#else>
<#stop "Receipt reference is empty">
</#if>
]
<#break>
<#default>
<#stop "event not supported">
<#stop >
</#switch>

View File

@@ -1,11 +1,11 @@
<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
<#assign receipt_status_datetime = RfxDateTimetoUTC(receipt.modification_datetime,time_zone_offset_rfx) />
<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.modification_datetime,time_zone_rfx) />
[
{
{
"Header": {
"ProjectID": "${projectRP}"
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${receipt.receipt_reference?trim?json_string}",

View File

@@ -1,87 +1,93 @@
<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
<#include "ActorPrefix.ftl">
[
{
<#assign receipt_datetime = RfxDateTimetoUTC(receipt.receipt_datetime,time_zone_offset_rfx) />
<#assign receipt_creation_datetime = RfxDateTimetoUTC(receipt.creation_datetime,time_zone_offset_rfx) />
{
<#assign receipt_datetime = RfxDateTimetoUTCWithTimezone(receipt.receipt_datetime,time_zone_rfx) />
<#assign receipt_creation_datetime = RfxDateTimetoUTCWithTimezone(receipt.creation_datetime,time_zone_rfx) />
"Header": {
"ProjectID": "${projectRP}"
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${receipt.receipt_reference?trim?json_string}",
"RefDate": {
"DateTime": "${receipt_creation_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"
"AuthorTimeZone": "${time_zone_rfx}"
}
},
"Payload": {
"CreationDateTime": {
"DateTime": "${receipt_creation_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"
},
},
<#-- Header Metadata inclusion -->
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl">,
"ShipFrom":
"ShipFrom":
{
"ActorID": "${receipt.original_code?trim?json_string}"
"ActorID": "${RFXtoRPprefixSupplier(receipt.original_code?trim?json_string)}"
},
"ShipTo" :
"ShipTo" :
{
"ActorID": "${receipt.physical_depot_code?trim?json_string}"
"ActorID": "${RFXtoRPprefixDepot(receipt.physical_depot_code?trim?json_string)}"
},
"ShipToAcked": true,
"ShipToAcked": true,
<#if receipt.carrier_informations.carrier_code != "">
"Carrier" : {"ActorID": "${receipt.carrier_informations.carrier_code?trim?json_string}"},
</#if>
<#if receipt.line_list??>
"Carrier":
{
"ActorID":"${RFXtoRPprefixCarrier(receipt.carrier_informations.carrier_code?trim?json_string)}"
},
</#if>
<#if receipt.line_list??>
"Lines" : [
<#list receipt.line_list as line>
{
"LineID": "${line.receipt_line_number}",
<#-- Line Metadata inclusion -->
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl">,
"RequestedContent":
{
"Goods":
"RequestedContent":
{
"Goods":
{
"ItemID": "${line.item_code?trim?json_string!"0"}",
"LVBranchID": "${line.item_lv_code?json_string!"0"}",
<#if line.line_without_detail??>
<#if (line.line_without_detail.priority_date?length != 0) && (line.line_without_detail.priority_date?starts_with("00") == false)>
<#assign line_without_detail_priority_date = line.line_without_detail.priority_date?datetime(rfx_date_format_default)?iso_utc />
"PriorityDate": "${line_without_detail_priority_date}",
</#if>
<#if (line.line_without_detail?? && line.line_without_detail.priority_date?length != 0) && (line.line_without_detail.priority_date?starts_with("00") == false)>
<#assign line_without_detail_priority_date = line.line_without_detail.priority_date?datetime(rfx_date_format_default)?iso_utc />
"PriorityDate": "${line_without_detail_priority_date}",
<#else>
<#stop >
<#if (line.line_detail?? && line.line_detail?size == 1 && line.line_detail[0].priority_date?length != 0) && (line.line_detail[0].priority_date?starts_with("00") == false)>
<#assign line_detail_priority_date = line.line_detail[0].priority_date?datetime(rfx_date_format_default)?iso_utc />
"PriorityDate": "${line_detail_priority_date}",
<#else>
"PriorityDate": "1970-01-01T00:00:00Z",
</#if>
</#if>
<#-- Segmentation Keys inclusion -->
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl">
},
"Quantity" :
"Quantity" :
{
"LVID": "${quantity_in_base_lv_RP_Cst}",
"Value": "${line.order_quantity_in_lv!0}"
"Value": "${line.order_quantity_in_lv!0}"
}
}
}
<#sep>,</#sep>
</#list>
</#list>
],
</#if>
"RequestedMilestones" :
{
"RequestedDeliveryDateTime" :
"RequestedDeliveryDateTime" :
{
"DateTime": "${receipt_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"
}
"DateTime": "${receipt_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"
}
}
}
}

View File

@@ -1,10 +1,10 @@
<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
<#assign receipt_status_datetime = RfxDateTimetoUTC(receipt.confirmation_datetime,time_zone_offset_rfx) />
<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.confirmation_datetime,time_zone_rfx) />
[
{
{
"Header": {
"ProjectID": "${projectRP}"
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${receipt.receipt_reference?trim?json_string}",

View File

@@ -1,11 +1,11 @@
<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
<#assign receipt_status_datetime = RfxDateTimetoUTC(receipt.creation_datetime,time_zone_offset_rfx) />
<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.creation_datetime,time_zone_rfx) />
[
{
{
"Header": {
"ProjectID": "${projectRP}"
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${receipt.receipt_reference?trim?json_string}",
@@ -14,8 +14,8 @@
"AuthorTimeZone": "${time_zone_rfx}"
}
},
"Payload": {}
}
]

View File

@@ -2,9 +2,9 @@
[
<#assign UUID = UUID.randomUUID()>
<#assign strJsonBody = JsonUtil.espaceQuoteInJsonString(restResponseBody)>
{
{
"Header": {
"ProjectID": "${projectRP}"
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${UUID}",
@@ -12,7 +12,7 @@
"DateTime": "${aDateTime?iso_utc}",
"AuthorTimeZone": "${time_zone_rfx}"
}
},
},
"Payload": {
<#assign severity = SeverityLevel.ERROR>
"Severity": "${severity}",
@@ -22,22 +22,21 @@
"AuthorTimeZone": "${time_zone_rfx}"
},
"TechMessage": {
"Code": "${restResponsetMsg.status}",
"Code": "${restResponsetMsg.status!"no Code"}",
"Label": ${strJsonBody}
},
"UserMessage": {
"Code": "${restResponsetMsg.status}",
"Code": "${restResponsetMsg.status!"no Code"}",
"Label": ${strJsonBody},
"Params": []
},
"DetailElements": [],
"CorrelationID": "${id.correlationid}",
"ContextPayload": "rfxresponse",
"CorrelationID": "${id.correlationid!"no Correlationid"}",
"ContextPayload": ${strJsonBody},
"Type": "RP_EXECUTIONFLOW_EVENT",
"Task": "${id.apiRestReflexID}",
"OriginalID": "${id.refid}",
"Task": "${id.apiRestReflexID!"no Task"}",
"OriginalID": "${id.refid!"no OriginalID"?trim?json_string}",
"StackTrace": ""
}
}
]
]

View File

@@ -1,15 +1,15 @@
[
{
{
"Header": {
"ProjectID": "${projectRP}"
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${id.refid}"
"RefID": "${id.refid?json_string}"
},
"Payload": {
"ShipFromAcked": true
}
}
]

View File

@@ -4,7 +4,7 @@
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${id.refid}"
"RefID": "${id.refid?json_string}"
},
"Payload": {

View File

@@ -3,106 +3,203 @@
<#-- project : projectId in ReflexPlatform -->
<#-- organisation : organisationtId in ReflexPlatform -->
<#assign restResponsetMsg = JsonUtil.jsonToMap(input)>
<#assign id = JsonUtil.jsonToMap(restResponsetMsg.id)>
<#assign restResponsetMsg = JsonUtil.jsonToMap(input)>
<#assign id = JsonUtil.jsonToMap(restResponsetMsg.id!"{}")>
<#assign projectRP = project>
<#assign organisationRP = organisation>
<#assign aDateTime = .now>
<#assign no_apiRestReflexID = "no apiRestReflexID">
<#assign no_status = -99999>
<#switch id.apiRestReflexID>
<#switch id.apiRestReflexID!no_apiRestReflexID>
<#case no_apiRestReflexID>
[
{
<#if restResponsetMsg.body?? >
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#else>
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
</#if>
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_PlatformLogCreate.ftl">
}
]
<#break>
<#case "preparation_orders_post">
<#switch restResponsetMsg.status>
<#case 200>
<#case 201>
<#-- *********************************************** ApiRestID = preparation_orders_post ******************** -->
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)>
<#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" >
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipFromAcked>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_PrepOrder_ShipFromAcked.ftl">
}
]
<#else>
[
{
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_PlatformLogCreate.ftl">
}
]
</#if>
<#break>
<#default>
[
<#switch restResponsetMsg.status!no_status>
<#case no_status>
[
{
<#if restResponsetMsg.body?? >
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#else>
<#assign restResponseBody = "{}" />
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
</#if>
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_PlatformLogCreate.ftl">
"datas" :
<#include "RFXtoRP_PlatformLogCreate.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_RestResponseAllocationError.ftl">
}
]
</#switch>
]
<#break>
<#case 200>
<#case 201>
<#-- *********************************************** ApiRestID = preparation_orders_post ******************** -->
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)>
<#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">
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipFromAcked>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_PrepOrder_ShipFromAcked.ftl">
}
]
<#else>
[
{
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_PlatformLogCreate.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_RestResponseAllocationError.ftl">
}
]
</#if>
</#if>
<#break>
<#default>
[
{
<#if restResponsetMsg.body?? >
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#else>
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}}" />
</#if>
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_PlatformLogCreate.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_RestResponseAllocationError.ftl">
}
]
</#switch>
<#break>
<#case "receipts_post">
<#switch restResponsetMsg.status>
<#switch restResponsetMsg.status!no_status>
<#case no_status>
[
{
<#if restResponsetMsg.body?? >
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#else>
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
</#if>
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_PlatformLogCreate.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_RestResponseAllocationError.ftl">
}
]
<#break>
<#case 200>
<#case 201>
<#-- *********************************************** ApiRestID = receipts_post ******************** -->
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)>
<#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" >
[
<#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)>
<#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" >
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipToAcked>
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipToAcked>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_Receipt_ShipToAcked.ftl">
"datas" :
<#include "RFXtoRP_Receipt_ShipToAcked.ftl">
}
]
<#else>
[
]
<#else>
[
{
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_PlatformLogCreate.ftl">
}
]
"datas" :
<#include "RFXtoRP_PlatformLogCreate.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_RestResponseAllocationError.ftl">
}
]
</#if>
<#break>
<#default>
[
[
{
<#if restResponsetMsg.body?? >
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#else>
<#assign restResponseBody = "{}" />
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
</#if>
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_PlatformLogCreate.ftl">
"datas" :
<#include "RFXtoRP_PlatformLogCreate.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_RestResponseAllocationError.ftl">
}
]
</#switch>
]
</#switch>
<#break>
<#default>
<#stop>
</#switch>

View File

@@ -0,0 +1,20 @@
<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
[
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${id.refid!"no RefID"?trim?json_string}",
"RefDate": {
"DateTime": "${aDateTime?iso_utc}",
"AuthorTimeZone": "${time_zone_rfx}"
}
},
"Payload": {}
}
]

View File

@@ -2,35 +2,42 @@
<#noparse><#-- /!\ Warning the file is generated, if you modify it manually, do not enable automatic update via the pipeline --></#noparse>
<#noparse><#-- Date of last generation : </#noparse>${aDateTime}<#noparse> --></#noparse>
<#noparse>
<#noparse>
<#-- if LVID is egal to **quantity_in_base_lv** keyword then LVID is egal to base VL of the item -->
<#assign quantity_in_base_lv_RP_Cst = "**quantity_in_base_lv**" >
<#assign rfx_date_format_default = "yyyy-MM-dd" >
<#assign length_unit_KV_rfx = {"MET":"MILLIMETER","CM":"CENTIMETER","MM":"METER","DM":"DECIMETER","KM":"KILOMETER","MIL":"MILE","YAR":"YARD","INC":"INCH","FT":"FOOT"}>
<#assign weight_unit_KV_rfx = {"GR":"GRAMME","DG":"DECIGRAM","KG":"KILOGRAM","TON":"TONNE","OCE":"ONCE","LTO":"LONG_TON","STO":"SHORT_TON","PND":"POUND"}>
<#assign area_unit_KV_rfx = {"MM²":"SQUARE_MILLIMETER","CM²":"SQUARE_CENTIMETER","DM²":"SQUARE_DECIMETER","":"SQUARE_METER","SQI":"SQUARE_INCH","SQF":"SQUARE_FOOT","SQY":"SQUARE_YARD"}>
<#assign volume_unit_KV_rfx = {"MM³":"CUBIC_MILLIMETER","CM³":"CUBIC_CENTIMETER","DM³":"CUBIC_DECIMETER","":"CUBIC_METER","CI":"CUBIC_INCH","CF":"CUBIC_FOOT","CY":"CUBIC_YARD","ML":"MILLI_LITER","CL":"CENTI_LITER","DL":"DECI_LITER","LIT":"LITER","HL":"HECTO_LITER","FT":"US_FLUID_OUNCE","USG":"US_GAL","PI":"IMPERIAL_PINT","GL":"IMPERIAL_GAL"}>
<#assign quantity_in_base_lv_RP_Cst = "**quantity_in_base_lv**" >
<#assign rfx_date_format_default = "yyyy-MM-dd" >
</#noparse>
<#noparse><#assign length_unit_rfx = length_unit_KV_rfx[</#noparse>"${file.measurement_unit.length}"<#noparse>]!"CENTIMETER"></#noparse>
<#noparse><#assign distance_unit_rfx = length_unit_KV_rfx[</#noparse>"${file.measurement_unit.distance}"<#noparse>]!"CENTIMETER"></#noparse>
<#noparse><#assign transport_distance_unit_rfx = length_unit_KV_rfx[</#noparse>"${file.measurement_unit.transport_distance}"<#noparse>]!"CENTIMETER"></#noparse>
<#noparse><#assign weight_unit_rfx = weight_unit_KV_rfx[</#noparse>"${file.measurement_unit.weight}"<#noparse>]!"KILOGRAM"></#noparse>
<#noparse><#assign area_unit_rfx = area_unit_KV_rfx[</#noparse>"${file.measurement_unit.area}"<#noparse>]!"SQUARE_METER"></#noparse>
<#noparse><#assign volume_unit_rfx = volume_unit_KV_rfx[</#noparse>"${file.measurement_unit.volume}"<#noparse>]!"CUBIC_DECIMETER"></#noparse>
<#noparse><#assign number_of_litres_unit_rfx = volume_unit_KV_rfx[</#noparse>"${file.measurement_unit.litres_number}"<#noparse>]!"CUBIC_DECIMETER"></#noparse>
<#assign length_unit_KV_rfx = {"MET":"MILLIMETER","CM":"CENTIMETER","MM":"METER","DM":"DECIMETER","KM":"KILOMETER","MIL":"MILE","YAR":"YARD","INC":"INCH","FT":"FOOT"}>
<#assign weight_unit_KV_rfx = {"GR":"GRAMME","DG":"DECIGRAM","KG":"KILOGRAM","TON":"TONNE","OCE":"ONCE","LTO":"LONG_TON","STO":"SHORT_TON","PND":"POUND"}>
<#assign area_unit_KV_rfx = {"MM²":"SQUARE_MILLIMETER","CM²":"SQUARE_CENTIMETER","DM²":"SQUARE_DECIMETER","":"SQUARE_METER","SQI":"SQUARE_INCH","SQF":"SQUARE_FOOT","SQY":"SQUARE_YARD"}>
<#assign volume_unit_KV_rfx = {"MM³":"CUBIC_MILLIMETER","CM³":"CUBIC_CENTIMETER","DM³":"CUBIC_DECIMETER","":"CUBIC_METER","CI":"CUBIC_INCH","CF":"CUBIC_FOOT","CY":"CUBIC_YARD","ML":"MILLI_LITER","CL":"CENTI_LITER","DL":"DECI_LITER","LIT":"LITER","HL":"HECTO_LITER","FT":"US_FLUID_OUNCE","USG":"US_GAL","PI":"IMPERIAL_PINT","GL":"IMPERIAL_GAL"}>
<#noparse><#assign time_zone_rfx = </#noparse>"${file.author_time_zone!"UTC"}<#noparse>"></#noparse>
<#noparse><#assign time_zone_offset_rfx = </#noparse>"${file.time_zone_offset!"+00:00"}<#noparse>"></#noparse>
<#list file.reflex_platform_project_list?filter(l -> l.name == projectRP) as reflex_platform_project>
<#noparse><#assign text_language_rfx = </#noparse>"${reflex_platform_project.text_language!"en"}<#noparse>"></#noparse>
</#noparse>
<#noparse><#assign length_unit_rfx = length_unit_KV_rfx[</#noparse>"${file.measurement_unit.length}"<#noparse>]!"CENTIMETER"></#noparse>
<#noparse><#assign distance_unit_rfx = length_unit_KV_rfx[</#noparse>"${file.measurement_unit.distance}"<#noparse>]!"CENTIMETER"></#noparse>
<#noparse><#assign transport_distance_unit_rfx = length_unit_KV_rfx[</#noparse>"${file.measurement_unit.transport_distance}"<#noparse>]!"CENTIMETER"></#noparse>
<#noparse><#assign weight_unit_rfx = weight_unit_KV_rfx[</#noparse>"${file.measurement_unit.weight}"<#noparse>]!"KILOGRAM"></#noparse>
<#noparse><#assign area_unit_rfx = area_unit_KV_rfx[</#noparse>"${file.measurement_unit.area}"<#noparse>]!"SQUARE_METER"></#noparse>
<#noparse><#assign volume_unit_rfx = volume_unit_KV_rfx[</#noparse>"${file.measurement_unit.volume}"<#noparse>]!"CUBIC_DECIMETER"></#noparse>
<#noparse><#assign number_of_litres_unit_rfx = volume_unit_KV_rfx[</#noparse>"${file.measurement_unit.litres_number}"<#noparse>]!"CUBIC_DECIMETER"></#noparse>
<#noparse><#assign time_zone_rfx = </#noparse>"${file.author_time_zone!"Europe/Paris"}<#noparse>"></#noparse>
<#noparse><#assign time_zone_offset_rfx = </#noparse>"${file.time_zone_offset!"+01:00"}<#noparse>"></#noparse>
<#list file.reflex_platform_project_list?filter(l -> l.name == projectRP) as reflex_platform_project>
<#noparse><#assign text_language_rfx = </#noparse>"${reflex_platform_project.text_language!"en"}<#noparse>"></#noparse>
</#list>
<#list file.reflex_platform_project_list?filter(j -> j.name == projectRP) as reflex_platform_project_uniqueness>
<#if reflex_platform_project_uniqueness.site_code_unicity??>
<#noparse><#assign uniqueness = </#noparse>${reflex_platform_project_uniqueness.site_code_unicity?c}<#noparse>></#noparse>
<#else>
<#noparse><#assign uniqueness = </#noparse>false<#noparse>></#noparse>
</#if>
</#list>

38
RP_connector.ftl Normal file
View File

@@ -0,0 +1,38 @@
<#-- ****
Connector provides some of parameters through the class connectorParameters
those parameters are stored in FTL file Conf-connector.ftl for later use in some of the data ftl files
*** -->
<#-- *********************************************** Parameter global ******************** -->
<#assign file = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
<#assign organisationRP = organisation>
<#assign aDateTime = .now>
<#noparse><#-- Date of last generation : </#noparse>${aDateTime}<#noparse> --></#noparse>
<#noparse><#-- /!\ Warning the file is generated, if you modify it manually, do not enable automatic update via the pipeline --></#noparse>
<#noparse><#-- Possible values for SupplyOfTheTrackingNumber parameter : --></#noparse>
<#noparse><#-- 0 : Always empty --></#noparse>
<#noparse><#-- 1 : Always use Reflex WMS tracking --></#noparse>
<#noparse><#-- 2 : Always use the HU number --></#noparse>
<#noparse><#-- 3 : Use Reflex tracking if it exists, the HU number otherwise --></#noparse>
<#list file.parameters as parameter>
<#switch parameter.type>
<#case "string">
<#noparse><#assign </#noparse>${parameter.name}<#noparse> = "</#noparse>${parameter.value!""}<#noparse>"></#noparse>
<#break>
<#case "integer">
<#noparse><#assign </#noparse>${parameter.name}<#noparse> = </#noparse>${parameter.value!0}<#noparse>></#noparse>
<#break>
<#case "boolean">
<#noparse><#assign </#noparse>${parameter.name}<#noparse> = </#noparse>${(parameter.value!false)?c}<#noparse>></#noparse>
<#break>
<#default>
</#switch>
</#list>

View File

@@ -2,8 +2,10 @@
<#-- input : message RFX -->
<#-- project : projectId in ReflexPlatform -->
<#-- organisation : organisationtId in ReflexPlatform -->
<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
<#assign eventRP = JsonUtil.jsonToMap(input)>
<#assign eventRP = JsonUtil.jsonToMap(input)>
<#assign projectRP = project>
<#assign organisationRP = organisation>
@@ -22,28 +24,28 @@
<#if executionflow.MetaData??>
<#assign Header_MetaData_Map = JsonUtil.sequenceToMap(executionflow.MetaData, "Key", "Value") />
</#if>
[
<#if eventRP.partnerAppRole == "ShipFrom" && executionflow.ShipFrom.ActorID != "" && executionflow.ShipFrom.Actor.IsShipFromConnected?? && executionflow.ShipFrom.Actor.IsShipFromConnected>
[
<#if eventRP.partnerAppRole == "ShipFrom" && executionflow.ShipFrom.ActorID != "" && executionflow.ShipFrom.Actor.IsShipFromConnected?? && executionflow.ShipFrom.Actor.IsShipFromConnected>
{
<#assign apiRestReflexID = ApiRestReflexID.preparation_orders_post>
<#assign apiRestReflexID = ApiRestReflexID.preparation_orders_post>
"apiRestReflexID" : "${apiRestReflexID}",
"datas" :
<#include "RPtoRFX_PrepOrder.ftl">
"datas" :
<#include "RPtoRFX_PrepOrder.ftl">
}
</#if>
<#if eventRP.partnerAppRole == "ShipTo" && executionflow.ShipTo.ActorID != "" && executionflow.ShipTo.Actor.IsShipToConnected?? && executionflow.ShipTo.Actor.IsShipToConnected>
<#if eventRP.partnerAppRole == "ShipTo" && executionflow.ShipTo.ActorID != "" && executionflow.ShipTo.Actor.IsShipToConnected?? && executionflow.ShipTo.Actor.IsShipToConnected>
{
<#assign apiRestReflexID = ApiRestReflexID.receipts_post>
<#assign apiRestReflexID = ApiRestReflexID.receipts_post>
"apiRestReflexID" : "${apiRestReflexID}",
"datas" :
<#include "RPtoRFX_Receipt.ftl">
"datas" :
<#include "RPtoRFX_Receipt.ftl">
}
</#if>
]
]
<#break>
<#default>
<#stop "Event not processed">
<#stop >
</#switch>

View File

@@ -1,26 +1,39 @@
<#include "RPtoRFX_PrepOrder_DefaultHeaderData.ftl">
<#assign aDateTime = .now>
<#include "ActorPrefix.ftl">
<#include "HfRpConfig.ftl">
<#-- Valeurs par défaut Adresse -->
<#-- Default values -->
<#assign typecode ="010">
<#assign titlecode ="1">
<#assign contacttypecode ="010">
<#assign adresstypecode ="010">
<#-- Si vous utilisez des acteurs non référencés, il faudra créer un destinataire "VIZ" dans Reflex WMS pour utiliser cette fonctionnalité -->
<#-- If you are using unreferenced actors, you will need to create a "VIZ" consignee in Reflex WMS to use this feature -->
<#assign defaultactor ="VIZ">
<#if executionflow.ShipTo.ActorID?? && executionflow.ShipTo.ActorID!="">
<#assign actorID = "${RPtoRFXprefixConsignee(executionflow.ShipTo.ActorID)}" >
<#else>
<#assign actorID = defaultactor >
</#if>
{
"id" : {"refid" : "${executionflow.OrderID}"},
"id" : {"refid" : "${executionflow.OrderID?json_string}"},
"route" : "rest/public/v1/activities/{activity_code}/physical_depots/{physical_depot_code}/originators/{originator_code}/preparation_orders",
"method" : "POST",
"uri_substitutions": {
"activity_code": "${activity_code}",
"physical_depot_code": "${executionflow.ShipFrom.ActorID}",
"physical_depot_code": "${RPtoRFXprefixDepot(executionflow.ShipFrom.ActorID)}",
"originator_code": "${originator_code}"
},
"payload" :
"payload" :
{
"originator_reference": "${executionflow.OrderID}",
"originator_reference": "${executionflow.OrderID?json_string}",
"preparation_type_code": "${preparation_type_code}",
"end_consignee_code": "${executionflow.ShipTo.ActorID!""}",
<#if executionflow.RequestedMilestones?? && executionflow.RequestedMilestones.RequestedDeliveryDateTime??>
"requested_delivery_start_datetime": "${executionflow.RequestedMilestones.RequestedDeliveryDateTime.DateTime}",
"end_consignee_code": "${actorID}",
<#if executionflow.RequestedMilestones?? && executionflow.RequestedMilestones.RequestedDeliveryDateTime??>
"requested_delivery_start_datetime": "${DateTimeUTCtoRfxLocale(executionflow.RequestedMilestones.RequestedDeliveryDateTime.DateTime,time_zone_rfx)}",
<#else>
"requested_delivery_start_datetime": "${aDateTime?iso_utc}",
"requested_delivery_start_datetime": "${DateTimeUTCtoRfxLocale(.now?iso_utc?string,time_zone_rfx)}",
</#if>
"requested_delivery_date_type": "${requested_delivery_date_type}",
"consolidated_delivery": "${consolidated_delivery_flag}",
@@ -33,53 +46,70 @@
"apt_with_end_consignee": "${apt_with_end_consignee_flag}",
"apt_with_intermediate": "false",
"load_grouping": "${load_grouping}"
},
<#if executionflow.ShipTo.ActorID == "">
"address": {
"first_name": "${executionflow.ShipTo.Contact.FirstName!""?json_string}",
"last_name" :"${executionflow.ShipTo.Contact.Lastname!""?json_string}",
"mail_address": "${executionflow.ShipTo.Actor.Emails[0]!""}",
"mobile_phone_number": "${executionflow.ShipTo.Actor.Phones[0]!""}",
"street_and_number_and_po_box": "${executionflow.ShipTo.Actor.Address.StreetAddressOne!""?json_string}",
"additional_address_data_1": "${executionflow.ShipTo.Actor.Address.StreetAddressTwo!""?json_string}",
"additional_address_data_2": "${executionflow.ShipTo.Actor.Address.StreetAddressThree!""?json_string}",
"postal_code": "${executionflow.ShipTo.Actor.Address.PostalCode!""}",
"iso_country_code": "${executionflow.ShipTo.Actor.Address.CountryCode!""}"
},
}
<#if actorID == defaultactor >
,
"address": {
"type_code": "${typecode}",
"title_code" : "${titlecode}",
"contact_type_code" : "${contacttypecode}",
"address_type_code" : "${adresstypecode}",
"first_name": "${(executionflow.ShipTo.Contact.FirstName!"")?json_string}",
"last_name" :"${(executionflow.ShipTo.Contact.LastName!"")?json_string}",
<#if executionflow.ShipTo.Actor.Address.Name?? && executionflow.ShipTo.Actor.Address.Name!="">
"name_or_company_name" : "${(executionflow.ShipTo.Actor.Address.Name!"")?json_string}",
<#else>
"name_or_company_name" : "${(executionflow.ShipTo.Contact.FirstName!"")?json_string} ${(executionflow.ShipTo.Contact.LastName!"")?json_string}",
</#if>
<#if executionflow.ShipTo.Contact.Emails?? && executionflow.ShipTo.Contact.Emails[0]!="">
"mail_address": "${executionflow.ShipTo.Contact.Emails[0]?json_string}",
</#if>
<#if executionflow.ShipTo.Contact.Phones?? && executionflow.ShipTo.Contact.Phones[0]!="">
"mobile_phone_number": "${executionflow.ShipTo.Contact.Phones[0]?json_string}",
</#if>
"street_and_number_and_po_box": "${(executionflow.ShipTo.Actor.Address.StreetAddressOne!"")?json_string}",
"additional_address_data_1": "${(executionflow.ShipTo.Actor.Address.StreetAddressTwo!"")?json_string}",
"additional_address_data_2": "${(executionflow.ShipTo.Actor.Address.StreetAddressThree!"")?json_string}",
"postal_code": "${(executionflow.ShipTo.Actor.Address.PostalCode!"")?json_string}",
"post_code_area_name" : "${(executionflow.ShipTo.Actor.Address.City!"")?json_string}",
"iso_country_code": "${(executionflow.ShipTo.Actor.Address.CountryCode!"")?json_string}"
}
</#if>
<#if executionflow.Lines??>
"line_list": [
<#list executionflow.Lines as line>
<#-- ******* line MetaData and Segmentationkeys to maps ******** -->
<#if line.MetaData??>
<#assign Line_MetaData_Map = JsonUtil.sequenceToMap(line.MetaData, "Key", "Value") />
</#if>
<#if line.RequestedContent.Goods.SegmentationKeys??>
<#assign SegmentationKeys_Map = JsonUtil.sequenceToMap(line.RequestedContent.Goods.SegmentationKeys, "Key", "Value") />
</#if>
<#include "RPtoRFX_PrepOrder_DefaultLineData.ftl">
{
"originator_reference_line_number": ${line.LineID?number},
"item_code": "${line.RequestedContent.Goods.ItemID!""}",
"item_lv_code": "${line.RequestedContent.Goods.LVBranchID!""}",
"base_lv_quantity_to_prepare": ${line.RequestedMetrics.QuantityInBaseLV.Value!0},
"owner_code_to_prepare" :"${owner_code_to_prepare}",
"grade_code_to_prepare" :"${grade_code_to_prepare}",
"input_order_data": "false",
"batch_1": "${batch_1}",
"base_lv_quantity": "true",
"any_lv": "false"
<#--
"stock_reservation": "false",
"forced_priority_date_min_lead_time": "false",
"temp_substitution_possible": "false",
"substitution_possible": "false"
-->
}<#sep>,</#sep>
</#list>
</#if>
]
<#if executionflow.Lines??>
,
"line_list": [
<#list executionflow.Lines as line>
<#-- ******* line MetaData and Segmentationkeys to maps ******** -->
<#if line.MetaData??>
<#assign Line_MetaData_Map = JsonUtil.sequenceToMap(line.MetaData, "Key", "Value") />
</#if>
<#if line.RequestedContent.Goods.SegmentationKeys??>
<#assign SegmentationKeys_Map = JsonUtil.sequenceToMap(line.RequestedContent.Goods.SegmentationKeys, "Key", "Value") />
</#if>
<#include "RPtoRFX_PrepOrder_DefaultLineData.ftl">
{
"originator_reference_line_number": ${line.LineID?number},
"item_code": "${line.RequestedContent.Goods.ItemID!""}",
"item_lv_code": "${line.RequestedContent.Goods.LVBranchID!""}",
"base_lv_quantity_to_prepare": ${line.RequestedMetrics.QuantityInBaseLV.Value!0},
"owner_code_to_prepare" :"${owner_code_to_prepare}",
"grade_code_to_prepare" :"${grade_code_to_prepare}",
"input_order_data": "false",
"batch_1": "${batch_1?json_string}",
"base_lv_quantity": "true",
"any_lv": "false"
<#--
"stock_reservation": "false",
"forced_priority_date_min_lead_time": "false",
"temp_substitution_possible": "false",
"substitution_possible": "false"
-->
}
<#sep>,</#sep>
</#list>
]
</#if>
}
}

View File

@@ -1,7 +1,7 @@
<#-- Note : you can use Order Header Metadata, using the define map : Header_MetaData_Map -->
<#-- How to use MD Header map
Example :
Example :
<#assign pick_sequence_code = Header_MetaData_Map["OrderType"].String!""/>
If your MD is :
@@ -23,8 +23,22 @@
<#assign protected_flag ="false"/>
<#assign automatic_generation_flag ="false"/>
<#assign apt_with_end_consignee_flag="false"/>
<#assign load_grouping = "DEFAUT"/>
<#-- A supprimer si utilisation de la table de correspondance-->
<#--To be deleted if using the correspondence table-->
<#assign load_grouping = "default">
<#-- Table de correspondance Transporteur/Code regroupement chargement,
affectation à un chargement si paramétrage regroupement chargement+plan de base distribution-->
<#--Carrier / Load Grouping Code Correspondence Table,
Assigning to a load if you set up Load Grouping+Distribution Master Plan-->
<#-- Example -->
<#--<#if executionflow.Carrier.ActorID == "TEST" >
<#assign load_grouping = "TEST">
<#else>
<#assign load_grouping = "default">
</#if>-->

View File

@@ -1,33 +1,36 @@
<#include "RPtoRFX_Receipt_DefaultHeaderData.ftl">
<#assign aDateTime = .now>
<#include "ActorPrefix.ftl">
<#include "HfRpConfig.ftl">
{
"id" : {"refid" : "${executionflow.OrderID}"},
"id" : {"refid" : "${executionflow.OrderID?json_string}"},
"route" : "rest/public/v1/activities/{activity_code}/physical_depots/{physical_depot_code}/originators/{originator_code}/receipts",
"method" : "POST",
"uri_substitutions": {
"activity_code": "${activity_code}",
"physical_depot_code": "${executionflow.ShipTo.ActorID!""}",
"physical_depot_code": "${RPtoRFXprefixDepot(executionflow.ShipTo.ActorID!"")}",
"originator_code": "${originator_code}"
},
"payload" :
"payload" :
{
"receipt_reference": "${executionflow.OrderID}",
"receipt_reference": "${executionflow.OrderID?json_string}",
"receipt_type": "${receipt_type}",
"receipt_reason_code": "${receipt_reason_code}",
"receipt_reason_code": "${receipt_reason_code}",
"work_mode_code" : "${work_mode_code}",
"original_code" : "${executionflow.ShipFrom.ActorID}",
"carrier_code" : "${executionflow.Carrier.ActorID!""}",
"original_code" : "${RPtoRFXprefixSupplier(executionflow.ShipFrom.ActorID)}",
"carrier_code" : "${RPtoRFXprefixCarrier(executionflow.Carrier.ActorID!"")}",
<#if executionflow.RequestedMilestones?? && executionflow.RequestedMilestones.RequestedDeliveryDateTime??>
"receipt_datetime": "${executionflow.RequestedMilestones.RequestedDeliveryDateTime.DateTime}",
<#if executionflow.RequestedMilestones?? && executionflow.RequestedMilestones.RequestedDeliveryDateTime??>
"receipt_datetime": "${DateTimeUTCtoRfxLocale(executionflow.RequestedMilestones.RequestedDeliveryDateTime.DateTime,time_zone_rfx)}",
<#else>
"receipt_datetime": "${aDateTime?iso_utc}",
"receipt_datetime": "${DateTimeUTCtoRfxLocale(.now?iso_utc?string,time_zone_rfx)}",
</#if>
"carrier_appointment_made": "false",
"receipt_in_cross_docking": "false",
"dock_occupation_duration": 1,
<#if executionflow.Lines??>
"dock_occupation_duration": 1
<#if executionflow.Lines??>
,
"line_list": [
<#list executionflow.Lines as line>
@@ -46,7 +49,7 @@
"level_1_quantity": ${line.RequestedMetrics.QuantityInBaseLV.Value!0},
"owner_code": "${owner_code}",
"grade_code": "${grade_code}",
"batch_1": "${batch_1!""}",
"batch_1": "${batch_1?json_string!""}",
"optional_attributes": {
<#--"held_for_check": "false",
"held _for_repacking": "false",
@@ -59,9 +62,8 @@
} -->
}<#sep>,</#sep>
</#list>
</#list>
]
</#if>
}
}

View File

@@ -2,7 +2,7 @@
<#-- Note : you can use Order Line Segmentation keys, using the define map : SegmentationKeys_Map -->
<#-- How to use MD or SK map
Example :
Example :
<#assign owner_code = SegmentationKeys_Map["Owner"].String!""/>
If your SK is :

View File

@@ -2,8 +2,11 @@
<#-- Concat reflex timestamp with reflex time zone and format this date in ISO UTC format -->
<#-- --------------------------------------------------------------------------------------- -->
<#function RfxDateTimetoUTC rfxdatetime offset >
<#assign datetimeUTC = JsonUtil.createUTCDateTime(rfxdatetime,time_zone_rfx , "yyyy-MM-dd'T'HH:mm:ss") />
<#return (datetimeUTC)>
<#return ((rfxdatetime + offset)?datetime.iso?iso_utc)>
</#function>
<#function DateTimeUTCtoRfxLocale dateutc locale >
<#return dateutc?datetime.iso?iso_nz(locale)>
</#function>
<#-- --------------------------------------------------------------------------------------- -->
@@ -13,15 +16,15 @@
<#-- --------------------------------------------------------------------------------------- -->
<#function splitEmailsIntoArray emails >
<#local str = "[">
<#list emails?split(";|,| |à|/","r")?filter(l -> l != "") as email>
<#list emails?split(";|,| |à|/","r")?filter(l -> l != "") as email>
<#if email?matches("^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$")>
<#if str != "[">
<#if str != "[">
<#local str += ",">
</#if>
<#local str += "\"">
<#local str += email>
<#local str += "\"">
</#if>
</#if>
</#list>
<#local str += "]">
<#return (str)>

15
Table.ftl Normal file
View File

@@ -0,0 +1,15 @@
<#-- Table criticality -->
<#assign TableCriticality = {
"1": "CLAIM_CRITICALITY_LOW",
"2":"CLAIM_CRITICALITY_MEDIUM",
"3":"CLAIM_CRITICALITY_HIGH",
"4":"CLAIM_CRITICALITY_BLOCKING"
}>
<#-- Table Amount -->
<#assign TableAmount = {
"$": "USD",
"£":"GBP",
"DH":"MAD"
}>

View File

@@ -1 +1 @@
1.2.12+3
1.2.38+1