|
@ -24,6 +24,8 @@ import org.springframework.stereotype.Component; |
|
|
import java.util.ArrayList; |
|
|
import java.util.ArrayList; |
|
|
import java.util.List; |
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
|
|
import static a8k.OS.threadSleep; |
|
|
|
|
|
|
|
|
@Component |
|
|
@Component |
|
|
@Slf4j |
|
|
@Slf4j |
|
|
@RequiredArgsConstructor |
|
|
@RequiredArgsConstructor |
|
@ -56,6 +58,54 @@ public class HbotCodeScanPosVerificationPage { |
|
|
codeScanerDriver.pipetteModCodeScannerStopScan(); |
|
|
codeScanerDriver.pipetteModCodeScannerStopScan(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void batchCodeScan(Integer times, Integer overtime) throws AppException { |
|
|
|
|
|
if(overtime < 0){ |
|
|
|
|
|
overtime = 0; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
log.info("batchCodeScan times:{} overtime:{}", times, overtime); |
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < times; i++) { |
|
|
|
|
|
log.info("batchCodeScan times:{}", i); |
|
|
|
|
|
hbotMoveExCtrlService.moveQuickToZero(); |
|
|
|
|
|
|
|
|
|
|
|
for(var cg: ConsumableGroup.values()){ |
|
|
|
|
|
moveToPBScanPos(cg); |
|
|
|
|
|
threadSleep(overtime); |
|
|
|
|
|
String result = codeScanerDriver.pipetteModCodeScannerScanCode(); |
|
|
|
|
|
if(result == null || result.isEmpty()){ |
|
|
|
|
|
log.info("cg {} 扫码失败", cg); |
|
|
|
|
|
} |
|
|
|
|
|
log.info("cg {} 扫码结果:{}", cg, result); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
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 |
|
|
@PostConstruct |
|
|
void init() { |
|
|
void init() { |
|
@ -66,6 +116,11 @@ public class HbotCodeScanPosVerificationPage { |
|
|
cfg.addFunction("移动到大瓶扫码位置", this::moveToLargeBSCodeScanPos); |
|
|
cfg.addFunction("移动到大瓶扫码位置", this::moveToLargeBSCodeScanPos); |
|
|
cfg.addFunction("扫码", this::startCodeScan); |
|
|
cfg.addFunction("扫码", this::startCodeScan); |
|
|
cfg.addFunction("停止扫码", this::stopCodeScan); |
|
|
cfg.addFunction("停止扫码", this::stopCodeScan); |
|
|
|
|
|
|
|
|
|
|
|
cfg.newGroup("扫码测试"); |
|
|
|
|
|
cfg.addFunction("批量扫码(One)", this::batchCodeScanWithCheck); |
|
|
|
|
|
cfg.addFunction("批量扫码", this::batchCodeScan); |
|
|
|
|
|
|
|
|
extApiPageMgr.addPage(cfg); |
|
|
extApiPageMgr.addPage(cfg); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |