Skip to content

Commit

Permalink
Merge pull request #2012 from US-CBP/fix/seatCharts
Browse files Browse the repository at this point in the history
Fix/seat charts
  • Loading branch information
KMnOFour authored Feb 17, 2021
2 parents 116fb7d + dadf71d commit 87bf669
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ public List<SeatVo> getSeatsByFlightId(Long flightId) {
vo.setPaxId(passenger.getId());
vo.setFirstName(passenger.getPassengerDetails().getFirstName());
vo.setLastName(passenger.getPassengerDetails().getLastName());
vo.setMiddleName(passenger.getPassengerDetails().getMiddleName());
vo.setMiddleInitial(passenger.getPassengerDetails().getMiddleName());
vo.setFlightNumber(flight.getFlightNumber());
vo.setRefNumber(passenger.getPassengerTripDetails().getReservationReferenceNumber());
Expand All @@ -308,7 +309,7 @@ public List<SeatVo> getSeatsByFlightId(Long flightId) {
parentSeatVo.setCoTravellers(new String[0]);
} else {
parentSeatVo.setCoTravellers(seatVos.stream().filter(isCoTravelerSeat(parentSeatVo))
.collect(Collectors.toList()).stream().map(SeatVo::getNumber).toArray(String[]::new));
.collect(Collectors.toList()).stream().map(SeatVo::getNumber).distinct().toArray(String[]::new));
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public class SeatVo implements PIIObject {
private String flightNumber;
private String firstName;
private String lastName;
private String middleName;

private Long flightId;
private Long paxId;
Expand All @@ -35,14 +36,15 @@ public class SeatVo implements PIIObject {
* @param hasHits
* @param coTravellers
*/
public SeatVo(String seatNumber, Long flightId, Long paxId, String firstName, String lastName, String middleInitial,
public SeatVo(String seatNumber, Long flightId, Long paxId, String firstName, String lastName, String middleName, String middleInitial,
boolean hasHits, String[] coTravellers, String refNumber, Boolean apis) {
super();
this.number = seatNumber;
this.flightId = flightId;
this.paxId = paxId;
this.firstName = firstName;
this.lastName = lastName;
this.middleName = middleName;
this.middleInitial = middleInitial;
this.hasHits = hasHits;
this.coTravellers = coTravellers;
Expand Down Expand Up @@ -133,6 +135,13 @@ public String getLastName() {
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getMiddleName() {
return middleName;
}

public void setMiddleName(String middleName) {
this.middleName = middleName;
}

public String getRefNumber() {
return refNumber;
Expand Down

0 comments on commit 87bf669

Please sign in to comment.