Browse Source

试管架取出名称更新

master
sige 1 year ago
parent
commit
06b461567e
  1. BIN
      app.db
  2. 9
      src/main/java/com/iflytop/digester/DigestionTaskTheadManager.java
  3. 12
      src/main/java/com/iflytop/digester/DigestionTaskThread.java

BIN
app.db

9
src/main/java/com/iflytop/digester/DigestionTaskTheadManager.java

@ -2,6 +2,7 @@ package com.iflytop.digester;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.iflytop.digester.deviceinstance.Device;
import com.iflytop.digester.model.MdbDigestionSolution;
import com.iflytop.digester.model.MdbDigestionTask;
import com.iflytop.digester.model.MdbRuntimeLog;
@ -115,6 +116,14 @@ public class DigestionTaskTheadManager {
if ( "StartNewDigestion".equals(actionName) ) {
this.startNewDigestion(actionJsonTree.get("parameters"));
return;
} else if ( "DoorOpen".equals(actionName) ) {
Device.getInstance().door.open();
this.sendMessageToTransBot("DoorOpenDone", new HashMap<>());
return ;
} else if ( "DoorClose".equals(actionName) ) {
Device.getInstance().door.close();
this.sendMessageToTransBot("DoorCloseDone", new HashMap<>());
return ;
}
Map<String, Object> actionParams = new HashMap<>();

12
src/main/java/com/iflytop/digester/DigestionTaskThread.java

@ -267,7 +267,7 @@ public class DigestionTaskThread extends Thread {
// 正常消解结束
this.updateTaskStatus("LastRound", "取出试管架");
device.door.open(); // 打开门
this.waitForTubeRackTakeOut(this.heatingSlot.tubes); // 等待取出
this.waitForTubeRackTakeOut(this.heatingSlot.tubes, "Normal"); // 等待取出
device.door.close(); // 关闭门
this.heatingSlot.setTubeRackNo(null); // 释放加热位
this.updateTaskStatus("LastRound", "执行最后一轮配置结束");
@ -399,7 +399,7 @@ public class DigestionTaskThread extends Thread {
// 等待取出试管架
device.door.open();
var errorSlot = device.heatingTurntable.getErrorSlot();
this.waitForTubeRackTakeOut(errorSlot.tubes);
this.waitForTubeRackTakeOut(errorSlot.tubes,"Failed");
for ( var index : this.errorTubeIndexes ) {
errorSlot.tubes.set(index, null);
}
@ -487,7 +487,7 @@ public class DigestionTaskThread extends Thread {
for ( var index : this.finishedErrorTubeIndexes ) {
tubes.add(errorSlot.tubes.get(index));
}
this.waitForTubeRackTakeOut(tubes);
this.waitForTubeRackTakeOut(tubes, "Abnormal");
device.door.close();
this.unlockLiquidPlate("异常处理:消解完成的试管已取出");
@ -573,15 +573,17 @@ public class DigestionTaskThread extends Thread {
}
// 等待取出试管架
private void waitForTubeRackTakeOut( List<HeatingTurntableSlotTube> tubes ) {
private void waitForTubeRackTakeOut( List<HeatingTurntableSlotTube> tubes, String type ) {
this.updateTaskStatus("TubeRackTakeOutWait", "等待取出试管架");
Map<String,Object> message = new HashMap<>();
message.put("taskId", this.taskModel.outTaskId);
message.put("batchNo", this.taskModel.batchNo);
message.put("type", type);
message.put("tubes", tubes);
if ( "auto".equals(this.taskModel.mode) ) {
this.manager.sendMessageToTransBot("TubeRackTakeOut", message);
String actionName = String.format("%sTubeRackTakeOut", type);
this.manager.sendMessageToTransBot(actionName, message);
} else {
UfMdbNotification.action("TubeRackTakeOut", message);
}

Loading…
Cancel
Save