|
|
|
@ -7,6 +7,7 @@ use App\Models\ParkingChannel; |
|
|
|
use App\Models\ParkingSpaceType; |
|
|
|
use App\Services\AdminTranslationService; |
|
|
|
use App\Services\OperationLogService; |
|
|
|
use App\Services\ParkingLicensePlateService; |
|
|
|
use App\Services\ParkingWhitelistService; |
|
|
|
use Maatwebsite\Excel\Concerns\ToModel; |
|
|
|
use Maatwebsite\Excel\Concerns\WithChunkReading; |
|
|
|
@ -36,6 +37,15 @@ class ParkingWhitelistImport implements ToModel, WithChunkReading |
|
|
|
$this->error[] = imports_error($this->index, 'import33'); |
|
|
|
return; |
|
|
|
} |
|
|
|
$licensePlateService = new ParkingLicensePlateService( |
|
|
|
new OperationLogService() |
|
|
|
); |
|
|
|
$error_str = $licensePlateService->validateLicensePlate( |
|
|
|
$license_plate |
|
|
|
); |
|
|
|
if ($error_str) { |
|
|
|
$this->error[] = $error_str; |
|
|
|
} |
|
|
|
$parking_name = $row[2] ?? ''; |
|
|
|
if (empty($parking_name)) { |
|
|
|
$this->error[] = imports_error($this->index, 'import20'); |
|
|
|
|