Skip to content

Commit

Permalink
Fix username for student history
Browse files Browse the repository at this point in the history
  • Loading branch information
arybakov-cgi committed Aug 20, 2024
1 parent cda1209 commit 1a38c30
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ public class GradStudentController {

@SuppressWarnings("unused")
private static final Logger logger = LoggerFactory.getLogger(GradStudentController.class);
private static final String BEARER = "Bearer ";


private final GradStudentService gradStudentService;

public GradStudentController(GradStudentService gradStudentService) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -408,14 +408,20 @@ public List<UUID> getStudentIDsByStatusCode(List<UUID> studentIDs, String status

public List<UUID> getStudentIDsBySearchCriteriaOrAll(StudentSearchRequest searchRequest) {
ArrayList<UUID> result = new ArrayList<>();
result.addAll(searchRequest.getStudentIDs());
boolean paramsNotEmpty = false;
if(searchRequest.getStudentIDs() != null && !searchRequest.getStudentIDs().isEmpty()) {
paramsNotEmpty = true;
result.addAll(searchRequest.getStudentIDs());
}
if(searchRequest.getPens() != null && !searchRequest.getPens().isEmpty()) {
paramsNotEmpty = true;
result.addAll(graduationStatusRepository.findStudentIDsByPenIn(searchRequest.getPens()));
}
if(searchRequest.getSchoolOfRecords() != null && !searchRequest.getSchoolOfRecords().isEmpty()) {
paramsNotEmpty = true;
result.addAll(graduationStatusRepository.findBySchoolOfRecordIn(searchRequest.getSchoolOfRecords()));
}
if(result.isEmpty()) {
if(!paramsNotEmpty) {
result.addAll(graduationStatusRepository.findAllStudentGuids());
}
return result;
Expand Down

0 comments on commit 1a38c30

Please sign in to comment.