fix: 堆垛机清点位校验、开始线程不判断状态
This commit is contained in:
@@ -34,17 +34,18 @@ public class AutoRunServiceImpl implements AutoRunService, ApplicationAutoInitia
|
||||
*/
|
||||
private List<AbstractAutoRunnable> thread_autoRun = new ArrayList();
|
||||
/**
|
||||
* key
|
||||
* key
|
||||
*/
|
||||
private List<String> autoRun_code_index = new ArrayList();
|
||||
/**
|
||||
* 运行线程
|
||||
* 运行线程
|
||||
*/
|
||||
private List<Thread> threads = new ArrayList();
|
||||
/**
|
||||
* key
|
||||
* key
|
||||
*/
|
||||
private List<String> thread_code_index = new ArrayList();
|
||||
|
||||
@Override
|
||||
public synchronized void startThread(String threadCode) {
|
||||
Thread thread = this.getThreadByCode(threadCode);
|
||||
@@ -65,24 +66,23 @@ public class AutoRunServiceImpl implements AutoRunService, ApplicationAutoInitia
|
||||
Thread thread = this.getThreadByCode(threadCode);
|
||||
if (thread == null) {
|
||||
throw new BadRequestException(LangProcess.msg("error_isNull", threadCode));
|
||||
} else if (!thread.isAlive()) {
|
||||
throw new BadRequestException(LangProcess.msg("error_status", threadCode));
|
||||
} else {
|
||||
}
|
||||
try {
|
||||
AbstractAutoRunnable runable = this.getRunablebyCode(threadCode);
|
||||
runable.stop();
|
||||
thread.stop();
|
||||
thread.interrupt();
|
||||
|
||||
try {
|
||||
thread.join();
|
||||
} catch (InterruptedException arg4) {
|
||||
arg4.printStackTrace();
|
||||
}
|
||||
|
||||
thread.join();
|
||||
runable.setStopMessage("人工停止");
|
||||
runable.setStopTime(new Date());
|
||||
|
||||
} catch (Exception arg4) {
|
||||
arg4.printStackTrace();
|
||||
throw new BadRequestException(LangProcess.msg("error_status", threadCode));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -358,7 +358,8 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
|
||||
if (!command.equals(last_command)) {
|
||||
requireSucess = false;
|
||||
if (command == 0) {
|
||||
Instruction byCodeFromCache = instructionService.findByCodeFromCache(String.valueOf(task));
|
||||
if (command == 0 && byCodeFromCache==null) {
|
||||
clearWrite();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user