|
|
|
@ -111,8 +111,10 @@ class CameraDeviceService extends BaseService |
|
|
|
|
|
|
|
// 抓拍车位车牌及现场图片 |
|
|
|
#[ArrayShape([ |
|
|
|
'licensePlate' => "mixed|string", |
|
|
|
'images_data' => "mixed|string" |
|
|
|
'licensePlate' => "mixed|string", // 车牌号码 |
|
|
|
'images_data' => "mixed|string", // 场景图 |
|
|
|
'confidenceLevel' => "mixed|string", // 识别度 |
|
|
|
'dateTime' => "mixed|string" // |
|
|
|
])] public function getTrafficMNPR(int $channels_id = 1): array |
|
|
|
{ |
|
|
|
$url = $this->getUrl($this->TRAFFIC_MNPR . $channels_id); |
|
|
|
@ -120,8 +122,10 @@ class CameraDeviceService extends BaseService |
|
|
|
$body = $response->body(); |
|
|
|
$parsed = CommonService::parseMultipart($body); |
|
|
|
$data = [ |
|
|
|
'licensePlate' => '', |
|
|
|
'images_data' => '' |
|
|
|
'licensePlate' => '', |
|
|
|
'images_data' => '', |
|
|
|
'confidenceLevel' => '', |
|
|
|
'dateTime' => '' |
|
|
|
]; |
|
|
|
if ($parsed['xml'] && is_array($parsed['xml'])) { |
|
|
|
if (isset($parsed['xml']['ANPR']['licensePlate'])) { |
|
|
|
@ -129,6 +133,10 @@ class CameraDeviceService extends BaseService |
|
|
|
if ($licensePlate != '无车牌') { |
|
|
|
$data['licensePlate'] = $licensePlate; |
|
|
|
} |
|
|
|
$data['confidenceLevel'] = $parsed['xml']['ANPR']['confidenceLevel']; |
|
|
|
} |
|
|
|
if (isset($parsed['xml']['dateTime'])) { |
|
|
|
$data['dateTime'] = $parsed['xml']['dateTime']; |
|
|
|
} |
|
|
|
} |
|
|
|
if ($data['licensePlate'] && $parsed['images'] && is_array($parsed['images'])) { |
|
|
|
|