|
|
@ -108,17 +108,16 @@ public class DigestionTaskThread extends Thread { |
|
|
|
lastRound = rounds.remove(rounds.size() - 1); |
|
|
|
} |
|
|
|
|
|
|
|
// // 执行第一轮 |
|
|
|
// if ( null != firstRound ) { |
|
|
|
// this.updateTaskStatus("FirstRound", "执行第一轮配置"); |
|
|
|
// this.executeRound(firstRound); |
|
|
|
// } |
|
|
|
// // 执行中间轮 |
|
|
|
// for (var round : rounds) { |
|
|
|
// this.executeRound(round); |
|
|
|
// } |
|
|
|
// 执行最后一轮 |
|
|
|
if ( null != lastRound ) { |
|
|
|
if ( null != firstRound ) { // 执行第一轮 |
|
|
|
this.updateTaskStatus("FirstRound", "执行第一轮配置"); |
|
|
|
this.executeRound(firstRound); |
|
|
|
} |
|
|
|
for ( int i=0; i<rounds.size(); i++ ) { // 执行中间轮次 |
|
|
|
var round = rounds.get(i); |
|
|
|
this.updateTaskStatus("Round", String.format("配置轮次执行: %d/%d", i+2, rounds.size()+2)); |
|
|
|
this.executeRound(round); |
|
|
|
} |
|
|
|
if ( null != lastRound ) { // 执行最后一轮 |
|
|
|
this.executeLastRound(lastRound); |
|
|
|
} |
|
|
|
|
|
|
@ -158,8 +157,6 @@ public class DigestionTaskThread extends Thread { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 执行消解每轮配置 |
|
|
|
private void executeRound( MdbDigestionSolution.DigestionSolutionRound digestionRound ) throws InterruptedException { |
|
|
|
this.updateTaskStatus("RoundStart", "配置轮次开始执行"); |
|
|
@ -171,16 +168,19 @@ public class DigestionTaskThread extends Thread { |
|
|
|
for ( var liquid : digestionRound.liquids ) { |
|
|
|
this.updateTaskStatus("Liquid", String.format("加液 %s %d", liquid.type, liquid.volume)); |
|
|
|
liquidAddition.addLiquidToTubes(tubes, liquid.type, liquid.volume); |
|
|
|
liquidAddition.shake(digestionRound.shakingCount); |
|
|
|
this.updateTaskStatus("Liquid", "加液完成"); |
|
|
|
} |
|
|
|
this.updateTaskStatus("Liquid", "摇匀"); |
|
|
|
liquidAddition.shake(digestionRound.shakingCount); |
|
|
|
|
|
|
|
// 搬运到加热转盘 |
|
|
|
device.transferArm.moveTubeRackToHeatingTurntable(this.heatingSlot.index); |
|
|
|
|
|
|
|
// 加热 |
|
|
|
for ( var heating : digestionRound.heatings ) { |
|
|
|
this.updateTaskStatus("heating", String.format("加热 %d℃ %d分钟", heating.temperature, heating.duration)); |
|
|
|
this.updateTaskStatus("Heating", String.format("加热 %d℃ %d分钟", heating.temperature, heating.duration)); |
|
|
|
this.heatingSlot.heating(heating.temperature, heating.duration); |
|
|
|
this.updateTaskStatus("Heating", "加热完成"); |
|
|
|
} |
|
|
|
|
|
|
|
// 移至加液区, 以便执行下一轮 |
|
|
@ -194,6 +194,17 @@ public class DigestionTaskThread extends Thread { |
|
|
|
this.isPrecheckFinished = false; |
|
|
|
var device = Device.getInstance(); |
|
|
|
|
|
|
|
// 加液 |
|
|
|
var tubes = this.heatingSlot.getExistTubeIndexes(); |
|
|
|
var liquidAddition = device.liquidAddition; |
|
|
|
for ( var liquid : digestionRound.liquids ) { |
|
|
|
this.updateTaskStatus("Liquid", String.format("加液 %s %d", liquid.type, liquid.volume)); |
|
|
|
liquidAddition.addLiquidToTubes(tubes, liquid.type, liquid.volume); |
|
|
|
this.updateTaskStatus("Liquid", "加液完成"); |
|
|
|
} |
|
|
|
this.updateTaskStatus("Liquid", "摇匀"); |
|
|
|
liquidAddition.shake(digestionRound.shakingCount); |
|
|
|
|
|
|
|
// 预检查定时, 在结束前10分钟执行 |
|
|
|
Integer totalDurationCount = 0; |
|
|
|
for ( var heating : digestionRound.heatings ) { |
|
|
@ -241,18 +252,12 @@ public class DigestionTaskThread extends Thread { |
|
|
|
} |
|
|
|
|
|
|
|
// 正常消解结束; |
|
|
|
if ( "auto".equals(this.taskModel.mode) ) { |
|
|
|
// 移动到加液盘 |
|
|
|
device.transferArm.moveTubeRackToLiquidPlate(this.heatingSlot.index); |
|
|
|
// 打开门 |
|
|
|
device.door.open(); |
|
|
|
// 等待取出 |
|
|
|
this.waitForTubeRackTakeOut(); |
|
|
|
// 关闭门 |
|
|
|
device.door.close(); |
|
|
|
// 释放加热位 |
|
|
|
this.heatingSlot.setTubeRackNo(null); |
|
|
|
} |
|
|
|
this.updateTaskStatus("LastRound", "取出试管架"); |
|
|
|
device.transferArm.moveTubeRackToLiquidPlate(this.heatingSlot.index); // 移动到加液盘 |
|
|
|
device.door.open(); // 打开门 |
|
|
|
this.waitForTubeRackTakeOut(); // 等待取出 |
|
|
|
device.door.close(); // 关闭门 |
|
|
|
this.heatingSlot.setTubeRackNo(null); // 释放加热位 |
|
|
|
this.updateTaskStatus("LastRound", "执行最后一轮配置结束"); |
|
|
|
} |
|
|
|
|
|
|
@ -468,19 +473,6 @@ public class DigestionTaskThread extends Thread { |
|
|
|
this.updateTaskStatus("ErrorTubeCheck", String.format("完成试管已确认 : [%s]", finishedTubeIndexes)); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 等待放入试管架 |
|
|
|
private void waitForTubeRackPutIn() { |
|
|
|
this.updateTaskStatus("TubeRackPutInWait", "等待放入试管架"); |
|
|
@ -544,10 +536,6 @@ public class DigestionTaskThread extends Thread { |
|
|
|
this.updateTaskStatus("TubeRackTakeOutWaitDone", "试管架已取出"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 更新任务状态 |
|
|
|
private void updateTaskStatus(String status, String message) { |
|
|
|
LOG.info("[Digestion Task : {}] ({}) {}", taskModel.id, status, message); |
|
|
|