Skip to content

Commit

Permalink
Merge pull request #2040 from US-CBP/1.14.1
Browse files Browse the repository at this point in the history
1.14.1
  • Loading branch information
simbamarufu1 committed Mar 29, 2021
2 parents b961727 + eed914f commit 4541486
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ public class HitEmailNotificationService {
@Value("${login.page.url}")
private String urlToLoginPage;

@Value("${hit.priority.filter}")
private Boolean hitPriorityFilter;

@Transactional
public List<EmailDTO> generateAutomatedHighPriorityHitEmailDTOs(Set<Passenger> passengers) throws IOException, TemplateException {
List<EmailDTO> emailDTOs = new ArrayList<>();
Expand Down Expand Up @@ -103,7 +106,11 @@ private boolean hasHighPriorityHitCategory(Passenger passenger) {
if (dob != null) {
LocalDateTime localDateTimeDOB = Instant.ofEpochMilli(dob.getTime()).atZone(ZoneOffset.UTC)
.toLocalDateTime();
if (!(localDateTimeDOB.getDayOfMonth() == 1 && localDateTimeDOB.getMonth() == Month.JANUARY)) {
if (!hitPriorityFilter) {
hasHighPriorityHitCategory = passenger.getHitDetails().stream()
.anyMatch(hitDetail -> priorityHitCategory
.equals(hitDetail.getHitMaker().getHitCategory().getId()));
} else if (!(localDateTimeDOB.getDayOfMonth() == 1 && localDateTimeDOB.getMonth() == Month.JANUARY)) {
hasHighPriorityHitCategory = passenger.getHitDetails().stream()
.filter(hd -> HitTypeEnum.PARTIAL_WATCHLIST != hd.getHitEnum())
.anyMatch(hitDetail -> priorityHitCategory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1073,6 +1073,7 @@ private String removeSpecialCharacters(String str) {

str = str.replaceAll("\\n", "");
str = str.replaceAll("\\r", "");
str = str.replaceAll("\\t", "");
return str;

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public PaxDetailPdfDocResponse createPassengerEventReport(Long paxId, Long fligh

PaxDetailPdfDocRequest paxDetailPdfDocRequest = new PaxDetailPdfDocRequest();
PaxDetailPdfDocResponse paxDetailPdfDocResponse = new PaxDetailPdfDocResponse();
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-DD HH:mm:ss");
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
PassengerVo passengerVo = new PassengerVo();
Flight flight = flightService.findById(flightId);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ site.language=en
#primary key id of the default hit category.
hit.general.category=1
hit.priority.category=
hit.priority.filter=false

###User group Settings ###
#primary key for default user group
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@
GRAPH_RULE: true,
MANUAL: true,
EXTERNAL_RULE: true,
PARTIAL_WATCHLIST: false
PARTIAL_WATCHLIST: true
};
let ruleCatFilter;
let startDate = new Date();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
GRAPH_RULE: true,
MANUAL: true,
EXTERNAL_RULE: true,
PARTIAL_WATCHLIST: false
PARTIAL_WATCHLIST: true
},
ruleCatFilter: getDefaultCats(),
etaStart: getDefaultStartDate(),
Expand Down
2 changes: 1 addition & 1 deletion gtas-parent/gtas-webapp/src/main/webapp/cases/CaseModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ app.service("caseModel", function (caseDispositionService) {
GRAPH_RULE: true,
MANUAL: true,
EXTERNAL_RULE: true,
PARTIAL_WATCHLIST: false
PARTIAL_WATCHLIST: true
},
ruleCatFilter,
startDate = new Date(),
Expand Down

0 comments on commit 4541486

Please sign in to comment.