堆垛机调度初始化
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
package com.ruoyi.schedule;
|
||||
|
||||
import com.ruoyi.device.ddj.domain.MsgDdj;
|
||||
import com.ruoyi.device.ssj.domain.DeviceSsj;
|
||||
import com.ruoyi.device.ssj.service.IDeviceSsjService;
|
||||
import com.ruoyi.schedule.plcRead.ssj.domain.PlcConnectInfo;
|
||||
import com.ruoyi.schedule.plcRead.ssj.PlcRead;
|
||||
import com.ruoyi.schedule.plcRead.ssj.domain.CustomThread;
|
||||
import com.ruoyi.schedule.scheduleTask.ssj.bs.BsInSsjThread;
|
||||
import com.ruoyi.schedule.scheduleTask.ssj.bs.BsOutSsjThread;
|
||||
import com.ruoyi.schedule.scheduleTask.ssj.bs.BsPickSsjTread;
|
||||
import com.ruoyi.schedule.scheduleTask.ssj.js.JsInSsjThread;
|
||||
import com.ruoyi.schedule.scheduleTask.ssj.js.JsOutSsjThread;
|
||||
import com.ruoyi.schedule.scheduleTask.ssj.js.JsPickSsjTread;
|
||||
import com.ruoyi.schedule.scheduleTask.ssj.monitor.SsjMonitorThread;
|
||||
import com.ruoyi.schedule.scheduleTask.ddj.Ddj1Thread;
|
||||
import com.ruoyi.schedule.scheduleTask.ddj.Ddj2Thread;
|
||||
import com.ruoyi.schedule.scheduleTask.ssj.floor1.Floor1SsjInOutThread;
|
||||
import com.ruoyi.schedule.scheduleTask.ssj.floor1.Floor1SsjRoadWayThread;
|
||||
import com.ruoyi.schedule.scheduleTask.ssj.floor2.Floor2SsjInOutThread;
|
||||
import com.ruoyi.schedule.scheduleTask.ssj.floor2.Floor2SsjRoadWayThread;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -29,13 +29,12 @@ public class ScheduleThread {
|
||||
@Autowired
|
||||
private IDeviceSsjService deviceSsjService;
|
||||
|
||||
public CustomThread<BsInSsjThread> bsInSsjThread;
|
||||
public CustomThread<JsInSsjThread> jsInSsjThread;
|
||||
public CustomThread<BsOutSsjThread> bsOutSsjThread;
|
||||
public CustomThread<JsOutSsjThread> jsOutSsjThread;
|
||||
public CustomThread<BsPickSsjTread> bsPickSsjThread;
|
||||
public CustomThread<JsPickSsjTread> jsPickSsjThread;
|
||||
public CustomThread<SsjMonitorThread> ssjMonitorThread;
|
||||
public CustomThread<Ddj1Thread> ddj1ThreadCustomThread;
|
||||
public CustomThread<Ddj2Thread> ddj2ThreadCustomThread;
|
||||
public CustomThread<Floor1SsjInOutThread> bsOutSsjThread;
|
||||
public CustomThread<Floor1SsjRoadWayThread> jsOutSsjThread;
|
||||
public CustomThread<Floor2SsjInOutThread> bsPickSsjThread;
|
||||
public CustomThread<Floor2SsjRoadWayThread> jsPickSsjThread;
|
||||
|
||||
|
||||
private boolean isRun = false;
|
||||
@@ -58,7 +57,7 @@ public class ScheduleThread {
|
||||
* 调度初始化
|
||||
*/
|
||||
private void scheduleInit() {
|
||||
BsInSsjThread bsInSsjThread1 = new BsInSsjThread();
|
||||
/* BsInSsjThread bsInSsjThread1 = new BsInSsjThread();
|
||||
bsInSsjThread = new CustomThread<BsInSsjThread>(new Thread(bsInSsjThread1), bsInSsjThread1);
|
||||
JsInSsjThread jsInSsjThread1 = new JsInSsjThread();
|
||||
jsInSsjThread = new CustomThread<JsInSsjThread>(new Thread(jsInSsjThread1), jsInSsjThread1);
|
||||
@@ -72,7 +71,7 @@ public class ScheduleThread {
|
||||
jsPickSsjThread = new CustomThread<JsPickSsjTread>(new Thread(jsPickSsjTread1), jsPickSsjTread1);
|
||||
|
||||
SsjMonitorThread ssjMonitorThread1 = new SsjMonitorThread();
|
||||
ssjMonitorThread = new CustomThread<SsjMonitorThread>(new Thread(ssjMonitorThread1), ssjMonitorThread1);
|
||||
ssjMonitorThread = new CustomThread<SsjMonitorThread>(new Thread(ssjMonitorThread1), ssjMonitorThread1);*/
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -89,8 +88,10 @@ public class ScheduleThread {
|
||||
list.put(deviceSsj.getDeviceCode(), deviceSsj);
|
||||
}
|
||||
|
||||
ConcurrentHashMap<String, MsgDdj> list2 = new ConcurrentHashMap<>();
|
||||
|
||||
//plc读取线程
|
||||
PlcRead plcRead = new PlcRead(list, ssjPlcConnectInfo);
|
||||
PlcRead plcRead = new PlcRead(list,list2, ssjPlcConnectInfo);
|
||||
Thread plcReadThread = new Thread(plcRead);
|
||||
customThread = new CustomThread<PlcRead>(plcReadThread, plcRead);
|
||||
}
|
||||
@@ -107,7 +108,7 @@ public class ScheduleThread {
|
||||
* 开启线程2
|
||||
*/
|
||||
public void startAllThread2() {
|
||||
//臂式入库线程调度
|
||||
/* //臂式入库线程调度
|
||||
bsInSsjThread.getThread().start();
|
||||
//臂式出库线程调度
|
||||
bsOutSsjThread.getThread().start();
|
||||
@@ -121,7 +122,7 @@ public class ScheduleThread {
|
||||
//剪上出库到位线程调度-wms电子屏交互
|
||||
//jsPickSsjThread.getThread().start();
|
||||
//监控输送机
|
||||
//ssjMonitorThread.getThread().start();
|
||||
//ssjMonitorThread.getThread().start();*/
|
||||
|
||||
isRun2 = true;
|
||||
}
|
||||
@@ -139,12 +140,12 @@ public class ScheduleThread {
|
||||
* 停止线程2
|
||||
*/
|
||||
public void stopAllThread2() {
|
||||
bsInSsjThread.runnable.isRun = false;
|
||||
/*bsInSsjThread.runnable.isRun = false;
|
||||
jsInSsjThread.runnable.isRun = false;
|
||||
bsOutSsjThread.runnable.isRun = false;
|
||||
jsOutSsjThread.runnable.isRun = false;
|
||||
bsPickSsjThread.runnable.isRun = false;
|
||||
jsPickSsjThread.runnable.isRun = false;
|
||||
jsPickSsjThread.runnable.isRun = false;*/
|
||||
scheduleInit();
|
||||
isRun2 = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user