|
|
@ -39,10 +39,13 @@ public class MatrixSprayContinue extends BaseCommandHandler { |
|
|
|
if (!sprayTask.isSpraying()) { |
|
|
|
throw new RuntimeException("设备没有正在喷涂"); |
|
|
|
} |
|
|
|
if(!sprayTask.isPaused()){ |
|
|
|
throw new RuntimeException("解除暂停中"); |
|
|
|
} |
|
|
|
sprayTask.setPaused(false);//解除暂停 |
|
|
|
deviceStatus.setPaused(false); |
|
|
|
SprayTimes sprayTimes = sprayTask.getSprayTimes(); |
|
|
|
return runAsync(() -> { |
|
|
|
try{ |
|
|
|
OperationLog operationLog = operationLogService.getById(sprayTask.getOperationLogId()); |
|
|
|
operationLog.setStatus(0); |
|
|
|
operationLogService.updateById(operationLog); |
|
|
@ -64,8 +67,10 @@ public class MatrixSprayContinue extends BaseCommandHandler { |
|
|
|
DeviceCommand syringePumpForwardCommand = DeviceCommandGenerator.syringePumpForward(sprayTimes.getVolume()); //推动注射泵 |
|
|
|
CommandFuture syringePumpForwardCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), syringePumpForwardCommand); |
|
|
|
commandWait(syringePumpForwardCommandFuture); |
|
|
|
|
|
|
|
sprayTaskExecutor.startTask(); |
|
|
|
} finally { |
|
|
|
deviceStatus.setPaused(false); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|