Skip to content

Commit

Permalink
Segments - Modifier le détail du segment dans la fiche navire (#4045)
Browse files Browse the repository at this point in the history
## Linked issues

- Resolve #4037

----

- [ ] Tests E2E (Cypress)
  • Loading branch information
louptheron authored Jan 24, 2025
2 parents c3397a2 + ed3a2b1 commit 96ea498
Show file tree
Hide file tree
Showing 16 changed files with 321 additions and 319 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
-- /!\ This file is automatically generated by a local script.
-- Do NOT update it directly, update the associated .jsonc file in /backend/src/main/resources/db/testdata/json/ and execute 'make generate-test-data'.

INSERT INTO risk_factors (cfr, control_priority_level, control_rate_risk_factor, departure_datetime_utc, detectability_risk_factor, external_immatriculation, impact_risk_factor, infraction_rate_risk_factor, infraction_score, ircs, last_control_datetime_utc, last_control_infraction, last_logbook_message_datetime_utc, number_controls_last_3_years, number_controls_last_5_years, number_gear_seizures_last_5_years, number_infractions_last_5_years, number_recent_controls, number_species_seizures_last_5_years, number_vessel_seizures_last_5_years, post_control_comments, probability_risk_factor, risk_factor, segment_highest_impact, segment_highest_priority, segments, total_weight_onboard, trip_number, vessel_id, gear_onboard, species_onboard) VALUES ('FAK000999999', 2.56, 3.8, CURRENT_DATE, 3, 'DONTSINK', 2.1, 2.56, NULL, 'CALLME', '2024-03-01 00:00:00', true, CURRENT_DATE, 1, 8, 4, 5, 0, 3, 2, '', 2, 2.473, 'NWW10', 'PEL 03', '{"NWW10", "PEL 03"}', 1235.36, 123101, 1, '[{"gear":"OTB","mesh":70,"dimensions":45}]', '[{"gear":"OTB","faoZone":"27.8.b","species":"BLI","weight":13.46},{"gear":"OTB","faoZone":"27.8.c","species":"HKE","weight":235.6},{"gear":"OTB","faoZone":"27.8.b","species":"HKE","weight":235.6}]');
INSERT INTO risk_factors (cfr, control_priority_level, control_rate_risk_factor, departure_datetime_utc, detectability_risk_factor, external_immatriculation, impact_risk_factor, infraction_rate_risk_factor, infraction_score, ircs, last_control_datetime_utc, last_control_infraction, last_logbook_message_datetime_utc, number_controls_last_3_years, number_controls_last_5_years, number_gear_seizures_last_5_years, number_infractions_last_5_years, number_recent_controls, number_species_seizures_last_5_years, number_vessel_seizures_last_5_years, post_control_comments, probability_risk_factor, risk_factor, segment_highest_impact, segment_highest_priority, segments, total_weight_onboard, trip_number, vessel_id, gear_onboard, species_onboard) VALUES ('FAK000999999', 2.56, 3.8, CURRENT_DATE, 3, 'DONTSINK', 2.1, 2.56, NULL, 'CALLME', '2024-03-01 00:00:00', true, CURRENT_DATE, 1, 8, 4, 5, 0, 3, 2, '', 2, 2.473, 'NWW10', 'PEL03', '{"NWW10", "PEL03"}', 1235.36, 123101, 1, '[{"gear":"OTB","mesh":70,"dimensions":45}]', '[{"gear":"OTB","faoZone":"27.8.b","species":"BLI","weight":13.46},{"gear":"OTB","faoZone":"27.8.c","species":"HKE","weight":235.6},{"gear":"OTB","faoZone":"27.8.b","species":"HKE","weight":235.6},{"gear":"OTB","faoZone":"27.8.b","species":"NEP","weight":235.6}]');

INSERT INTO risk_factors (cfr, control_priority_level, control_rate_risk_factor, departure_datetime_utc, detectability_risk_factor, external_immatriculation, impact_risk_factor, infraction_rate_risk_factor, infraction_score, ircs, last_control_datetime_utc, last_control_infraction, last_logbook_message_datetime_utc, number_controls_last_3_years, number_controls_last_5_years, number_gear_seizures_last_5_years, number_infractions_last_5_years, number_recent_controls, number_species_seizures_last_5_years, number_vessel_seizures_last_5_years, post_control_comments, probability_risk_factor, risk_factor, segment_highest_impact, segment_highest_priority, segments, total_weight_onboard, trip_number, vessel_id, gear_onboard, species_onboard) VALUES ('CFR101', 4, 5, NOW() - INTERVAL '1 day', 5, 'EXTIMM101', 4, 3, NULL, 'IRCS101', '2023-01-01 00:00:00', true, NOW(), 0, 0, 4, 5, 0, 3, 2, '', 4, 4, 'NWW10', 'PEL 03', '{"NWW10", "PEL 03"}', 12345.67, 123102, 101, '[{"gear":"OTB","mesh":70,"dimensions":45}]', '[{"gear":"OTB","faoZone":"27.8.b","species":"BLI","weight":13.46},{"gear":"OTB","faoZone":"27.8.c","species":"HKE","weight":235.6},{"gear":"OTB","faoZone":"27.8.b","species":"HKE","weight":235.6}]');
INSERT INTO risk_factors (cfr, control_priority_level, control_rate_risk_factor, departure_datetime_utc, detectability_risk_factor, external_immatriculation, impact_risk_factor, infraction_rate_risk_factor, infraction_score, ircs, last_control_datetime_utc, last_control_infraction, last_logbook_message_datetime_utc, number_controls_last_3_years, number_controls_last_5_years, number_gear_seizures_last_5_years, number_infractions_last_5_years, number_recent_controls, number_species_seizures_last_5_years, number_vessel_seizures_last_5_years, post_control_comments, probability_risk_factor, risk_factor, segment_highest_impact, segment_highest_priority, segments, total_weight_onboard, trip_number, vessel_id, gear_onboard, species_onboard) VALUES ('CFR101', 4, 5, NOW() - INTERVAL '1 day', 5, 'EXTIMM101', 4, 3, NULL, 'IRCS101', '2023-01-01 00:00:00', true, NOW(), 0, 0, 4, 5, 0, 3, 2, '', 4, 4, 'NWW10', 'PEL03', '{"NWW10", "PEL03"}', 12345.67, 123102, 101, '[{"gear":"OTB","mesh":70,"dimensions":45}]', '[{"gear":"OTB","faoZone":"27.8.b","species":"BLI","weight":13.46},{"gear":"OTB","faoZone":"27.8.c","species":"HKE","weight":235.6},{"gear":"OTB","faoZone":"27.8.b","species":"HKE","weight":235.6}]');

INSERT INTO risk_factors (cfr, control_priority_level, control_rate_risk_factor, departure_datetime_utc, detectability_risk_factor, external_immatriculation, impact_risk_factor, infraction_rate_risk_factor, infraction_score, ircs, last_control_datetime_utc, last_control_infraction, last_logbook_message_datetime_utc, number_controls_last_3_years, number_controls_last_5_years, number_gear_seizures_last_5_years, number_infractions_last_5_years, number_recent_controls, number_species_seizures_last_5_years, number_vessel_seizures_last_5_years, post_control_comments, probability_risk_factor, risk_factor, segment_highest_impact, segment_highest_priority, segments, total_weight_onboard, trip_number, vessel_id, gear_onboard, species_onboard) VALUES ('CFR102', 4, 5, NOW() - INTERVAL '1 day', 5, 'EXTIMM103', 4, 3, NULL, 'IRCS103', NULL, true, NOW(), 0, 0, 4, 5, 0, 3, 2, '', 4, 4, 'NWW10', 'PEL 03', '{"NWW10", "PEL 03"}', 12345.67, 123103, 102, '[{"gear":"OTB","mesh":70,"dimensions":45}]', '[{"gear":"OTB","faoZone":"27.8.b","species":"BLI","weight":13.46},{"gear":"OTB","faoZone":"27.8.c","species":"HKE","weight":235.6},{"gear":"OTB","faoZone":"27.8.b","species":"HKE","weight":235.6}]');
INSERT INTO risk_factors (cfr, control_priority_level, control_rate_risk_factor, departure_datetime_utc, detectability_risk_factor, external_immatriculation, impact_risk_factor, infraction_rate_risk_factor, infraction_score, ircs, last_control_datetime_utc, last_control_infraction, last_logbook_message_datetime_utc, number_controls_last_3_years, number_controls_last_5_years, number_gear_seizures_last_5_years, number_infractions_last_5_years, number_recent_controls, number_species_seizures_last_5_years, number_vessel_seizures_last_5_years, post_control_comments, probability_risk_factor, risk_factor, segment_highest_impact, segment_highest_priority, segments, total_weight_onboard, trip_number, vessel_id, gear_onboard, species_onboard) VALUES ('CFR102', 4, 5, NOW() - INTERVAL '1 day', 5, 'EXTIMM103', 4, 3, NULL, 'IRCS103', NULL, true, NOW(), 0, 0, 4, 5, 0, 3, 2, '', 4, 4, 'NWW10', 'PEL03', '{"NWW10", "PEL03"}', 12345.67, 123103, 102, '[{"gear":"OTB","mesh":70,"dimensions":45}]', '[{"gear":"OTB","faoZone":"27.8.b","species":"BLI","weight":13.46},{"gear":"OTB","faoZone":"27.8.c","species":"HKE","weight":235.6},{"gear":"OTB","faoZone":"27.8.b","species":"HKE","weight":235.6}]');

INSERT INTO risk_factors (cfr, control_priority_level, control_rate_risk_factor, departure_datetime_utc, detectability_risk_factor, external_immatriculation, impact_risk_factor, infraction_rate_risk_factor, infraction_score, ircs, last_control_datetime_utc, last_control_infraction, last_logbook_message_datetime_utc, number_controls_last_3_years, number_controls_last_5_years, number_gear_seizures_last_5_years, number_infractions_last_5_years, number_recent_controls, number_species_seizures_last_5_years, number_vessel_seizures_last_5_years, post_control_comments, probability_risk_factor, risk_factor, segment_highest_impact, segment_highest_priority, segments, total_weight_onboard, trip_number, vessel_id, gear_onboard, species_onboard) VALUES ('CFR109', 4, 5, '2024-03-31 14:00:00', 5, 'EXTIMM109', 4, 3, NULL, 'IRCS109', '2024-04-01 00:00:00', true, NOW(), 0, 0, 4, 5, 0, 3, 2, '', 4, 4, 'NWW10', 'PEL 03', '{"NWW10", "PEL 03"}', 12345.67, 123109, 109, '[]', '[]');
INSERT INTO risk_factors (cfr, control_priority_level, control_rate_risk_factor, departure_datetime_utc, detectability_risk_factor, external_immatriculation, impact_risk_factor, infraction_rate_risk_factor, infraction_score, ircs, last_control_datetime_utc, last_control_infraction, last_logbook_message_datetime_utc, number_controls_last_3_years, number_controls_last_5_years, number_gear_seizures_last_5_years, number_infractions_last_5_years, number_recent_controls, number_species_seizures_last_5_years, number_vessel_seizures_last_5_years, post_control_comments, probability_risk_factor, risk_factor, segment_highest_impact, segment_highest_priority, segments, total_weight_onboard, trip_number, vessel_id, gear_onboard, species_onboard) VALUES ('CFR109', 4, 5, '2024-03-31 14:00:00', 5, 'EXTIMM109', 4, 3, NULL, 'IRCS109', '2024-04-01 00:00:00', true, NOW(), 0, 0, 4, 5, 0, 3, 2, '', 4, 4, 'NWW10', 'PEL03', '{"NWW10", "PEL03"}', 12345.67, 123109, 109, '[]', '[]');

INSERT INTO risk_factors (cfr, control_priority_level, control_rate_risk_factor, departure_datetime_utc, detectability_risk_factor, external_immatriculation, impact_risk_factor, infraction_rate_risk_factor, infraction_score, ircs, last_control_datetime_utc, last_control_infraction, last_logbook_message_datetime_utc, number_controls_last_3_years, number_controls_last_5_years, number_gear_seizures_last_5_years, number_infractions_last_5_years, number_recent_controls, number_species_seizures_last_5_years, number_vessel_seizures_last_5_years, post_control_comments, probability_risk_factor, risk_factor, segment_highest_impact, segment_highest_priority, segments, total_weight_onboard, trip_number, vessel_id, gear_onboard, species_onboard) VALUES ('CFR115', 4, 5, NOW() - INTERVAL '1 day', 5, 'EXTIMM115', 4, 3, NULL, 'IRCS115', '2024-05-01 00:00:00', true, NOW(), 0, 0, 4, 5, 0, 3, 2, '', 4, 2.5, 'NWW10', 'PEL 03', '{"NWW10", "PEL 03"}', 12345.67, 123102, 115, '[{"gear":"OTB","mesh":70,"dimensions":45}]', '[{"gear":"OTB","faoZone":"27.8.b","species":"BLI","weight":13.46},{"gear":"OTB","faoZone":"27.8.c","species":"HKE","weight":235.6},{"gear":"OTB","faoZone":"27.8.b","species":"HKE","weight":235.6}]');
INSERT INTO risk_factors (cfr, control_priority_level, control_rate_risk_factor, departure_datetime_utc, detectability_risk_factor, external_immatriculation, impact_risk_factor, infraction_rate_risk_factor, infraction_score, ircs, last_control_datetime_utc, last_control_infraction, last_logbook_message_datetime_utc, number_controls_last_3_years, number_controls_last_5_years, number_gear_seizures_last_5_years, number_infractions_last_5_years, number_recent_controls, number_species_seizures_last_5_years, number_vessel_seizures_last_5_years, post_control_comments, probability_risk_factor, risk_factor, segment_highest_impact, segment_highest_priority, segments, total_weight_onboard, trip_number, vessel_id, gear_onboard, species_onboard) VALUES ('CFR115', 4, 5, NOW() - INTERVAL '1 day', 5, 'EXTIMM115', 4, 3, NULL, 'IRCS115', '2024-05-01 00:00:00', true, NOW(), 0, 0, 4, 5, 0, 3, 2, '', 4, 2.5, 'NWW10', 'PEL03', '{"NWW10", "PEL03"}', 12345.67, 123102, 115, '[{"gear":"OTB","mesh":70,"dimensions":45}]', '[{"gear":"OTB","faoZone":"27.8.b","species":"BLI","weight":13.46},{"gear":"OTB","faoZone":"27.8.c","species":"HKE","weight":235.6},{"gear":"OTB","faoZone":"27.8.b","species":"HKE","weight":235.6}]');

INSERT INTO risk_factors (cfr, control_priority_level, control_rate_risk_factor, departure_datetime_utc, detectability_risk_factor, external_immatriculation, impact_risk_factor, infraction_rate_risk_factor, infraction_score, ircs, last_control_datetime_utc, last_control_infraction, last_logbook_message_datetime_utc, number_controls_last_3_years, number_controls_last_5_years, number_gear_seizures_last_5_years, number_infractions_last_5_years, number_recent_controls, number_species_seizures_last_5_years, number_vessel_seizures_last_5_years, post_control_comments, probability_risk_factor, risk_factor, segment_highest_impact, segment_highest_priority, segments, total_weight_onboard, trip_number, vessel_id, gear_onboard, species_onboard) VALUES ('CFR117', 4, 5, NOW() - INTERVAL '1 day', 1.8, 'EXTIMM117', 2, 3, NULL, 'IRCS117', '2023-10-15 00:00:00', true, NOW(), 0, 0, 4, 5, 0, 3, 2, '', 3, 2.2, 'NWW10', 'PEL 03', '{"NWW10", "PEL 03"}', 12345.67, 123102, 117, '[{"gear":"OTB","mesh":70,"dimensions":45}]', '[{"gear":"OTB","faoZone":"27.8.b","species":"BLI","weight":13.46},{"gear":"OTB","faoZone":"27.8.c","species":"HKE","weight":235.6},{"gear":"OTB","faoZone":"27.8.b","species":"HKE","weight":235.6}]');
INSERT INTO risk_factors (cfr, control_priority_level, control_rate_risk_factor, departure_datetime_utc, detectability_risk_factor, external_immatriculation, impact_risk_factor, infraction_rate_risk_factor, infraction_score, ircs, last_control_datetime_utc, last_control_infraction, last_logbook_message_datetime_utc, number_controls_last_3_years, number_controls_last_5_years, number_gear_seizures_last_5_years, number_infractions_last_5_years, number_recent_controls, number_species_seizures_last_5_years, number_vessel_seizures_last_5_years, post_control_comments, probability_risk_factor, risk_factor, segment_highest_impact, segment_highest_priority, segments, total_weight_onboard, trip_number, vessel_id, gear_onboard, species_onboard) VALUES ('CFR117', 4, 5, NOW() - INTERVAL '1 day', 1.8, 'EXTIMM117', 2, 3, NULL, 'IRCS117', '2023-10-15 00:00:00', true, NOW(), 0, 0, 4, 5, 0, 3, 2, '', 3, 2.2, 'NWW10', 'PEL03', '{"NWW10", "PEL03"}', 12345.67, 123102, 117, '[{"gear":"OTB","mesh":70,"dimensions":45}]', '[{"gear":"OTB","faoZone":"27.8.b","species":"BLI","weight":13.46},{"gear":"OTB","faoZone":"27.8.c","species":"HKE","weight":235.6},{"gear":"OTB","faoZone":"27.8.b","species":"HKE","weight":235.6}]');
Original file line number Diff line number Diff line change
Expand Up @@ -1030,9 +1030,9 @@ COPY public.last_positions (id, cfr, external_immatriculation, mmsi, ircs, vesse
estimated_current_longitude, impact_risk_factor, probability_risk_factor,
detectability_risk_factor, risk_factor, under_charter, is_at_port, alerts,
beacon_malfunction_id, reportings) FROM stdin;
10000 FAK000999999 DONTSINK \N CALLME PHENOMENE GB \N 47.921999999999997 -8.0129999999999999 8.40000000000000036 14 2021-01-15 07:32:00 00:40:00 2020-12-21 15:01:00 14.3 5.2 {"W10", "PEL 03"} [{"gear": "OTB", "mesh": 70.0, "dimensions": 45.0}] [{ "gear": "OTB","faoZone": "27.8.b","species": "BLI","weight": 13.46 },{ "gear": "OTB","faoZone": "27.8.c","species": "HKE","weight": 235.6 }] CAEN CN 2020-12-22 08:59:00 true Pas de com INTERNAL_REFERENCE_NUMBER 47.7123 -8.8123 2.1 2 3 2.473 t f {THREE_MILES_TRAWLING_ALERT} 1 \N
10001 SOCR4T3 LePhiloFilou \N SCRT SOCRATE FR \N 48.921999999999997 -8.0129999999999999 8.40000000000000036 14 2021-01-15 07:32:00 00:40:00 2020-12-21 15:01:00 14.3 5.2 {"W10", "PEL 03"} [{"gear": "OTB", "mesh": 70.0, "dimensions": 45.0}] [{ "gear": "OTB","faoZone": "27.8.b","species": "BLI","weight": 13.46 },{ "gear": "OTB","faoZone": "27.8.c","species": "HKE","weight": 235.6 }] ATHENES AT 2020-12-22 08:59:00 true No comment INTERNAL_REFERENCE_NUMBER 49.003 -7.9523 2.1 2 3 2.473 f f \N \N \N
10002 U_W0NTFINDME ABC123456 \N TALK2ME MALOTRU FR \N 48.221999999999997 -8.5129999999999999 8.40000000000000036 14 2021-01-15 07:32:00 00:40:00 2020-12-21 15:01:00 14.3 5.2 {"W10", "PEL 03"} [{"gear": "OTB", "mesh": 70.0, "dimensions": 45.0}] [{ "gear": "OTB","faoZone": "27.8.b","species": "BLI","weight": 13.46 },{ "gear": "OTB","faoZone": "27.8.c","species": "HKE","weight": 235.6 }] ATHENES AT 2020-12-22 08:59:00 true No comment INTERNAL_REFERENCE_NUMBER 49.003 -7.9523 2.1 2 3 2.473 f f \N \N \N
10000 FAK000999999 DONTSINK \N CALLME PHENOMENE GB \N 47.921999999999997 -8.0129999999999999 8.40000000000000036 14 2021-01-15 07:32:00 00:40:00 2020-12-21 15:01:00 14.3 5.2 {"W10", "PEL03"} [{"gear": "OTB", "mesh": 70.0, "dimensions": 45.0}] [{ "gear": "OTB","faoZone": "27.8.b","species": "BLI","weight": 13.46 },{ "gear": "OTB","faoZone": "27.8.c","species": "HKE","weight": 235.6 }] CAEN CN 2020-12-22 08:59:00 true Pas de com INTERNAL_REFERENCE_NUMBER 47.7123 -8.8123 2.1 2 3 2.473 t f {THREE_MILES_TRAWLING_ALERT} 1 \N
10001 SOCR4T3 LePhiloFilou \N SCRT SOCRATE FR \N 48.921999999999997 -8.0129999999999999 8.40000000000000036 14 2021-01-15 07:32:00 00:40:00 2020-12-21 15:01:00 14.3 5.2 {"W10", "PEL03"} [{"gear": "OTB", "mesh": 70.0, "dimensions": 45.0}] [{ "gear": "OTB","faoZone": "27.8.b","species": "BLI","weight": 13.46 },{ "gear": "OTB","faoZone": "27.8.c","species": "HKE","weight": 235.6 }] ATHENES AT 2020-12-22 08:59:00 true No comment INTERNAL_REFERENCE_NUMBER 49.003 -7.9523 2.1 2 3 2.473 f f \N \N \N
10002 U_W0NTFINDME ABC123456 \N TALK2ME MALOTRU FR \N 48.221999999999997 -8.5129999999999999 8.40000000000000036 14 2021-01-15 07:32:00 00:40:00 2020-12-21 15:01:00 14.3 5.2 {"W10", "PEL03"} [{"gear": "OTB", "mesh": 70.0, "dimensions": 45.0}] [{ "gear": "OTB","faoZone": "27.8.b","species": "BLI","weight": 13.46 },{ "gear": "OTB","faoZone": "27.8.c","species": "HKE","weight": 235.6 }] ATHENES AT 2020-12-22 08:59:00 true No comment INTERNAL_REFERENCE_NUMBER 49.003 -7.9523 2.1 2 3 2.473 f f \N \N \N
\.

update last_positions
Expand Down
Loading

0 comments on commit 96ea498

Please sign in to comment.