diff --git a/app/api/controller/VehicleController.php b/app/api/controller/VehicleController.php index 860df5ecb..ed04aa748 100644 --- a/app/api/controller/VehicleController.php +++ b/app/api/controller/VehicleController.php @@ -419,18 +419,9 @@ class VehicleController extends BaseApiController if($company['company_type'] != 18 ){ return $this->fail('非小组公司不能访问'); } - //获取租赁车俩 - $rentCar = VehicleRent::where('rent_company_id',$company['id'])->where('status',2)->findOrEmpty(); - if(!$rentCar->isEmpty()){ - $rentCar['mileage'] = 0; - $rentCar['company'] = $company; - $rentCar['contract'] = VehicleContract::field('id,contract_no,contract_url,file,status,create_time')->where('id',$rentCar['contract_id'])->findOrEmpty(); - return $this->success('请求成功',$rentCar->toArray()); - }else{ - $vehicleContract = VehicleContract::where('company_b_id',$company['id'])->where('type','<>',2)->order('id desc')->findOrEmpty(); - //返回数据 - return $this->success('请求成功',$vehicleContract->toArray()); - } + //获取签约合同 + $vehicleContract = VehicleContract::where('company_b_id',$company['id'])->where('type','<>',2)->order('id desc')->findOrEmpty(); + return $this->success('请求成功',$vehicleContract->toArray()); } //车辆详情