|
@ -53,8 +53,8 @@ public class ChannelCtrlService { |
|
|
CommandUtil.wait(currentPositionCommandFuture); |
|
|
CommandUtil.wait(currentPositionCommandFuture); |
|
|
Double currentPosition = currentPositionCommandFuture.getResponseResult().getJSONObject("data").getDouble("position"); |
|
|
Double currentPosition = currentPositionCommandFuture.getResponseResult().getJSONObject("data").getDouble("position"); |
|
|
channelState.setPumpPositionCache(currentPosition); |
|
|
channelState.setPumpPositionCache(currentPosition); |
|
|
|
|
|
|
|
|
Formulation formulation = formulationService.getOne(new LambdaQueryWrapper<Formulation>().eq(Formulation::getSolutionId, channelState.getSolutionId())); |
|
|
|
|
|
|
|
|
Formulation formulation = formulationService.getOne(new LambdaQueryWrapper<Formulation>().eq(Formulation::getSolutionId, channelState.getSolutionId()) |
|
|
|
|
|
.eq(Formulation::getConcentration, channelState.getConcentration()).eq(Formulation::getVolume, channelState.getTargetVolume()).last("limit 1")); |
|
|
DeviceCommand deviceCommand = getPumpMoveByCommandByChannel(channelState.getChannelCode(), formulation.getRevolutions()); |
|
|
DeviceCommand deviceCommand = getPumpMoveByCommandByChannel(channelState.getChannelCode(), formulation.getRevolutions()); |
|
|
commandFutureList.add(deviceCommandService.sendCommand(deviceCommand)); |
|
|
commandFutureList.add(deviceCommandService.sendCommand(deviceCommand)); |
|
|
AuditRecord auditRecord = new AuditRecord(deviceState.getCurrentUser().getId(), deviceState.getCurrentUser().getNickname(), channelState.getSolutionId(), |
|
|
AuditRecord auditRecord = new AuditRecord(deviceState.getCurrentUser().getId(), deviceState.getCurrentUser().getNickname(), channelState.getSolutionId(), |
|
@ -75,7 +75,8 @@ public class ChannelCtrlService { |
|
|
} else if (SolutionAddMode.CLICK.equals(deviceState.getMode())) {//点动模式 |
|
|
} else if (SolutionAddMode.CLICK.equals(deviceState.getMode())) {//点动模式 |
|
|
List<CommandFuture> commandFutureList = new ArrayList<>(); |
|
|
List<CommandFuture> commandFutureList = new ArrayList<>(); |
|
|
for (ChannelState channelState : channelStateList) { |
|
|
for (ChannelState channelState : channelStateList) { |
|
|
Formulation formulation = formulationService.getOne(new LambdaQueryWrapper<Formulation>().eq(Formulation::getSolutionId, channelState.getSolutionId())); |
|
|
|
|
|
|
|
|
Formulation formulation = formulationService.getOne(new LambdaQueryWrapper<Formulation>().eq(Formulation::getSolutionId, channelState.getSolutionId()) |
|
|
|
|
|
.eq(Formulation::getConcentration, channelState.getConcentration()).eq(Formulation::getVolume, channelState.getTargetVolume()).last("limit 1")); |
|
|
DeviceCommand deviceCommand = getPumpMoveByCommandByChannel(channelState.getChannelCode(), formulation.getRevolutions()); |
|
|
DeviceCommand deviceCommand = getPumpMoveByCommandByChannel(channelState.getChannelCode(), formulation.getRevolutions()); |
|
|
commandFutureList.add(deviceCommandService.sendCommand(deviceCommand)); |
|
|
commandFutureList.add(deviceCommandService.sendCommand(deviceCommand)); |
|
|
AuditRecord auditRecord = new AuditRecord(deviceState.getCurrentUser().getId(), deviceState.getCurrentUser().getNickname(), channelState.getSolutionId(), |
|
|
AuditRecord auditRecord = new AuditRecord(deviceState.getCurrentUser().getId(), deviceState.getCurrentUser().getNickname(), channelState.getSolutionId(), |
|
|