test
This commit is contained in:
@@ -173,6 +173,7 @@ class VirtualityFlowProcessor
|
||||
$st = strtotime($currentState->getActionStartTime());
|
||||
$duration = time() - $st;
|
||||
if (empty($st) || $duration < 0) $duration = null;
|
||||
if ($duration == 0) $duration = 1;
|
||||
$builder->currentStep($currentState->getCurrentStep())
|
||||
->batchNo($currentState->getBatchNo())
|
||||
->setDuration($duration)
|
||||
@@ -228,10 +229,19 @@ class VirtualityFlowProcessor
|
||||
public function swipe(string $operatorName, string $endoscopeName, string $readerType): ProcessContext
|
||||
{
|
||||
Logger::info("测试刷卡:{$operatorName}, {$endoscopeName}, {$readerType}");
|
||||
// 刷人员卡
|
||||
$result = $this->swipeOperatorCard($operatorName, $readerType);
|
||||
// 当前语音
|
||||
Logger::info("当前语音:{$result->getFullVoice()}");
|
||||
// 如果当前流程中不存在人员卡就刷卡
|
||||
$endoscopeData = $this->environment['endoscopes'][$endoscopeName]
|
||||
?? throw new \InvalidArgumentException("未找到内镜: {$endoscopeName}");
|
||||
// 获取内镜当前状态
|
||||
/** @var ProcessContext $currentState */
|
||||
$currentState = $this->endoscopeStates[$endoscopeData['id']] ?? null;
|
||||
if ($currentState === null){
|
||||
// 刷人员卡
|
||||
$result = $this->swipeOperatorCard($operatorName, $readerType);
|
||||
// 当前语音
|
||||
Logger::info("当前语音:{$result->getFullVoice()}");
|
||||
}
|
||||
|
||||
|
||||
// 刷内镜卡
|
||||
Logger::info("测试刷卡:{$endoscopeName}, {$readerType}");
|
||||
|
||||
Reference in New Issue
Block a user