|
|
@ -2,7 +2,9 @@ package com.ruoyi.quartz.task; |
|
|
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.ruoyi.code.camera.domain.Camera; |
|
|
|
import com.ruoyi.code.camera.domain.Camera; |
|
|
|
|
|
|
|
import com.ruoyi.code.camera.domain.CameraAutoRebootLog; |
|
|
|
import com.ruoyi.code.camera.domain.ScImageUploadAlarm; |
|
|
|
import com.ruoyi.code.camera.domain.ScImageUploadAlarm; |
|
|
|
|
|
|
|
import com.ruoyi.code.camera.service.ICameraAutoRebootLogService; |
|
|
|
import com.ruoyi.code.camera.service.ICameraService; |
|
|
|
import com.ruoyi.code.camera.service.ICameraService; |
|
|
|
import com.ruoyi.code.camera.service.IScImageUploadAlarmService; |
|
|
|
import com.ruoyi.code.camera.service.IScImageUploadAlarmService; |
|
|
|
import com.ruoyi.common.core.page.R; |
|
|
|
import com.ruoyi.common.core.page.R; |
|
|
@ -12,6 +14,7 @@ import org.springframework.stereotype.Component; |
|
|
|
import com.ruoyi.common.utils.StringUtils; |
|
|
|
import com.ruoyi.common.utils.StringUtils; |
|
|
|
import utils.CameraUtil; |
|
|
|
import utils.CameraUtil; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.Date; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -82,6 +85,7 @@ public class RyTask |
|
|
|
public void checkCameraUpload(){ |
|
|
|
public void checkCameraUpload(){ |
|
|
|
IScImageUploadAlarmService scImageUploadAlarmService = BeanUtil.getBean(IScImageUploadAlarmService.class); |
|
|
|
IScImageUploadAlarmService scImageUploadAlarmService = BeanUtil.getBean(IScImageUploadAlarmService.class); |
|
|
|
ICameraService cameraService = BeanUtil.getBean(ICameraService.class); |
|
|
|
ICameraService cameraService = BeanUtil.getBean(ICameraService.class); |
|
|
|
|
|
|
|
ICameraAutoRebootLogService cameraAutoRebootLogService = BeanUtil.getBean(ICameraAutoRebootLogService.class); |
|
|
|
|
|
|
|
|
|
|
|
List<ScImageUploadAlarm> alarms = scImageUploadAlarmService.list(new QueryWrapper<ScImageUploadAlarm>().eq("flag","1")); |
|
|
|
List<ScImageUploadAlarm> alarms = scImageUploadAlarmService.list(new QueryWrapper<ScImageUploadAlarm>().eq("flag","1")); |
|
|
|
|
|
|
|
|
|
|
@ -91,6 +95,11 @@ public class RyTask |
|
|
|
System.out.println(c); |
|
|
|
System.out.println(c); |
|
|
|
R result = cameraService.rebootByLoginId(c); |
|
|
|
R result = cameraService.rebootByLoginId(c); |
|
|
|
System.out.println(result); |
|
|
|
System.out.println(result); |
|
|
|
|
|
|
|
CameraAutoRebootLog log = new CameraAutoRebootLog(); |
|
|
|
|
|
|
|
log.setDevsn(c.getDevsn()); |
|
|
|
|
|
|
|
log.setRebootTime(new Date()); |
|
|
|
|
|
|
|
log.setResult(result.toString()); |
|
|
|
|
|
|
|
cameraAutoRebootLogService.save(log); |
|
|
|
sleep(10); |
|
|
|
sleep(10); |
|
|
|
} |
|
|
|
} |
|
|
|
alarm.setFlag("0"); |
|
|
|
alarm.setFlag("0"); |
|
|
|