|
|
|
@ -5,17 +5,27 @@ namespace App\Services; |
|
|
|
use App\Models\AdminFloor; |
|
|
|
use App\Models\ParkingOccupancyRate; |
|
|
|
use App\Models\ParkingOccupancyRateInfo; |
|
|
|
use App\Models\ParkingSpaceType; |
|
|
|
|
|
|
|
class ParkingOccupancyRateService extends BaseService |
|
|
|
{ |
|
|
|
protected string $menuTitle = 'occupancy_rate'; |
|
|
|
|
|
|
|
public array $colorArr = [ |
|
|
|
protected array $colorArr = [ |
|
|
|
'#73c0de', '#fac858', '#5470c6', '#67c23a', '#ff0000', '#349c32', |
|
|
|
'#ffff00', '#0000ff', '#00ffff', '#ca00c9', '#ce4478', '#31dc21', |
|
|
|
'#f9d1c1', '#5e4439', '#21375f', '#63beef', '#60c6ad', '#a7a7a7', |
|
|
|
]; |
|
|
|
|
|
|
|
public function getColorSpaceTypeList() |
|
|
|
{ |
|
|
|
$ParkingSpaceType = ParkingSpaceType::getData(); |
|
|
|
foreach ($ParkingSpaceType as $key => &$item) { |
|
|
|
$item['color'] = $this->colorArr[$key]; |
|
|
|
} |
|
|
|
return $ParkingSpaceType; |
|
|
|
} |
|
|
|
|
|
|
|
public static function createData( |
|
|
|
$space_type_id, |
|
|
|
$floor_id, |
|
|
|
|