batch.job.enable 추가 : 운영에서 7월까지 배치(공통코드 제외)가 실행되면 안됨

This commit is contained in:
cha 2025-05-30 17:36:55 +09:00
parent ee2a8a357d
commit 25c10e5f16
4 changed files with 37 additions and 4 deletions

View File

@ -1,5 +1,6 @@
package com.interplug.qcast.batch;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
@ -31,6 +32,8 @@ public class JobLauncherController {
@Value("${qsp.master-admin-user-batch-url}")
private String qspInterfaceUrl;
@Value("${batch.job.enabled}")
private boolean batchJobEnabled;
/**
* 특정 Job을 매핑으로 실행하는 메소드
*
@ -54,6 +57,29 @@ public class JobLauncherController {
resultMap.put("message", "Job" + jobName + " not found");
return resultMap;
}
String[] arryJob = {
"storeAdditionalJob"
,"BOMJob"
,"materialJob"
,"businessChargerJob"
,"adminUserJob"
,"priceJob"
// ,"commonCodeJob"
,"specialNoteDispItemAdditionalJob"
,"planConfirmJob"
,"estimateSyncJob"
};
if(!batchJobEnabled ){
for(String jobName2 :arryJob){
if(jobName2.equals(jobName)){
resultMap.put("code", "FAILED");
resultMap.put("message", "application.yml :: batch.job.enabled true");
return resultMap;
}
}
}
JobParameters jobParameters = new JobParametersBuilder().addString("jobName", jobName)
.addDate("time", new Date()).toJobParameters();
@ -84,7 +110,7 @@ public class JobLauncherController {
*/
// @Scheduled(cron = "*/5 * * * * *")
@Scheduled(cron = "0 55 23 * * *")
public String storeAdditionalInfoJob() throws JobInstanceAlreadyCompleteException,
public String storeAdditionalJob() throws JobInstanceAlreadyCompleteException,
JobExecutionAlreadyRunningException, JobParametersInvalidException, JobRestartException {
String jobName = "storeAdditionalJob";

View File

@ -40,7 +40,9 @@ spring:
enabled: false
profiles:
scheduler: Y
batch:
job:
enabled: true
#QSP url 하나시스운영 #https://jp.qsalesplatform.com
#QSP url 하나시스개발 #https://121.168.9.37:8080
#QSP url interplug dev #http://1.248.227.176:8120

View File

@ -41,6 +41,9 @@ spring:
profiles:
scheduler: Y
batch:
job:
enabled: true
#QSP
qsp:
url: http://1.248.227.176:8120
@ -62,7 +65,7 @@ file:
root.path: C:\\
ini.root.path: C:\\NewEstimate
ini.base.filename: 料金シミュレーション.ini
ini.drawing.img.path: C:\\NewEstimate\Drawing
ini.drawing.img.path: https://files.hanasys.jp/Drawing
front:
url: http://localhost:8080

View File

@ -36,7 +36,9 @@ spring:
enabled: false
profiles:
scheduler: Y
batch:
job:
enabled: false
#QSP url 하나시스운영 #https://jp.qsalesplatform.com
#QSP url 하나시스개발 #https://121.168.9.37:8080
#QSP url interplug dev #http://1.248.227.176:8120