|
@ -1,19 +1,31 @@ |
|
|
package com.my.graphiteDigesterBg.task; |
|
|
package com.my.graphiteDigesterBg.task; |
|
|
import com.my.graphiteDigesterBg.MyDevice; |
|
|
|
|
|
import com.my.graphiteDigesterBg.diframe.DiTaskBase; |
|
|
import com.my.graphiteDigesterBg.diframe.DiTaskBase; |
|
|
import com.my.graphiteDigesterBg.diframe.Task; |
|
|
import com.my.graphiteDigesterBg.diframe.Task; |
|
|
import com.my.graphiteDigesterBg.model.MdbOperationLog; |
|
|
import com.my.graphiteDigesterBg.model.MdbOperationLog; |
|
|
import com.my.graphiteDigesterBg.move.MoveMoveTubeRackFromHeatPlateToLiquidPlate; |
|
|
import com.my.graphiteDigesterBg.move.MoveMoveTubeRackFromHeatPlateToLiquidPlate; |
|
|
|
|
|
import com.my.graphiteDigesterBg.resource.ResHeatingTubeRackSlotManager; |
|
|
@Task(name="SampleMoveToLiquidPlate") |
|
|
@Task(name="SampleMoveToLiquidPlate") |
|
|
public class TaskSampleMoveToLiquidPlate extends DiTaskBase { |
|
|
public class TaskSampleMoveToLiquidPlate extends DiTaskBase { |
|
|
// slot index |
|
|
// slot index |
|
|
public Integer slotIndex; |
|
|
public Integer slotIndex; |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public void run() { |
|
|
|
|
|
|
|
|
protected void execute() { |
|
|
this.setStatus(TaskStatus.RUNNING); |
|
|
this.setStatus(TaskStatus.RUNNING); |
|
|
MdbOperationLog.log(this.getUser(), "试管架%d : 样本移至加液区", this.slotIndex); |
|
|
MdbOperationLog.log(this.getUser(), "试管架%d : 样本移至加液区", this.slotIndex); |
|
|
|
|
|
|
|
|
|
|
|
var slotMan = this.getResourceManager(ResHeatingTubeRackSlotManager.class); |
|
|
|
|
|
var slot = slotMan.getSlotByIndex(this.slotIndex); |
|
|
|
|
|
if ( !slot.getIsLocked() ) { |
|
|
|
|
|
throw new RuntimeException("试管架位为空,无法取出样本"); |
|
|
|
|
|
} |
|
|
|
|
|
if ( slot.isHeating ) { |
|
|
|
|
|
throw new RuntimeException("试管架正在加热中,无法取出样本"); |
|
|
|
|
|
} |
|
|
|
|
|
if ( slot.rackPosition.equals("LiquidPlate") ) { |
|
|
|
|
|
throw new RuntimeException("试管架未复位到加热盘,无法取出样本"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
var move = new MoveMoveTubeRackFromHeatPlateToLiquidPlate(); |
|
|
var move = new MoveMoveTubeRackFromHeatPlateToLiquidPlate(); |
|
|
move.setDevice(this.getDevice()); |
|
|
move.setDevice(this.getDevice()); |
|
|
move.slotIndex = this.slotIndex; |
|
|
move.slotIndex = this.slotIndex; |
|
|