|
@ -38,18 +38,19 @@ public class DeviceStepService { |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 添加溶液 |
|
|
* 添加溶液 |
|
|
|
|
|
* |
|
|
* @param tubeSolList 需要添加溶液的试管与溶液 |
|
|
* @param tubeSolList 需要添加溶液的试管与溶液 |
|
|
*/ |
|
|
*/ |
|
|
public boolean addLiquid(List<TubeSol> tubeSolList) { |
|
|
public boolean addLiquid(List<TubeSol> tubeSolList) { |
|
|
List<Boolean> results = new ArrayList<>(); |
|
|
List<Boolean> results = new ArrayList<>(); |
|
|
for (TubeSol tubeSol : tubeSolList) { |
|
|
for (TubeSol tubeSol : tubeSolList) { |
|
|
String[] tubeCoordinateArray = tubeSol.getTubeCoordinate().split(","); |
|
|
|
|
|
|
|
|
String[] tubeCoordinateArray = tubeSol.getTubeNum().split(","); //TODO 这里应该通过试管编号获取坐标 |
|
|
int x = Integer.parseInt(tubeCoordinateArray[0]); |
|
|
int x = Integer.parseInt(tubeCoordinateArray[0]); |
|
|
int y = Integer.parseInt(tubeCoordinateArray[1]); |
|
|
int y = Integer.parseInt(tubeCoordinateArray[1]); |
|
|
int z = Integer.parseInt(tubeCoordinateArray[2]); |
|
|
int z = Integer.parseInt(tubeCoordinateArray[2]); |
|
|
results.add(deviceService.moveLiquidArmToPoint(x, y, z));//加液孔对准试管 |
|
|
results.add(deviceService.moveLiquidArmToPoint(x, y, z));//加液孔对准试管 |
|
|
for (TubeSol.AddLiquid addLiquid : tubeSol.getAddLiquidList()) {//依次添加溶液 |
|
|
for (TubeSol.AddLiquid addLiquid : tubeSol.getAddLiquidList()) {//依次添加溶液 |
|
|
results.add(deviceService.addLiquid(addLiquid.getPumpId(), addLiquid.getVolume())); |
|
|
|
|
|
|
|
|
results.add(deviceService.addLiquid(addLiquid.getSolId(), addLiquid.getVolume()));//TODO 这里应该通过溶液id获取到泵id |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
return results.stream().allMatch(Boolean::booleanValue); |
|
|
return results.stream().allMatch(Boolean::booleanValue); |
|
@ -93,12 +94,12 @@ public class DeviceStepService { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//摇匀 |
|
|
//摇匀 |
|
|
public boolean shaking() { |
|
|
|
|
|
|
|
|
public boolean shaking(int second) { |
|
|
return true; |
|
|
return true; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//开始加热 |
|
|
//开始加热 |
|
|
public boolean startHeating(String heaterId) { |
|
|
|
|
|
|
|
|
public boolean startHeating(String heaterId, double temperature) { |
|
|
return true; |
|
|
return true; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|