|
|
|
@ -75,7 +75,7 @@ class ParkingSpaceService extends BaseService |
|
|
|
} |
|
|
|
|
|
|
|
// 获取状态显示值 |
|
|
|
public function getParkingSpaceStatus($status, $license_plate_id = '') |
|
|
|
public function getParkingSpaceStatus($status, $license_plate_id, $space_id) |
|
|
|
{ |
|
|
|
$statusArr = $this->getStatusArr(true); |
|
|
|
// 是否有车 |
|
|
|
@ -89,6 +89,12 @@ class ParkingSpaceService extends BaseService |
|
|
|
if ($status == '1') { |
|
|
|
// 占用 是否有车 |
|
|
|
$str = $yesStr ?: $noStr; |
|
|
|
$abnormal_exists = (new ParkingAbnormalService( |
|
|
|
$this->logService |
|
|
|
))->isLicensePlate($license_plate_id, $space_id); |
|
|
|
if ($abnormal_exists) { |
|
|
|
$str = __service('parking_space.abnormal'); |
|
|
|
} |
|
|
|
return $statusArr[1] . '/' . $str; |
|
|
|
} elseif ($status == '2') { |
|
|
|
return $statusArr[$status]; |
|
|
|
@ -144,7 +150,8 @@ class ParkingSpaceService extends BaseService |
|
|
|
); |
|
|
|
$item['status'] = $this->getParkingSpaceStatus( |
|
|
|
$item['status'], |
|
|
|
$item['license_plate_id'] |
|
|
|
$item['license_plate_id'], |
|
|
|
$item['id'] |
|
|
|
); |
|
|
|
$item['operation_type'] = $this->getOperationType( |
|
|
|
$item['operation_type'] |
|
|
|
|