From a6a6453c1b77dbc57d5edda554b68bef2ecf7c8a Mon Sep 17 00:00:00 2001 From: wanghongjun <1445693971@qq.com> Date: Mon, 27 Jul 2026 16:28:02 +0800 Subject: [PATCH] =?UTF-8?q?vip=E8=BD=A6=E7=89=8C=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Imports/ParkingVipListImport.php | 6 +++++- resources/lang/en/imports.php | 3 ++- resources/lang/zh-CN/imports.php | 3 ++- resources/lang/zh-TW/imports.php | 3 ++- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/app/Imports/ParkingVipListImport.php b/app/Imports/ParkingVipListImport.php index 65f9d7b..85b00e0 100644 --- a/app/Imports/ParkingVipListImport.php +++ b/app/Imports/ParkingVipListImport.php @@ -36,12 +36,16 @@ class ParkingVipListImport implements ToModel $this->index += 1; $license = $row[1] ?? ''; if (empty($license)) { - //$this->error[] = imports_error($this->index, 'import33'); + $this->error[] = imports_error($this->index, 'import33'); return; } $license_id = (new ParkingLicensePlateService( $this->logService ))->createLicenseId($license); + if (!$license_id) { + $this->error[] = imports_error($this->index, 'import38'); + return; + } if (ParkingVipList::query()->where('license_id', $license_id) ->exists() ) { diff --git a/resources/lang/en/imports.php b/resources/lang/en/imports.php index 5be5b77..0ca9bc5 100644 --- a/resources/lang/en/imports.php +++ b/resources/lang/en/imports.php @@ -37,5 +37,6 @@ return [ 'import34' => 'The lane cannot be empty.', 'import35' => 'Lane does not exist', 'import36' => 'The reason for passage cannot be empty.', - 'import37' => 'The license plate number already exists.' + 'import37' => 'The license plate number already exists.', + 'import38' => 'Incorrect license plate number' ]; diff --git a/resources/lang/zh-CN/imports.php b/resources/lang/zh-CN/imports.php index 9a43f1b..783a18d 100644 --- a/resources/lang/zh-CN/imports.php +++ b/resources/lang/zh-CN/imports.php @@ -37,5 +37,6 @@ return [ 'import34' => '车道不能为空', 'import35' => '车道不存在', 'import36' => '通行原因不能为空', - 'import37' => '车牌号码已存在' + 'import37' => '车牌号码已存在', + 'import38' => '车牌号码错误' ]; diff --git a/resources/lang/zh-TW/imports.php b/resources/lang/zh-TW/imports.php index 523adcf..f2ed477 100644 --- a/resources/lang/zh-TW/imports.php +++ b/resources/lang/zh-TW/imports.php @@ -37,5 +37,6 @@ return [ 'import34' => '車道不能為空', 'import35' => '車道不存在', 'import36' => '通行原因不能為空', - 'import37' => '車牌號碼已存在' + 'import37' => '車牌號碼已存在', + 'import38' => '車牌號碼錯誤' ];