|
|
|
@ -5,6 +5,7 @@ import java.util.HashMap;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
import kr.xit.batch.ens.job.SndngStatusBulksJobConfig;
|
|
|
|
|
import kr.xit.biz.common.ApiConstants;
|
|
|
|
|
import kr.xit.biz.common.ApiConstants.SignguCode;
|
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.springframework.batch.core.JobParameter;
|
|
|
|
@ -14,7 +15,6 @@ import org.springframework.batch.core.launch.JobLauncher;
|
|
|
|
|
import org.springframework.batch.core.repository.JobExecutionAlreadyRunningException;
|
|
|
|
|
import org.springframework.batch.core.repository.JobInstanceAlreadyCompleteException;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -51,10 +51,14 @@ public class SndngStatusBulksJobScheduler {
|
|
|
|
|
confMap.put("startDate", new JobParameter(new Date()));
|
|
|
|
|
confMap.put("isSlackEnabled", new JobParameter(isSlackEnabled));
|
|
|
|
|
confMap.put("sndngProcessSttus", new JobParameter(ApiConstants.SndngProcessStatus.SEND_OK.getCode()));
|
|
|
|
|
JobParameters jobParameters = new JobParameters(confMap);
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
for(SignguCode signguCode : SignguCode.values()) {
|
|
|
|
|
confMap.put("signguCode", new JobParameter(signguCode.getCode()));
|
|
|
|
|
confMap.put("ffnlgCode", new JobParameter(ApiConstants.FFNLN_CODE));
|
|
|
|
|
JobParameters jobParameters = new JobParameters(confMap);
|
|
|
|
|
jobLauncher.run(jobConfiguration.sndngStatusBulksJob(), jobParameters);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} catch (JobExecutionAlreadyRunningException | JobInstanceAlreadyCompleteException
|
|
|
|
|
| JobParametersInvalidException | org.springframework.batch.core.repository.JobRestartException e) {
|
|
|
|
|