Browse Source

增加单通道批量扫码功能

master
HSZ_HeSongZhen 3 months ago
parent
commit
a63f48e2cd
  1. 43
      src/main/java/a8k/extui/page/test/verification/HbotCodeScanPosVerificationPage.java

43
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);
}

Loading…
Cancel
Save