diff --git a/mens-batch/src/main/java/kr/xit/batch/ens/scheduler/KtGbsAccessTokenUpdateJobScheduler.java b/mens-batch/src/main/java/kr/xit/batch/ens/scheduler/KtGbsAccessTokenUpdateJobScheduler.java index 175b044..44b55ee 100644 --- a/mens-batch/src/main/java/kr/xit/batch/ens/scheduler/KtGbsAccessTokenUpdateJobScheduler.java +++ b/mens-batch/src/main/java/kr/xit/batch/ens/scheduler/KtGbsAccessTokenUpdateJobScheduler.java @@ -15,6 +15,7 @@ import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; import kr.xit.batch.ens.job.KtGbsAccessTokenUpdateJobConfig; +import kr.xit.batch.ens.task.cmm.TaskCmmUtils; import kr.xit.biz.common.ApiConstants; import kr.xit.biz.common.ApiConstants.SignguCode; import lombok.RequiredArgsConstructor; @@ -56,7 +57,7 @@ public class KtGbsAccessTokenUpdateJobScheduler { confMap.put("isSlackEnabled", new JobParameter(isSlackEnabled)); try { - for(SignguCode signguCode : SignguCode.values()) { + for(SignguCode signguCode : TaskCmmUtils.getSignguCodeList()) { confMap.put("signguCode", new JobParameter(signguCode.getCode())); confMap.put("ffnlgCode", new JobParameter(ApiConstants.FFNLN_CODE)); JobParameters jobParameters = new JobParameters(confMap); 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 d3f43eb..ecd1aad 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 @@ -3,11 +3,7 @@ package kr.xit.batch.ens.scheduler; import java.util.Date; 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; import org.springframework.batch.core.JobParameters; import org.springframework.batch.core.JobParametersInvalidException; @@ -18,6 +14,13 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; +import kr.xit.batch.ens.job.SndngAcceptJobConfig; +import kr.xit.batch.ens.task.cmm.TaskCmmUtils; +import kr.xit.biz.common.ApiConstants; +import kr.xit.biz.common.ApiConstants.SignguCode; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; + /** *
  * description : 연계 발송 - 접수 데이타 생성
@@ -56,7 +59,7 @@ public class SndngAcceptJobScheduler {
         confMap.put("sndngProcessSttus", new JobParameter(ApiConstants.SndngProcessStatus.ACCEPT.getCode()));
 
         try {
-            for(SignguCode signguCode : SignguCode.values()) {
+            for(SignguCode signguCode : TaskCmmUtils.getSignguCodeList()) {
                 confMap.put("signguCode", new JobParameter(signguCode.getCode()));
                 confMap.put("ffnlgCode", new JobParameter(ApiConstants.FFNLN_CODE));
                 JobParameters jobParameters = new JobParameters(confMap);
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 2322b48..cef41dd 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
@@ -3,11 +3,7 @@ package kr.xit.batch.ens.scheduler;
 import java.util.Date;
 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;
 import org.springframework.batch.core.JobParameters;
 import org.springframework.batch.core.JobParametersInvalidException;
@@ -18,6 +14,13 @@ import org.springframework.beans.factory.annotation.Value;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
+import kr.xit.batch.ens.job.SndngCloseJobConfig;
+import kr.xit.batch.ens.task.cmm.TaskCmmUtils;
+import kr.xit.biz.common.ApiConstants;
+import kr.xit.biz.common.ApiConstants.SignguCode;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+
 /**
  * 
  * description :상태 close - send-ok
@@ -55,7 +58,7 @@ public class SndngCloseJobScheduler {
         confMap.put("sndngProcessSttus", new JobParameter(ApiConstants.SndngProcessStatus.SEND_OK.getCode()));
 
         try {
-            for(SignguCode signguCode : SignguCode.values()) {
+            for(SignguCode signguCode : TaskCmmUtils.getSignguCodeList()) {
                 confMap.put("signguCode", new JobParameter(signguCode.getCode()));
                 confMap.put("ffnlgCode", new JobParameter(ApiConstants.FFNLN_CODE));
                 JobParameters jobParameters = new JobParameters(confMap);
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 b429789..841975c 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
@@ -3,11 +3,7 @@ package kr.xit.batch.ens.scheduler;
 import java.util.Date;
 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;
 import org.springframework.batch.core.JobParameters;
 import org.springframework.batch.core.JobParametersInvalidException;
@@ -18,6 +14,13 @@ import org.springframework.beans.factory.annotation.Value;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
+import kr.xit.batch.ens.job.SndngMakeJobConfig;
+import kr.xit.batch.ens.task.cmm.TaskCmmUtils;
+import kr.xit.biz.common.ApiConstants;
+import kr.xit.biz.common.ApiConstants.SignguCode;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+
 /**
  * 
  * description : 연계 발송 - 전송 대상 데이타 생성
@@ -55,7 +58,7 @@ public class SndngMakeJobScheduler {
         confMap.put("sndngProcessSttus", new JobParameter(ApiConstants.SndngProcessStatus.ACCEPT_OK.getCode()));
 
         try {
-            for(SignguCode signguCode : SignguCode.values()) {
+            for(SignguCode signguCode : TaskCmmUtils.getSignguCodeList()) {
                 confMap.put("signguCode", new JobParameter(signguCode.getCode()));
                 confMap.put("ffnlgCode", new JobParameter(ApiConstants.FFNLN_CODE));
                 JobParameters jobParameters = new JobParameters(confMap);
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 e913b87..7a3ede2 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
@@ -3,11 +3,7 @@ package kr.xit.batch.ens.scheduler;
 import java.util.Date;
 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;
 import org.springframework.batch.core.JobParameters;
 import org.springframework.batch.core.JobParametersInvalidException;
@@ -18,6 +14,13 @@ import org.springframework.beans.factory.annotation.Value;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
+import kr.xit.batch.ens.job.SndngSnedBulksJobConfig;
+import kr.xit.batch.ens.task.cmm.TaskCmmUtils;
+import kr.xit.biz.common.ApiConstants;
+import kr.xit.biz.common.ApiConstants.SignguCode;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+
 /**
  * 
  * description : 연계 발송 - 전송
@@ -54,7 +57,7 @@ public class SndngSendBulksJobScheduler {
         confMap.put("sndngProcessSttus", new JobParameter(ApiConstants.SndngProcessStatus.MAKE_OK.getCode()));
 
         try {
-            for(SignguCode signguCode : SignguCode.values()) {
+            for(SignguCode signguCode : TaskCmmUtils.getSignguCodeList()) {
                 confMap.put("signguCode", new JobParameter(signguCode.getCode()));
                 confMap.put("ffnlgCode", new JobParameter(ApiConstants.FFNLN_CODE));
                 JobParameters jobParameters = new JobParameters(confMap);
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 04b0342..d7c263e 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
@@ -3,11 +3,7 @@ package kr.xit.batch.ens.scheduler;
 import java.util.Date;
 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;
 import org.springframework.batch.core.JobParameters;
 import org.springframework.batch.core.JobParametersInvalidException;
@@ -18,6 +14,13 @@ import org.springframework.beans.factory.annotation.Value;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
+import kr.xit.batch.ens.job.SndngStatusBulksJobConfig;
+import kr.xit.batch.ens.task.cmm.TaskCmmUtils;
+import kr.xit.biz.common.ApiConstants;
+import kr.xit.biz.common.ApiConstants.SignguCode;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+
 /**
  * 
  * description : 연계 발송 - 상태조회
@@ -54,7 +57,7 @@ public class SndngStatusBulksJobScheduler {
         confMap.put("sndngProcessSttus", new JobParameter(ApiConstants.SndngProcessStatus.SEND_OK.getCode()));
 
         try {
-            for(SignguCode signguCode : SignguCode.values()) {
+            for(SignguCode signguCode : TaskCmmUtils.getSignguCodeList()) {
                 confMap.put("signguCode", new JobParameter(signguCode.getCode()));
                 confMap.put("ffnlgCode", new JobParameter(ApiConstants.FFNLN_CODE));
                 JobParameters jobParameters = new JobParameters(confMap);
diff --git a/mens-batch/src/main/java/kr/xit/batch/ens/task/cmm/TaskCmmUtils.java b/mens-batch/src/main/java/kr/xit/batch/ens/task/cmm/TaskCmmUtils.java
index e6aff34..83a6e43 100644
--- a/mens-batch/src/main/java/kr/xit/batch/ens/task/cmm/TaskCmmUtils.java
+++ b/mens-batch/src/main/java/kr/xit/batch/ens/task/cmm/TaskCmmUtils.java
@@ -1,6 +1,10 @@
 package kr.xit.batch.ens.task.cmm;
 
-import static egovframework.com.cmm.util.EgovStringUtil.cutString;
+import static egovframework.com.cmm.util.EgovStringUtil.*;
+
+import java.util.Arrays;
+
+import org.slf4j.MDC;
 
 import kr.xit.biz.common.ApiConstants;
 import kr.xit.biz.ens.model.cmm.SndngMssageParam;
@@ -8,7 +12,6 @@ import kr.xit.core.biz.batch.model.BatchCmmDTO.BatchLock;
 import kr.xit.core.spring.util.BatchSpringUtils;
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
-import org.slf4j.MDC;
 
 /**
  * 
@@ -79,4 +82,16 @@ public class TaskCmmUtils {
                         .build()
         );
     }
+
+    public static ApiConstants.SignguCode[] getSignguCodeList() {
+        if(ApiConstants.IS_CCN){
+            return (ApiConstants.SignguCode[])Arrays.stream(ApiConstants.SignguCode.values())
+                .filter(d -> d.getCode().equals(ApiConstants.SignguCode.CHUNCHEON.getCode()))
+                .toArray();
+
+        }
+        return (ApiConstants.SignguCode[])Arrays.stream(ApiConstants.SignguCode.values())
+            .filter(d -> !d.getCode().equals(ApiConstants.SignguCode.CHUNCHEON.getCode()))
+            .toArray();
+    }
 }