烘料房测试版3
This commit is contained in:
parent
659f41c467
commit
eb51c8c48a
@ -106,7 +106,7 @@ public class DryEquipmentInfoController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 关闭报警
|
* 关闭报警
|
||||||
*/
|
*/
|
||||||
@GetMapping("/closeAlarm")
|
@GetMapping("/closeAlarm/{id}")
|
||||||
public AjaxResult closeAlarm(@PathVariable("id") Long id)
|
public AjaxResult closeAlarm(@PathVariable("id") Long id)
|
||||||
{
|
{
|
||||||
return toAjax(dryEquipmentInfoService.closeAlarm(id));
|
return toAjax(dryEquipmentInfoService.closeAlarm(id));
|
||||||
|
|||||||
@ -62,7 +62,7 @@ public class AutoCollectService {
|
|||||||
/**
|
/**
|
||||||
* 定时任务:每10秒执行一次数据采集
|
* 定时任务:每10秒执行一次数据采集
|
||||||
*/
|
*/
|
||||||
@Scheduled(cron = "0/10 * * * * ?")
|
@Scheduled(cron = "0/30 * * * * ?")
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void autoCollectData() {
|
public void autoCollectData() {
|
||||||
log.info("===== 开始执行自动采集任务 =====");
|
log.info("===== 开始执行自动采集任务 =====");
|
||||||
@ -82,8 +82,8 @@ public class AutoCollectService {
|
|||||||
boolean isAlarmRound = collectCount % 2 == 0;
|
boolean isAlarmRound = collectCount % 2 == 0;
|
||||||
List<String> alarmEquipCodes = new ArrayList<>();
|
List<String> alarmEquipCodes = new ArrayList<>();
|
||||||
if (isAlarmRound) {
|
if (isAlarmRound) {
|
||||||
alarmEquipCodes = selectRandomEquipments(2);
|
alarmEquipCodes = selectRandomEquipments(1);
|
||||||
log.info("本次为报警轮次,随机选中2台报警设备:{}", alarmEquipCodes);
|
log.info("本次为报警轮次,随机选中1台报警设备:{}", alarmEquipCodes);
|
||||||
} else {
|
} else {
|
||||||
log.info("本次为正常轮次(第{}次采集),无报警设备", collectCount);
|
log.info("本次为正常轮次(第{}次采集),无报警设备", collectCount);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user