Skip to content

Commit

Permalink
Added Trip Duration to Rule/Query Builder
Browse files Browse the repository at this point in the history
Trip Duration is added to the query builder under PNR.
This resolves #416
  • Loading branch information
kasimhelil committed May 29, 2019
1 parent 376fbbd commit dd24909
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ public enum PNRMapping implements IEntityMapping {
PASSENGER_COUNT ("passengerCount", "Passenger Count", TypeEnum.INTEGER.getType()),
RECORD_LOCATOR ("recordLocator", "Record Locator", TypeEnum.STRING.getType()),
SEAT ("seat", "Seat", TypeEnum.STRING.getType()),
TRIP_TYPE("tripType", "Trip Type", TypeEnum.STRING.getType());
TRIP_TYPE("tripType", "Trip Type", TypeEnum.STRING.getType()),
TRIP_DURATION("tripDuration", "Trip Duration", TypeEnum.DOUBLE.getType());

private String fieldName;
private String friendlyName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,16 @@ public class PnrVo extends MessageVo {
private List<DocumentVo> documents = new ArrayList<>();
private List<SeatVo> seatAssignments = new ArrayList<>();
private String tripType;
private double tripDuration;


public Long getId() {
public double getTripDuration() {
return tripDuration;
}
public void setTripDuration(double tripDuration) {
this.tripDuration = tripDuration;
}
public Long getId() {
return id;
}
public void setId(Long id) {
Expand Down
15 changes: 15 additions & 0 deletions gtas-parent/gtas-webapp/src/main/webapp/data/entities.json
Original file line number Diff line number Diff line change
Expand Up @@ -1350,6 +1350,21 @@
"EQUAL",
"NOT_EQUAL"
]
},
{
"id": "Pnr.tripDuration",
"label": "Trip Duration",
"type": "double",
"operators": [
"EQUAL",
"NOT_EQUAL",
"LESS",
"LESS_OR_EQUAL",
"GREATER",
"GREATER_OR_EQUAL",
"BETWEEN",
"NOT_BETWEEN"
]
}
]
},
Expand Down

0 comments on commit dd24909

Please sign in to comment.