|
@ -146,7 +146,7 @@ public class JobService {
|
|
}
|
|
}
|
|
|
|
|
|
public void productDataByOneDay(String yesterday) throws Exception {
|
|
public void productDataByOneDay(String yesterday) throws Exception {
|
|
String sql="select * from wlyy_job_config_new a where a.del='1' and a.id !=11 order by a.id asc";
|
|
|
|
|
|
String sql="select * from fl_job_config a where a.del='1' and a.id !=11 order by a.id asc";
|
|
SimpleDateFormat dataSimple = new SimpleDateFormat("yyyy-MM-dd");
|
|
SimpleDateFormat dataSimple = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
|
|
Date date = dataSimple.parse(yesterday);
|
|
Date date = dataSimple.parse(yesterday);
|
|
@ -168,7 +168,7 @@ public class JobService {
|
|
params.put("jobConfig", flJobConfig.getId().toString());
|
|
params.put("jobConfig", flJobConfig.getId().toString());
|
|
//往quartz框架添加任务
|
|
//往quartz框架添加任务
|
|
params.put("sqlFiledValue", daybefore+","+yesterday);
|
|
params.put("sqlFiledValue", daybefore+","+yesterday);
|
|
params.put("sqlFiledCondition", "<");
|
|
|
|
|
|
params.put("sqlFiledCondition", ">,<");
|
|
if (!StringUtils.isEmpty(FLJobConfig.getJobClass())) {
|
|
if (!StringUtils.isEmpty(FLJobConfig.getJobClass())) {
|
|
quartzHelpers.startNow(getRightClass(FLJobConfig), FLJobConfig.getId() + UUID.randomUUID().toString().replace("-", ""), params);
|
|
quartzHelpers.startNow(getRightClass(FLJobConfig), FLJobConfig.getId() + UUID.randomUUID().toString().replace("-", ""), params);
|
|
Thread.sleep(sleepTime);
|
|
Thread.sleep(sleepTime);
|
|
@ -206,11 +206,11 @@ public class JobService {
|
|
BeanUtils.copyProperties(FLJobConfig, flJobConfigVO);
|
|
BeanUtils.copyProperties(FLJobConfig, flJobConfigVO);
|
|
|
|
|
|
Map<String, Object> params = new HashMap<>();
|
|
Map<String, Object> params = new HashMap<>();
|
|
params.put("jobConfig", flJobConfigVO.getId().toString());
|
|
|
|
|
|
params.put("jobConfig", Long.valueOf(flJobConfigVO.getId()));
|
|
|
|
|
|
//往quartz框架添加任务
|
|
//往quartz框架添加任务
|
|
params.put("sqlFiledValue", daybefore + "," + yesterday);
|
|
params.put("sqlFiledValue", daybefore + "," + yesterday);
|
|
params.put("sqlFiledCondition", "<");
|
|
|
|
|
|
params.put("sqlFiledCondition", ">,<");
|
|
if (!StringUtils.isEmpty(FLJobConfig.getJobClass())) {
|
|
if (!StringUtils.isEmpty(FLJobConfig.getJobClass())) {
|
|
quartzHelpers.startNow(getRightClass(FLJobConfig), FLJobConfig.getId() + UUID.randomUUID().toString().replace("-", ""), params);
|
|
quartzHelpers.startNow(getRightClass(FLJobConfig), FLJobConfig.getId() + UUID.randomUUID().toString().replace("-", ""), params);
|
|
Thread.sleep(sleepTime);
|
|
Thread.sleep(sleepTime);
|
|
@ -231,7 +231,7 @@ public class JobService {
|
|
for (int i = 1; i <= day; i++) {
|
|
for (int i = 1; i <= day; i++) {
|
|
//往quartz框架添加任务
|
|
//往quartz框架添加任务
|
|
params.put("sqlFiledValue", getYesterday(0 - i - 1)+","+getYesterday(0 - i));
|
|
params.put("sqlFiledValue", getYesterday(0 - i - 1)+","+getYesterday(0 - i));
|
|
params.put("sqlFiledCondition", "<");
|
|
|
|
|
|
params.put("sqlFiledCondition", ">,<");
|
|
if (!StringUtils.isEmpty(FLJobConfig.getJobClass())) {
|
|
if (!StringUtils.isEmpty(FLJobConfig.getJobClass())) {
|
|
quartzHelpers.startNow(getRightClass(FLJobConfig), FLJobConfig.getId() + UUID.randomUUID().toString().replace("-", ""), params);
|
|
quartzHelpers.startNow(getRightClass(FLJobConfig), FLJobConfig.getId() + UUID.randomUUID().toString().replace("-", ""), params);
|
|
Thread.sleep(sleepTime);
|
|
Thread.sleep(sleepTime);
|
|
@ -331,7 +331,7 @@ public class JobService {
|
|
|
|
|
|
//往quartz框架添加任务
|
|
//往quartz框架添加任务
|
|
params.put("sqlFiledValue", daybefore + "," + yesterday);
|
|
params.put("sqlFiledValue", daybefore + "," + yesterday);
|
|
params.put("sqlFiledCondition", "<");
|
|
|
|
|
|
params.put("sqlFiledCondition", ">,<");
|
|
if (!StringUtils.isEmpty(FLJobConfig.getJobClass())) {
|
|
if (!StringUtils.isEmpty(FLJobConfig.getJobClass())) {
|
|
quartzHelpers.startNow(getRightClass(FLJobConfig), FLJobConfig.getId() + UUID.randomUUID().toString().replace("-", ""), params);
|
|
quartzHelpers.startNow(getRightClass(FLJobConfig), FLJobConfig.getId() + UUID.randomUUID().toString().replace("-", ""), params);
|
|
}
|
|
}
|
|
@ -361,7 +361,7 @@ public class JobService {
|
|
params.put("jobConfig", flJobConfigVO.getId().toString());
|
|
params.put("jobConfig", flJobConfigVO.getId().toString());
|
|
//往quartz框架添加任务
|
|
//往quartz框架添加任务
|
|
params.put("sqlFiledValue", daybefore + "," + yesterday);
|
|
params.put("sqlFiledValue", daybefore + "," + yesterday);
|
|
params.put("sqlFiledCondition", "<");
|
|
|
|
|
|
params.put("sqlFiledCondition", ">,<");
|
|
|
|
|
|
if (!StringUtils.isEmpty(FLJobConfig.getJobClass())) {
|
|
if (!StringUtils.isEmpty(FLJobConfig.getJobClass())) {
|
|
quartzHelpers.startNow(getRightClass(FLJobConfig), FLJobConfig.getId() + UUID.randomUUID().toString().replace("-", ""), params);
|
|
quartzHelpers.startNow(getRightClass(FLJobConfig), FLJobConfig.getId() + UUID.randomUUID().toString().replace("-", ""), params);
|