现场运行调整

This commit is contained in:
FT577
2026-09-21 08:41:38 +08:00
parent a6a9fc15f2
commit 2f862358ad
7 changed files with 95 additions and 33 deletions

View File

@@ -76,7 +76,7 @@ public class TaskHandler {
/**
* 【自动完成】 - 处理标记为自动完成的任务
*/
@Scheduled(fixedDelay = TIMEINTERVAL_3000)
@Scheduled(fixedDelay = TIMEINTERVAL_DEFAULT)
public void mydoJobAutoFinish() {
//查询所有标记为【已完成】的任务
List<MydoJob> jobs = mydoJobService.selectMydoJobList(
@@ -97,7 +97,7 @@ public class TaskHandler {
/**
* 【手动完成】 - 查询并处理标记为已经手动完成的任务
*/
@Scheduled(fixedDelay = TIMEINTERVAL_3000)
@Scheduled(fixedDelay = TIMEINTERVAL_DEFAULT)
public void manualFinishmydoJob() {
//查询所有标记为【已完成】的任务
List<MydoJob> jobs = mydoJobService.selectMydoJobList(
@@ -114,7 +114,7 @@ public class TaskHandler {
/**
* 【手动作废】 - 查询并处理标记为已经作废的任务
*/
@Scheduled(fixedDelay = TIMEINTERVAL_3000)
@Scheduled(fixedDelay = TIMEINTERVAL_DEFAULT)
public void cancelMydoJob(){
List<MydoJob> jobs = mydoJobService.selectMydoJobList(
new MydoJob().builder().status(TASK_STATUS_INVALID).build()
@@ -148,7 +148,7 @@ public class TaskHandler {
/**
* 定时扫描未回传或回传异常的任务记录
*/
@Scheduled(fixedDelay = TIMEINTERVAL_3000)
@Scheduled(fixedDelay = TIMEINTERVAL_DEFAULT)
public void jobCallBack() {
jobCallBackService.jobCallBack();
}

View File

@@ -76,7 +76,7 @@ public class DdjThread_1 implements Runnable {
}
}
try {
Thread.sleep(1500);
Thread.sleep(1000);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}

View File

@@ -76,7 +76,7 @@ public class DdjThread_2 implements Runnable {
}
}
try {
Thread.sleep(1500);
Thread.sleep(1000);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}

View File

@@ -99,7 +99,7 @@ public class PortConvThread implements Runnable {
}
}
try {
Thread.sleep(1500);
Thread.sleep(1000);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}

View File

@@ -21,6 +21,7 @@ import com.ruoyi.common.TaskType;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.spring.SpringUtils;
import com.ruoyi.device.ssj.domain.DeviceSsj;
import com.ruoyi.device.ssj.service.IDeviceSsjService;
import com.ruoyi.job.domain.MydoJob;
import com.ruoyi.job.service.IMydoJobService;
import com.ruoyi.queue.agv.service.IAgvQueueService;
@@ -48,6 +49,7 @@ public class RoadConvThread implements Runnable {
private IBasCargoSpaceService basCargoSpaceService;
private IDdjDeviceExecutionQueueService ddjDeviceExecutionQueueService;
private IRequestLogService requestLogService;
private IDeviceSsjService deviceSsjService;
public boolean isRun = true;
@@ -66,6 +68,8 @@ public class RoadConvThread implements Runnable {
mydoJobService = SpringUtils.getBean(IMydoJobService.class);
basCargoSpaceService = SpringUtils.getBean(IBasCargoSpaceService.class);
ddjDeviceExecutionQueueService = SpringUtils.getBean(IDdjDeviceExecutionQueueService.class);
deviceSsjService = SpringUtils.getBean(IDeviceSsjService.class);
requestLogService = SpringUtils.getBean(IRequestLogService.class);
//初始化巷道口 排 列 层
//todo 核对堆垛机取放位置的货位编码
roadwayMap.put("L1001", Arrays.asList(2, 0, 1));
@@ -100,7 +104,7 @@ public class RoadConvThread implements Runnable {
}
}
try {
Thread.sleep(1500);
Thread.sleep(1000);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
@@ -247,10 +251,58 @@ public class RoadConvThread implements Runnable {
*/
private boolean roadConvCheckedForStockout(DeviceSsj outSsjDevice){
boolean flag = false;
boolean flag = true;
//---------------------------巷道口取放货输送机---------------------------
//输送机【任务号】和【到位】校验
if (outSsjDevice.getTaskNo() == 0 && outSsjDevice.getDw() == 0) flag = true;
if (outSsjDevice.getTaskNo() != 0 || outSsjDevice.getDw() != 0) flag = false;
//无入库作业
List<MydoJob> jobs = mydoJobService.selectMydoJobList(new MydoJob());
if (jobs.isEmpty() || jobs.stream().anyMatch(s -> Convert.toInt(s.getInOrOut()) < 20)){
flag = false;
}
//入口输送机无空闲和任务号
DeviceSsj ssj;
if (outSsjDevice.getDeviceCode().equals("L1003")){
ssj = deviceSsjService.selectDeviceSsjByDeviceCode("L1002");
if (ObjUtil.isNotNull(ssj)){
if (ssj.getKx() != 1 || ssj.getTaskNo() != 0) {
// log.info("L1002");
flag = false;
}
}
}
if (outSsjDevice.getDeviceCode().equals("L1005")){
ssj = deviceSsjService.selectDeviceSsjByDeviceCode("L1004");
if (ObjUtil.isNotNull(ssj)){
if (ssj.getKx() != 1 || ssj.getTaskNo() != 0){
// log.info("L1004");
flag = false;
}
}
}
if (outSsjDevice.getDeviceCode().equals("L1007")){
ssj = deviceSsjService.selectDeviceSsjByDeviceCode("L1006");
if (ObjUtil.isNotNull(ssj)){
if (ssj.getKx() != 1 || ssj.getTaskNo() != 0) {
// log.info("L1006");
flag = false;
}
}
}
if (outSsjDevice.getDeviceCode().equals("L1010")){
ssj = deviceSsjService.selectDeviceSsjByDeviceCode("L1009");
if (ObjUtil.isNotNull(ssj)){
if (ssj.getKx() != 1 || ssj.getTaskNo() != 0) {
// log.info("L1009");
flag = false;
}
}
}
return flag;
}
@@ -455,7 +507,7 @@ public class RoadConvThread implements Runnable {
//检查巷道口输送机是否空闲
if(roadSsjDevice.getKx() == 1 && roadSsjDevice.getTaskNo() == 0){
//检查是否有入口是1#巷道的出库任务
//检查是否有当前巷道的出库任务
String exitId = roadSsjDevice.getDeviceCode();
//检查是否有出库任务