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();