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