Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GRAD2-2958 #529

Merged
merged 2 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import ca.bc.gov.educ.api.batchgraduation.service.TaskSchedulingService;
import ca.bc.gov.educ.api.batchgraduation.util.DateUtils;
import ca.bc.gov.educ.api.batchgraduation.util.JsonTransformer;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.batch.core.JobExecution;
Expand All @@ -21,7 +20,8 @@

import java.util.*;

import static ca.bc.gov.educ.api.batchgraduation.util.EducGradBatchGraduationApiConstants.*;
import static ca.bc.gov.educ.api.batchgraduation.util.EducGradBatchGraduationApiConstants.SEARCH_REQUEST;
import static ca.bc.gov.educ.api.batchgraduation.util.EducGradBatchGraduationApiConstants.USER_SCHEDULED;

public abstract class BaseRunCompletionNotificationListener implements JobExecutionListener {

Expand Down Expand Up @@ -88,9 +88,7 @@ protected void handleSummary(JobExecution jobExecution, String summaryDtoName, b
if (!isSpecialRun) {
updateBackStudentFlagForErroredStudents(summaryDTO.getErrors(), jobType, obj.getAccess_token());
}
if(!StringUtils.equalsAnyIgnoreCase(req.getActivityCode(), TVRCREATE, TVRUPDATE, TVRDELETE, ALL)) {
processSchoolList(jobExecutionId, jobType);
}
processSchoolList(jobExecutionId, jobType);
}

private void processBatchJobHistory(AlgorithmSummaryDTO summaryDTO, Long jobExecutionId, String status, String jobTrigger, String jobType, Date startTime, Date endTime) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package ca.bc.gov.educ.api.batchgraduation.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
Expand Down Expand Up @@ -41,12 +42,13 @@ public class StudentSearchRequest implements Serializable {
String localDownload;
Integer quantity;

@JsonIgnore
public boolean isEmpty() {
return schoolOfRecords.isEmpty() &&
districts.isEmpty() &&
schoolCategoryCodes.isEmpty() &&
pens.isEmpty() &&
studentIDs.isEmpty() &&
programs.isEmpty();
return (schoolOfRecords == null || schoolOfRecords.isEmpty()) &&
(districts == null || districts.isEmpty()) &&
(schoolCategoryCodes == null || schoolCategoryCodes.isEmpty()) &&
(pens == null || pens.isEmpty()) &&
(studentIDs == null || studentIDs.isEmpty());
}

}
Loading