From 9b534e6c324d8bed598674b319fae4dc4d4302a9 Mon Sep 17 00:00:00 2001 From: chenbo <709206448@qq.com> Date: Mon, 4 Dec 2023 15:41:22 +0800 Subject: [PATCH] fixed --- app/api/controller/IndexController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api/controller/IndexController.php b/app/api/controller/IndexController.php index 74c897d8d..9014ef7d1 100755 --- a/app/api/controller/IndexController.php +++ b/app/api/controller/IndexController.php @@ -834,7 +834,7 @@ class IndexController extends BaseApiController $companyIds = array_column($companyList, 'id'); $carList = []; // 查镇车辆列表 - $vehicleList = VehicleRent::whereIn('company_id', $companyIds)->where('status','in','0,1,2')->field('car_id as id,car_license as license')->select()->toArray(); + $vehicleList = Db::name('vehicle_rent')->whereIn('company_id', $companyIds)->where('status','in','0,1,2')->field('car_id as id,car_license as license')->group('company_id')->select()->toArray(); // 查小组车辆列表 // $buyCarRent = VehicleBuyRecord::whereIn('company_id', $companyIds)->where('status','<>',4)->findOrEmpty();