From b6c35c87e2b3fe136b8939691e7db76f5b1c7c2f Mon Sep 17 00:00:00 2001 From: sige Date: Wed, 5 Jun 2024 11:46:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B7=E6=9C=AC=E6=B5=8B=E8=AF=95=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/iflytop/a800/task/TubeTestTask.java | 23 +++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/iflytop/a800/task/TubeTestTask.java b/src/main/java/com/iflytop/a800/task/TubeTestTask.java index cfb7962..4e64f99 100644 --- a/src/main/java/com/iflytop/a800/task/TubeTestTask.java +++ b/src/main/java/com/iflytop/a800/task/TubeTestTask.java @@ -36,11 +36,24 @@ public class TubeTestTask extends TaskBase { // 任务准备 public void prepare() { var device = Device.getInstance(); - this.bufferTube = device.bufferTube.alloc(); + + // 申请测试卡 + this.testCard = device.testCard.alloc(this.project); + + // 缓冲液/探测物质 + this.bufferTube = device.bufferTube.alloc(this.testCard); + + // 大缓冲液 if ("yes".equals(this.project.isLargeBufferRequired)) { - this.largeBufferTube = device.largeBufferTube.getTube(); + this.largeBufferTube = device.largeBufferTube.getTube(this.testCard); } - this.testCard = device.testCard.alloc(); + + // 测试记录 + this.test = new MdbTest(); + this.test.projectCode = this.project.code; + this.test.materialLotCode = this.testCard.lotCode; + this.test.save(); + this.idChip = new MdbIdChip(); this.idChip.peakCount = 3; this.idChip.itemCount = 1; @@ -54,10 +67,6 @@ public class TubeTestTask extends TaskBase { "wb", Map.of("a", 1.0, "b", 2.0, "c", 3.0, "d", 4.0) ) ))); - - // 测试记录 - this.test = new MdbTest(); - this.test.save(); } @Override