|
|
|
@ -1,6 +1,7 @@ |
|
|
|
|
package com.psdc.service.impl; |
|
|
|
|
|
|
|
|
|
import com.psdc.domain.SysJob; |
|
|
|
|
import com.psdc.entity.PsdcDevice; |
|
|
|
|
import com.psdc.entity.PsdcTimer; |
|
|
|
|
import com.psdc.entity.request.PsdcTimerRequest; |
|
|
|
|
import com.psdc.entity.request.PsdcTimerRunTimeRequest; |
|
|
|
@ -39,9 +40,6 @@ public class PsdcTimerServiceImpl implements IPsdcTimerService { |
|
|
|
|
@Resource |
|
|
|
|
private ISysJobService jobService; |
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
private ISysJobLogService jobLogService; |
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
private IPsdcDeviceService psdcDeviceService; |
|
|
|
|
|
|
|
|
@ -116,6 +114,11 @@ public class PsdcTimerServiceImpl implements IPsdcTimerService { |
|
|
|
|
if (runDay == null || "".equals(runDay)) { |
|
|
|
|
throw new ServiceException("设定日期错误,创建定时任务失败,设定日期为:" + runDay); |
|
|
|
|
} |
|
|
|
|
Integer deviceId = psdcTimerRunTimeRequest.getDeviceId(); |
|
|
|
|
PsdcDevice psdcDevice = psdcDeviceService.queryById(deviceId); |
|
|
|
|
if(psdcDevice == null){ |
|
|
|
|
throw new ServiceException("创建定时任务失败,未找到该设备"); |
|
|
|
|
} |
|
|
|
|
String[] split1 = runtime.split(":"); |
|
|
|
|
cronArr[0] = "0"; |
|
|
|
|
//分
|
|
|
|
|