|
@ -173,10 +173,7 @@ public class SprayTaskExecutor { |
|
|
CommandFuture highVoltageCloseCommandFuture = deviceCommandService.sendCommand(sprayTask.getCmdId(), sprayTask.getCmdCode(), highVoltageCloseCommand); |
|
|
CommandFuture highVoltageCloseCommandFuture = deviceCommandService.sendCommand(sprayTask.getCmdId(), sprayTask.getCmdCode(), highVoltageCloseCommand); |
|
|
DeviceCommand syringePumpStopCommand = DeviceCommandGenerator.syringePumpStop(); //停止推动注射泵 |
|
|
DeviceCommand syringePumpStopCommand = DeviceCommandGenerator.syringePumpStop(); //停止推动注射泵 |
|
|
CommandFuture syringePumpStopCommandFuture = deviceCommandService.sendCommand(sprayTask.getCmdId(), sprayTask.getCmdCode(), syringePumpStopCommand); |
|
|
CommandFuture syringePumpStopCommandFuture = deviceCommandService.sendCommand(sprayTask.getCmdId(), sprayTask.getCmdCode(), syringePumpStopCommand); |
|
|
delay(10 * 1000L); |
|
|
|
|
|
DeviceCommand nozzleValveCloseCommand = DeviceCommandGenerator.nozzleValveClose(); //关闭喷嘴阀 |
|
|
|
|
|
CommandFuture nozzleValveCloseCommandFuture = deviceCommandService.sendCommand(sprayTask.getCmdId(), sprayTask.getCmdCode(), nozzleValveCloseCommand); |
|
|
|
|
|
commandWait(syringePumpStopCommandFuture, nozzleValveCloseCommandFuture, highVoltageCloseCommandFuture); |
|
|
|
|
|
|
|
|
commandWait(syringePumpStopCommandFuture, highVoltageCloseCommandFuture); |
|
|
|
|
|
|
|
|
sprayTask.setCurrentCountSprayNum(sprayTask.getCurrentCountSprayNum() + 1); |
|
|
sprayTask.setCurrentCountSprayNum(sprayTask.getCurrentCountSprayNum() + 1); |
|
|
if ("grid".equals(sprayTimes.getMatrixPathType()) && sprayTimes.getGridDelay() != null) { |
|
|
if ("grid".equals(sprayTimes.getMatrixPathType()) && sprayTimes.getGridDelay() != null) { |
|
@ -196,10 +193,16 @@ public class SprayTaskExecutor { |
|
|
DeviceCommand highVoltageCloseCommand = DeviceCommandGenerator.highVoltageClose();//关闭高压 |
|
|
DeviceCommand highVoltageCloseCommand = DeviceCommandGenerator.highVoltageClose();//关闭高压 |
|
|
CommandFuture highVoltageCloseCommandFuture = deviceCommandService.sendCommandSprayTask(sprayTask.getCmdId(), sprayTask.getCmdCode(), highVoltageCloseCommand); |
|
|
CommandFuture highVoltageCloseCommandFuture = deviceCommandService.sendCommandSprayTask(sprayTask.getCmdId(), sprayTask.getCmdCode(), highVoltageCloseCommand); |
|
|
commandWait(highVoltageCloseCommandFuture); |
|
|
commandWait(highVoltageCloseCommandFuture); |
|
|
Thread.sleep(500); |
|
|
|
|
|
DeviceCommand nozzleValveCloseCommand = DeviceCommandGenerator.nozzleValveClose();//关闭喷嘴阀 |
|
|
|
|
|
|
|
|
CompletableFuture<Void> nozzleCloseFuture = CompletableFuture.runAsync(() -> { |
|
|
|
|
|
try { |
|
|
|
|
|
Thread.sleep(10 * 1000L); |
|
|
|
|
|
DeviceCommand nozzleValveCloseCommand = DeviceCommandGenerator.nozzleValveClose(); //关闭喷嘴阀 |
|
|
CommandFuture nozzleValveCloseCommandFuture = deviceCommandService.sendCommandSprayTask(sprayTask.getCmdId(), sprayTask.getCmdCode(), nozzleValveCloseCommand); |
|
|
CommandFuture nozzleValveCloseCommandFuture = deviceCommandService.sendCommandSprayTask(sprayTask.getCmdId(), sprayTask.getCmdCode(), nozzleValveCloseCommand); |
|
|
commandWait(nozzleValveCloseCommandFuture); |
|
|
commandWait(nozzleValveCloseCommandFuture); |
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
throw new RuntimeException(e); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
sprayTask.setCannotPause(true);//喷涂完毕后就是回原点了,期间不可暂停 |
|
|
sprayTask.setCannotPause(true);//喷涂完毕后就是回原点了,期间不可暂停 |
|
|
|
|
|
|
|
|
//XYZ回原点 |
|
|
//XYZ回原点 |
|
@ -210,7 +213,7 @@ public class SprayTaskExecutor { |
|
|
CommandFuture motorYOriginCommandFuture = deviceCommandService.sendCommandSprayTask(sprayTask.getCmdId(), sprayTask.getCmdCode(), motorYOriginCommand); |
|
|
CommandFuture motorYOriginCommandFuture = deviceCommandService.sendCommandSprayTask(sprayTask.getCmdId(), sprayTask.getCmdCode(), motorYOriginCommand); |
|
|
CommandFuture motorZOriginCommandFuture = deviceCommandService.sendCommandSprayTask(sprayTask.getCmdId(), sprayTask.getCmdCode(), motorZOriginCommand); |
|
|
CommandFuture motorZOriginCommandFuture = deviceCommandService.sendCommandSprayTask(sprayTask.getCmdId(), sprayTask.getCmdCode(), motorZOriginCommand); |
|
|
commandWait(motorXOriginCommandFuture, motorYOriginCommandFuture, motorZOriginCommandFuture); |
|
|
commandWait(motorXOriginCommandFuture, motorYOriginCommandFuture, motorZOriginCommandFuture); |
|
|
|
|
|
|
|
|
|
|
|
nozzleCloseFuture.get(); |
|
|
OperationLog operationLog = operationLogService.getById(sprayTask.getOperationLogId()); |
|
|
OperationLog operationLog = operationLogService.getById(sprayTask.getOperationLogId()); |
|
|
operationLog.setStatus(1); |
|
|
operationLog.setStatus(1); |
|
|
operationLogService.updateById(operationLog); |
|
|
operationLogService.updateById(operationLog); |
|
|