diff --git a/mens-batch/src/main/java/kr/xit/batch/ens/scheduler/SndngAcceptJobScheduler.java b/mens-batch/src/main/java/kr/xit/batch/ens/scheduler/SndngAcceptJobScheduler.java index 6ea1e0a..d3f43eb 100644 --- a/mens-batch/src/main/java/kr/xit/batch/ens/scheduler/SndngAcceptJobScheduler.java +++ b/mens-batch/src/main/java/kr/xit/batch/ens/scheduler/SndngAcceptJobScheduler.java @@ -5,6 +5,7 @@ import java.util.HashMap; import java.util.Map; import kr.xit.batch.ens.job.SndngAcceptJobConfig; 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; @@ -46,17 +47,21 @@ public class SndngAcceptJobScheduler { @Value("${app.slack-webhook.enabled:false}") private String isSlackEnabled; - //@Scheduled(cron = "${app.batch.cron.ens.accept}") + @Scheduled(cron = "${app.batch.cron.ens.accept}") public void runJob() { Map confMap = new HashMap<>(); confMap.put("startDate", new JobParameter(new Date())); confMap.put("isSlackEnabled", new JobParameter(isSlackEnabled)); confMap.put("sndngProcessSttus", new JobParameter(ApiConstants.SndngProcessStatus.ACCEPT.getCode())); - JobParameters jobParameters = new JobParameters(confMap); try { - jobLauncher.run(jobConfiguration.sndngAcceptJob(), jobParameters); + 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.sndngAcceptJob(), jobParameters); + } } catch (JobExecutionAlreadyRunningException | JobInstanceAlreadyCompleteException | JobParametersInvalidException | org.springframework.batch.core.repository.JobRestartException e) { diff --git a/mens-batch/src/main/java/kr/xit/batch/ens/scheduler/SndngCloseJobScheduler.java b/mens-batch/src/main/java/kr/xit/batch/ens/scheduler/SndngCloseJobScheduler.java index 8466afb..ef78b8f 100644 --- a/mens-batch/src/main/java/kr/xit/batch/ens/scheduler/SndngCloseJobScheduler.java +++ b/mens-batch/src/main/java/kr/xit/batch/ens/scheduler/SndngCloseJobScheduler.java @@ -5,6 +5,7 @@ import java.util.HashMap; import java.util.Map; import kr.xit.batch.ens.job.SndngCloseJobConfig; 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; /** @@ -52,10 +52,14 @@ public class SndngCloseJobScheduler { 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 { - jobLauncher.run(jobConfiguration.sndngCloseJob(), jobParameters); + 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.sndngCloseJob(), jobParameters); + } } catch (JobExecutionAlreadyRunningException | JobInstanceAlreadyCompleteException | JobParametersInvalidException | org.springframework.batch.core.repository.JobRestartException e) { diff --git a/mens-batch/src/main/java/kr/xit/batch/ens/scheduler/SndngMakeJobScheduler.java b/mens-batch/src/main/java/kr/xit/batch/ens/scheduler/SndngMakeJobScheduler.java index 8325736..cfeab59 100644 --- a/mens-batch/src/main/java/kr/xit/batch/ens/scheduler/SndngMakeJobScheduler.java +++ b/mens-batch/src/main/java/kr/xit/batch/ens/scheduler/SndngMakeJobScheduler.java @@ -5,6 +5,7 @@ import java.util.HashMap; import java.util.Map; import kr.xit.batch.ens.job.SndngMakeJobConfig; 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; @@ -51,10 +52,14 @@ public class SndngMakeJobScheduler { confMap.put("startDate", new JobParameter(new Date())); confMap.put("isSlackEnabled", new JobParameter(isSlackEnabled)); confMap.put("sndngProcessSttus", new JobParameter(ApiConstants.SndngProcessStatus.ACCEPT_OK.getCode())); - JobParameters jobParameters = new JobParameters(confMap); try { - jobLauncher.run(jobConfiguration.sndngMakeJob(), jobParameters); + 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.sndngMakeJob(), jobParameters); + } } catch (JobExecutionAlreadyRunningException | JobInstanceAlreadyCompleteException | JobParametersInvalidException | org.springframework.batch.core.repository.JobRestartException e) { diff --git a/mens-batch/src/main/java/kr/xit/batch/ens/scheduler/SndngSendBulksJobScheduler.java b/mens-batch/src/main/java/kr/xit/batch/ens/scheduler/SndngSendBulksJobScheduler.java index 644480e..2eeec94 100644 --- a/mens-batch/src/main/java/kr/xit/batch/ens/scheduler/SndngSendBulksJobScheduler.java +++ b/mens-batch/src/main/java/kr/xit/batch/ens/scheduler/SndngSendBulksJobScheduler.java @@ -5,6 +5,7 @@ import java.util.HashMap; import java.util.Map; import kr.xit.batch.ens.job.SndngSnedBulksJobConfig; 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 SndngSendBulksJobScheduler { confMap.put("startDate", new JobParameter(new Date())); confMap.put("isSlackEnabled", new JobParameter(isSlackEnabled)); confMap.put("sndngProcessSttus", new JobParameter(ApiConstants.SndngProcessStatus.MAKE_OK.getCode())); - JobParameters jobParameters = new JobParameters(confMap); try { - jobLauncher.run(jobConfiguration.sndngSendBulksJob(), jobParameters); + 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.sndngSendBulksJob(), jobParameters); + } } catch (JobExecutionAlreadyRunningException | JobInstanceAlreadyCompleteException | JobParametersInvalidException | org.springframework.batch.core.repository.JobRestartException e) { diff --git a/mens-batch/src/main/java/kr/xit/batch/ens/scheduler/SndngStatusBulksJobScheduler.java b/mens-batch/src/main/java/kr/xit/batch/ens/scheduler/SndngStatusBulksJobScheduler.java index fd61d4b..a11ce39 100644 --- a/mens-batch/src/main/java/kr/xit/batch/ens/scheduler/SndngStatusBulksJobScheduler.java +++ b/mens-batch/src/main/java/kr/xit/batch/ens/scheduler/SndngStatusBulksJobScheduler.java @@ -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 { - jobLauncher.run(jobConfiguration.sndngStatusBulksJob(), jobParameters); + 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) {