|
@ -5,7 +5,8 @@ import com.my.graphiteDigesterBg.model.MdbOperationLog; |
|
|
import com.my.graphiteDigesterBg.move.MoveLiquidAdd; |
|
|
import com.my.graphiteDigesterBg.move.MoveLiquidAdd; |
|
|
import com.my.graphiteDigesterBg.move.MoveMoveTubeRackFromHeatPlateToLiquidPlate; |
|
|
import com.my.graphiteDigesterBg.move.MoveMoveTubeRackFromHeatPlateToLiquidPlate; |
|
|
import com.my.graphiteDigesterBg.move.MoveMoveTubeRackFromLiquidPlateToHeatPlate; |
|
|
import com.my.graphiteDigesterBg.move.MoveMoveTubeRackFromLiquidPlateToHeatPlate; |
|
|
|
|
|
|
|
|
|
|
|
import com.my.graphiteDigesterBg.resource.ResHeatingTubeRackSlotManager; |
|
|
|
|
|
import java.util.Objects; |
|
|
@Task(name="LiquidAdd") |
|
|
@Task(name="LiquidAdd") |
|
|
public class TaskLiquidAdd extends DiTaskBase { |
|
|
public class TaskLiquidAdd extends DiTaskBase { |
|
|
// slot index |
|
|
// slot index |
|
@ -20,12 +21,18 @@ public class TaskLiquidAdd extends DiTaskBase { |
|
|
@Override |
|
|
@Override |
|
|
protected void execute() { |
|
|
protected void execute() { |
|
|
this.setStatus(TaskStatus.RUNNING); |
|
|
this.setStatus(TaskStatus.RUNNING); |
|
|
|
|
|
var slotMan = this.getResourceManager(ResHeatingTubeRackSlotManager.class); |
|
|
|
|
|
var slot = slotMan.getSlotAtLiquidPlate(); |
|
|
|
|
|
|
|
|
// move tube rack from heat plate to liquid plate |
|
|
|
|
|
var moveTubeRackFromHeatPlateToLiquidPlate = new MoveMoveTubeRackFromHeatPlateToLiquidPlate(); |
|
|
|
|
|
moveTubeRackFromHeatPlateToLiquidPlate.setDevice(this.getDevice()); |
|
|
|
|
|
moveTubeRackFromHeatPlateToLiquidPlate.slotIndex = this.slotIndex; |
|
|
|
|
|
moveTubeRackFromHeatPlateToLiquidPlate.run(); |
|
|
|
|
|
|
|
|
if ( slot == null ) { |
|
|
|
|
|
// move tube rack from heat plate to liquid plate |
|
|
|
|
|
var moveTubeRackFromHeatPlateToLiquidPlate = new MoveMoveTubeRackFromHeatPlateToLiquidPlate(); |
|
|
|
|
|
moveTubeRackFromHeatPlateToLiquidPlate.setDevice(this.getDevice()); |
|
|
|
|
|
moveTubeRackFromHeatPlateToLiquidPlate.slotIndex = this.slotIndex; |
|
|
|
|
|
moveTubeRackFromHeatPlateToLiquidPlate.run(); |
|
|
|
|
|
} else if (!Objects.equals(slot.index, this.slotIndex)) { |
|
|
|
|
|
throw new RuntimeException("加液位置已存在试管架, 无法执行加液操作"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
MdbOperationLog.log(this.getUser(), "试管架%d : 样本加液 类型=%s, 加液量=%d", this.slotIndex, this.liquidType, this.liquidVolume); |
|
|
MdbOperationLog.log(this.getUser(), "试管架%d : 样本加液 类型=%s, 加液量=%d", this.slotIndex, this.liquidType, this.liquidVolume); |
|
|
|
|
|
|
|
|