From 993b22a0247d3c089696090801904993c78c4e39 Mon Sep 17 00:00:00 2001 From: wanghongjun <1445693971@qq.com> Date: Wed, 8 Jul 2026 16:01:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=BB=B4=E4=BF=AE=E8=BD=A6?= =?UTF-8?q?=E4=BD=8D=E4=BC=98=E5=8C=962?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/ParkingSpaceRepairService.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Services/ParkingSpaceRepairService.php b/app/Services/ParkingSpaceRepairService.php index 9bd94ae..fcfd8d2 100644 --- a/app/Services/ParkingSpaceRepairService.php +++ b/app/Services/ParkingSpaceRepairService.php @@ -61,12 +61,14 @@ class ParkingSpaceRepairService extends BaseService try { DB::beginTransaction(); $spaceNameArr = explode(',', $data['parking_space_name']); + $count = count($spaceNameArr); foreach ($spaceNameArr as $parking_space_name) { $space = ParkingSpace::query()->where('number', $parking_space_name)->first(); + $str = $count > 1 ? ':' . $parking_space_name : ''; if (!$space) { throw new CustomException( __service($this->menuTitle . '.space_not_exists') - . ':' . $parking_space_name + . $str ); } // 维修状态不可添加 @@ -75,7 +77,7 @@ class ParkingSpaceRepairService extends BaseService if ($space['status'] == 2) { throw new CustomException( __service($this->menuTitle . '.space_exists') - . ':' . $parking_space_name + . $str ); } $model = $this->createData(