From a63f48e2cd4c87f131a4e1574640329f43e30d39 Mon Sep 17 00:00:00 2001 From: HSZ_HeSongZhen <210202959@qq.com> Date: Tue, 22 Apr 2025 22:51:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8D=95=E9=80=9A=E9=81=93?= =?UTF-8?q?=E6=89=B9=E9=87=8F=E6=89=AB=E7=A0=81=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HbotCodeScanPosVerificationPage.java | 43 ++++++++++++++++------ 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/src/main/java/a8k/extui/page/test/verification/HbotCodeScanPosVerificationPage.java b/src/main/java/a8k/extui/page/test/verification/HbotCodeScanPosVerificationPage.java index c7afebe..4c5b86f 100644 --- a/src/main/java/a8k/extui/page/test/verification/HbotCodeScanPosVerificationPage.java +++ b/src/main/java/a8k/extui/page/test/verification/HbotCodeScanPosVerificationPage.java @@ -58,20 +58,15 @@ public class HbotCodeScanPosVerificationPage { codeScanerDriver.pipetteModCodeScannerStopScan(); } - public void testCodeScan(Integer times, Integer overtime) throws AppException { + public void batchCodeScan(Integer times, Integer overtime) throws AppException { if(overtime < 0){ overtime = 0; } - if(times < 1){ - times = 1; - } - if(times > 100){ - times = 100; - } - log.info("testCodeScan times:{} overtime:{}", times, overtime); + + log.info("batchCodeScan times:{} overtime:{}", times, overtime); for (int i = 0; i < times; i++) { - log.info("testCodeScan times:{}", i); + log.info("batchCodeScan times:{}", i); hbotMoveExCtrlService.moveQuickToZero(); for(var cg: ConsumableGroup.values()){ @@ -86,6 +81,31 @@ public class HbotCodeScanPosVerificationPage { } } + public void codeScan(ConsumableGroup cg, Integer overtime) throws AppException + { + moveToPBScanPos(cg); + threadSleep(overtime); + String result = codeScanerDriver.pipetteModCodeScannerScanCode(); + if(result == null || result.isEmpty()){ + log.info("cg {} 扫码失败", cg); + } + log.info("cg {} 扫码结果:{}", cg, result); + } + + public void batchCodeScanWithCheck(ConsumableGroup cg, Integer times, Integer overtime) throws AppException { + if(overtime < 0){ + overtime = 0; + } + + log.info("batchCodeScanWithCheck times:{} overtime:{}", times, overtime); + + for (int i = 0; i < times; i++) { + log.info("batchCodeScanWithCheck times:{}", i); + hbotMoveExCtrlService.moveQuickToZero(); + codeScan(cg, overtime); + } + } + @PostConstruct void init() { @@ -97,8 +117,9 @@ public class HbotCodeScanPosVerificationPage { cfg.addFunction("扫码", this::startCodeScan); cfg.addFunction("停止扫码", this::stopCodeScan); - cfg.newGroup("扫描测试"); - cfg.addFunction("批量扫码", this::testCodeScan); + cfg.newGroup("扫码测试"); + cfg.addFunction("批量扫码(One)", this::batchCodeScanWithCheck); + cfg.addFunction("批量扫码", this::batchCodeScan); extApiPageMgr.addPage(cfg); }