From 81ccb1e3311cf139ca81d2ab0d873767a5f2fca0 Mon Sep 17 00:00:00 2001 From: trevlenb2 Date: Thu, 24 Oct 2024 22:52:39 +0200 Subject: [PATCH] gdrs sql files --- .../api/v1/facade/controller/HdssFacadeController.java | 5 ++++- src/main/resources/db/migration/V0_0_162__add_hdss_table.sql | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/revealprecision/revealserver/api/v1/facade/controller/HdssFacadeController.java b/src/main/java/com/revealprecision/revealserver/api/v1/facade/controller/HdssFacadeController.java index 850bd06a..463f2220 100644 --- a/src/main/java/com/revealprecision/revealserver/api/v1/facade/controller/HdssFacadeController.java +++ b/src/main/java/com/revealprecision/revealserver/api/v1/facade/controller/HdssFacadeController.java @@ -138,6 +138,8 @@ public ResponseEntity> search( // Construct the JSON array format as a string + log.debug("search date: {}",searchDate); + searchDeterminer = searchDeterminer.concat("D"); } if (hdssSearchRequest.getSearchString() != null) { @@ -155,9 +157,10 @@ public ResponseEntity> search( hdssSearchRequest.getGender(), searchDate); break; case "GDS": + log.debug("search date: {}",searchDate); individualProjections = compoundsRepository.searchWithStringGenderAndDob( hdssSearchRequest.getSearchString(), hdssSearchRequest.getGender(), - hdssSearchRequest.getDob()); + searchDate); break; case "D": individualProjections = compoundsRepository.searchWithDob( diff --git a/src/main/resources/db/migration/V0_0_162__add_hdss_table.sql b/src/main/resources/db/migration/V0_0_162__add_hdss_table.sql index be39a037..e7331d97 100644 --- a/src/main/resources/db/migration/V0_0_162__add_hdss_table.sql +++ b/src/main/resources/db/migration/V0_0_162__add_hdss_table.sql @@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS hdss.hdss_compounds primary key (id) ); -create sequence hdss.hdss_compounds_seq +create sequence IF NOT EXISTS hdss.hdss_compounds_seq as int minvalue 0;