|
@ -462,8 +462,8 @@ public class JobService {
|
|
|
|
|
|
public void startNoticeJob() throws Exception {
|
|
|
if (!quartzHelper.isExistJob(NoticeJob.jobKey)) {
|
|
|
quartzHelper.addJob(NoticeJob.class,NoticeJob.jobCron,NoticeJob.jobKey,new HashMap<>());
|
|
|
// quartzHelper.startNow(NoticeJob.class, UUID.randomUUID().toString().replace("-", ""), new HashMap<>());
|
|
|
quartzHelper.addJob(NoticeJob.class, NoticeJob.jobCron, NoticeJob.jobKey, new HashMap<>());
|
|
|
// quartzHelper.startNow(NoticeJob.class, UUID.randomUUID().toString().replace("-", ""), new HashMap<>());
|
|
|
|
|
|
} else {
|
|
|
throw new Exception("已经启动");
|
|
@ -478,11 +478,14 @@ public class JobService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/******************************* 随访计划任务 *******************************************************/
|
|
|
/*******************************
|
|
|
* 随访计划任务
|
|
|
*******************************************************/
|
|
|
@Value("${spring.followupMessage.jobId}")
|
|
|
private String followupJob;
|
|
|
@Value("${spring.followupMessage.cron}")
|
|
|
private String followupJobCron;
|
|
|
|
|
|
public void startFollowupPlantJob() throws Exception {
|
|
|
if (!quartzHelper.isExistJob(followupJob)) {
|
|
|
quartzHelper.addJob(FollowupPlanJob.class, followupJobCron, followupJob, new HashMap<>());
|
|
@ -498,4 +501,13 @@ public class JobService {
|
|
|
throw new Exception("已经停止");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public void startNoticeJobNow() throws Exception {
|
|
|
quartzHelper.startNow(NoticeJob.class, UUID.randomUUID().toString(), new HashMap<>());
|
|
|
|
|
|
}
|
|
|
|
|
|
public void startHealthMessageJobNow() throws Exception {
|
|
|
quartzHelper.startNow(HealthMessageJob.class, UUID.randomUUID().toString(), new HashMap<>());
|
|
|
}
|
|
|
}
|