现场调度修改

This commit is contained in:
liuhanqing
2026-04-29 10:42:40 +08:00
parent f2e0c086eb
commit 8e60b8e9c1
3 changed files with 22 additions and 16 deletions

View File

@@ -182,10 +182,10 @@ public class ScheduleThread {
plcDdj5ReadCustomThread.getThread().start();
}
/*if (plcDdj6ReadCustomThread!=null){
if (plcDdj6ReadCustomThread!=null){
plcDdj6ReadCustomThread.getThread().start();
}*/
}
isRun = true;
}
@@ -214,10 +214,10 @@ public class ScheduleThread {
ddj5CustomThread.thread.start();
}
/*if (ddj6CustomThread!=null){
if (ddj6CustomThread!=null){
ddj6CustomThread.thread.start();
}*/
}
isRun2 = true;
}
@@ -237,8 +237,8 @@ public class ScheduleThread {
plcDdj4ReadCustomThread.thread.interrupt();
plcDdj5ReadCustomThread.runnable.isRun = false;
plcDdj5ReadCustomThread.thread.interrupt();
/*plcDdj6ReadCustomThread.runnable.isRun = false;
plcDdj6ReadCustomThread.thread.interrupt();*/
plcDdj6ReadCustomThread.runnable.isRun = false;
plcDdj6ReadCustomThread.thread.interrupt();
plcReadInit();
isRun = false;
}
@@ -259,8 +259,8 @@ public class ScheduleThread {
ddj4CustomThread.thread.interrupt();
ddj5CustomThread.runnable.isRun = false;
ddj5CustomThread.thread.interrupt();
/*ddj6CustomThread.runnable.isRun = false;
ddj6CustomThread.thread.interrupt();*/
ddj6CustomThread.runnable.isRun = false;
ddj6CustomThread.thread.interrupt();
scheduleInit();
isRun2 = false;
}

View File

@@ -150,14 +150,14 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
switch (exitId) {
case "1":
List<DeviceSsj> outSsj1 = getDeviceSsjs("outSsj1");
if (outSsj1.stream().allMatch(ssj -> ssj.getKx() == 1 && ssj.getTaskNo() == 0 )) {
if (outSsj1.stream().allMatch(ssj -> ssj.getKx() == 1 && ssj.getTaskNo() == 0 && ddj.getHczt() == 0 && ddj.getYxxf()==1)) {
outSsj = outSsj1.get(0).getDeviceCode();
if (StrUtil.isNotEmpty(outSsj)) {
break;
}
}
List<DeviceSsj> outSsj2 = getDeviceSsjs("outSsj2");
if (outSsj2.stream().allMatch(ssj -> ssj.getKx() == 1 && ssj.getTaskNo() == 0 )) {
if (outSsj2.stream().allMatch(ssj -> ssj.getKx() == 1 && ssj.getTaskNo() == 0 && ddj.getHczt() == 0 && ddj.getYxxf()==1)) {
outSsj = outSsj2.get(0).getDeviceCode();
if (StrUtil.isNotEmpty(outSsj)) {
break;
@@ -166,14 +166,14 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
break;
case "2":
List<DeviceSsj> outSsj3 = getDeviceSsjs("outSsj3");
if (outSsj3.stream().allMatch(ssj -> ssj.getKx() == 1 && ssj.getTaskNo() == 0 )) {
if (outSsj3.stream().allMatch(ssj -> ssj.getKx() == 1 && ssj.getTaskNo() == 0 && ddj.getHczt() == 0 && ddj.getYxxf()==1)) {
outSsj = outSsj3.get(0).getDeviceCode();
if (StrUtil.isNotEmpty(outSsj)) {
break;
}
}
List<DeviceSsj> outSsj4 = getDeviceSsjs("outSsj4");
if (outSsj4.stream().allMatch(ssj -> ssj.getKx() == 1 && ssj.getTaskNo() == 0)) {
if (outSsj4.stream().allMatch(ssj -> ssj.getKx() == 1 && ssj.getTaskNo() == 0 && ddj.getHczt() == 0 && ddj.getYxxf()==1)) {
outSsj = outSsj4.get(0).getDeviceCode();
if (StrUtil.isNotEmpty(outSsj)) {
break;
@@ -624,7 +624,7 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
return;
}
if (ddj.getSbzt() == 0 && ddj.getHczt() == 0) {
if (ddj.getHczt() == 0) {
//无货待机 只查询入库取货扫码或者出库队列
ArrayList<Integer> rwlxList = new ArrayList<>();
rwlxList.add(DDJ_RWLX_1);
@@ -658,7 +658,7 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
log.error("托盘堆垛机下发任务失败!!!!!!!ddj:{} rwh:{}",ddj.getId(), ddjDeviceExecutionQueue.getRwh());
}
}
} else if ((ddj.getSbzt() == 0 || ddj.getSbzt()==1047) && ddj.getHczt() == 1) {
} else if (ddj.getHczt() == 1) {
//有货待机 只查询入库放货队列和 无任务 未扫码回滚 队列
DdjDeviceExecutionQueue ddjDeviceExecutionQueueParam = new DdjDeviceExecutionQueue();
ddjDeviceExecutionQueueParam.setDdjxf("0");

View File

@@ -53,7 +53,7 @@ public class MonitoringThread implements Runnable {
int taskNo = deviceSsj.getTaskNo();
//输送机外形异常 101-前超长 102-后超长 103-左超宽 104-右超宽 105-超高 106-超重
if (deviceSsj.getException() >= 101 && deviceSsj.getException() <= 106 && deviceSsj.getTaskNo()>0) {
if (deviceSsj.getException() >= 101 && deviceSsj.getException() <= 120 && deviceSsj.getTaskNo()>0) {
BasFaultRecord param = new BasFaultRecord();
param.setTaskNo(Convert.toStr(deviceSsj.getTaskNo()));
param.setDeviceId(Convert.toStr(deviceSsj.getDeviceCode()));
@@ -214,6 +214,12 @@ public class MonitoringThread implements Runnable {
return "超高";
} else if (value == 106) {
return "超重";
} else if (value==112){
return "输送超时";
}else if (value==113){
return "变频器报警";
}else if (value==114){
return "开关异常";
}else {
return "未知";
}