feat: 规则触发是通知串口

main
huangfeng 6 months ago
parent 00779bb90f
commit d93dcc1aa6

@ -9,6 +9,7 @@ import com.xydl.cac.model.StaticVariable;
import com.xydl.cac.model.TriggerModel;
import com.xydl.cac.repository.WarnRuleRepository;
import com.xydl.cac.repository.WarningRepository;
import com.xydl.cac.serialport.SerialPortServer;
import com.xydl.cac.service.DataService;
import com.xydl.cac.socket.WebSocketServer;
import com.xydl.cac.util.DateUtil;
@ -34,6 +35,8 @@ public class RuleCheckTask {
DingTalkPushUtil dingTalkPushUtil;
@Resource
WebSocketServer webSocketServer;
@Resource
SerialPortServer serialPortServer;
int shutdown = 0;
@ -76,7 +79,7 @@ public class RuleCheckTask {
}
if (rule.getNotifyCom() != null && rule.getNotifyCom().intValue() == Constants.TRUE) {
// 通知串口
serialPortServer.sendData();
}
}
} catch (Exception e) {

Loading…
Cancel
Save