Commit 1f2db974 authored by wanghao's avatar wanghao

1 测试分支,单独测试 不需要 机械臂 获取iot数据

parent 0386e0f2
...@@ -15,9 +15,11 @@ import com.zehong.system.modbus.util.Modbus4jUtils; ...@@ -15,9 +15,11 @@ import com.zehong.system.modbus.util.Modbus4jUtils;
import com.zehong.system.service.IRobotArmCommandService; import com.zehong.system.service.IRobotArmCommandService;
import com.zehong.system.service.ITEquipmentAlarmDataService; import com.zehong.system.service.ITEquipmentAlarmDataService;
import com.zehong.system.service.websocket.RobotArmWebSocketHandler; import com.zehong.system.service.websocket.RobotArmWebSocketHandler;
import com.zehong.system.task.event.IotStatusEvent;
import org.quartz.*; import org.quartz.*;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import javax.annotation.Resource; import javax.annotation.Resource;
...@@ -53,6 +55,8 @@ public class AgingStageFourProcessJob implements Job { ...@@ -53,6 +55,8 @@ public class AgingStageFourProcessJob implements Job {
@Resource @Resource
private Scheduler scheduler; private Scheduler scheduler;
@Resource
private ApplicationEventPublisher eventPublisher; // 新增事件发布器
@Resource @Resource
private IRobotArmCommandService robotArmCommandService; private IRobotArmCommandService robotArmCommandService;
@Resource @Resource
...@@ -171,6 +175,10 @@ public class AgingStageFourProcessJob implements Job { ...@@ -171,6 +175,10 @@ public class AgingStageFourProcessJob implements Job {
recordAlarm(tStoreyInfo, "机械臂指令发送失败:" + e.getMessage()); recordAlarm(tStoreyInfo, "机械臂指令发送失败:" + e.getMessage());
} }
// 直接发送iot消息 供测试
log.info("子任务开始查询IOT状态了" );
eventPublisher.publishEvent(new IotStatusEvent(this, storeyCode));
log.info("=== FinalExecutionJob 执行完成:fStoreyId={} ===", fStoreyId); log.info("=== FinalExecutionJob 执行完成:fStoreyId={} ===", fStoreyId);
} catch (Throwable e) { } catch (Throwable e) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment