Merge pull request 'dev' (#43) from dev into dev-deploy
Reviewed-on: #43
This commit is contained in:
commit
476e44d801
@ -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";
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user