烘料房测试版3

This commit is contained in:
杨晓东 2025-10-22 21:35:37 +08:00
parent 659f41c467
commit eb51c8c48a
2 changed files with 4 additions and 4 deletions

View File

@ -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));

View File

@ -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);
}