From 77e2f0a3fbad78668fff9ddbdcaeeb497c69089d Mon Sep 17 00:00:00 2001 From: Robert Stine Date: Fri, 20 Sep 2019 15:04:16 -0400 Subject: [PATCH] #1403 hotfix - Update resolution to correctly get gender --- .../src/main/java/gov/gtas/services/ServiceUtil.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gtas-parent/gtas-loader/src/main/java/gov/gtas/services/ServiceUtil.java b/gtas-parent/gtas-loader/src/main/java/gov/gtas/services/ServiceUtil.java index 3e093bc7de..5458d08fa3 100644 --- a/gtas-parent/gtas-loader/src/main/java/gov/gtas/services/ServiceUtil.java +++ b/gtas-parent/gtas-loader/src/main/java/gov/gtas/services/ServiceUtil.java @@ -268,7 +268,9 @@ public Passenger findPassengerOnFlight(Flight f, PassengerVo pvo) { // Find passenger by First Name, Last Name, and gender if (!foundPassenger && newPaxHasGender) { for (Passenger pax : flightPaxList) { - if (haveSameGender(pax, pvo)) { + if (haveSameGender(pax, pvo) + && isNull(pax.getPassengerDetails().getDob()) + && isNull(pax.getDocuments())) { existingPassenger = pax; break; } @@ -278,7 +280,8 @@ public Passenger findPassengerOnFlight(Flight f, PassengerVo pvo) { // Find passenger by First Name and Last Name if (!foundPassenger) { for (Passenger pax : flightPaxList) { - if (isNull(pax.getPassengerDetails().getDob()) && isNull(pax.getPassengerDetails().getGender()) + if (isNull(pax.getPassengerDetails().getDob()) + && isNull(pax.getPassengerDetails().getGender()) && isNull(pax.getDocuments())) { existingPassenger = pax;