diff --git a/app/Services/ParkingAbnormalService.php b/app/Services/ParkingAbnormalService.php index 426024d..a6575fd 100644 --- a/app/Services/ParkingAbnormalService.php +++ b/app/Services/ParkingAbnormalService.php @@ -79,7 +79,7 @@ class ParkingAbnormalService extends BaseService $item['license_plate'] = ParkingLicensePlate::getNumber( $item['license_plate_id'] ); - $item['duration'] = get_time_difference_str($item['enter_at']); + $item['duration'] = get_time_difference_str($item['enter_at'], $item['operation_at'] ?? ''); $typeArr = $this->getType(); $item['type'] = $typeArr[$item['type']]; $statusArr = $this->getStatus();