From ce8ea487738b863c383bdf38c49c8d51dad11ec1 Mon Sep 17 00:00:00 2001 From: wanghongjun <1445693971@qq.com> Date: Mon, 15 Jun 2026 10:07:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=82=E5=B8=B8=E5=8D=A0=E7=94=A8=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/ParkingAbnormalService.php | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/app/Services/ParkingAbnormalService.php b/app/Services/ParkingAbnormalService.php index 2764379..7e843e5 100644 --- a/app/Services/ParkingAbnormalService.php +++ b/app/Services/ParkingAbnormalService.php @@ -62,14 +62,20 @@ class ParkingAbnormalService extends BaseService { $item['parking'] = Parking::getName($item['parking_id']); $ParkingSpace = ParkingSpace::query()->find($item['space_id']); - $item['floor'] = AdminFloor::getName($ParkingSpace['floor_id']); - $item['parking_space_number'] = $ParkingSpace['number']; - $item['parking_space_type'] = ParkingSpaceType::getName( - $ParkingSpace['space_type_id'] - ); - $item['parking_space_attr'] = ParkingSpaceAttributes::getAttr( - $ParkingSpace['space_attr_id'] - ); + $item['floor'] = ''; + $item['parking_space_number'] = ''; + $item['parking_space_type'] = ''; + $item['parking_space_attr'] = ''; + if ($ParkingSpace) { + $item['floor'] = AdminFloor::getName($ParkingSpace['floor_id']); + $item['parking_space_number'] = $ParkingSpace['number']; + $item['parking_space_type'] = ParkingSpaceType::getName( + $ParkingSpace['space_type_id'] + ); + $item['parking_space_attr'] = ParkingSpaceAttributes::getAttr( + $ParkingSpace['space_attr_id'] + ); + } $item['license_plate'] = ParkingLicensePlate::getNumber( $item['license_plate_id'] );