diff --git a/app/api/controller/VehicleController.php b/app/api/controller/VehicleController.php index e6620922b..cc5eca80f 100644 --- a/app/api/controller/VehicleController.php +++ b/app/api/controller/VehicleController.php @@ -271,15 +271,7 @@ class VehicleController extends BaseApiController if($vehicleContract['company_a_id'] != $this->userInfo['company_id']){ return $this->fail('数据不匹配'); } - if(!empty($vehicleContract['cars_info'])){ - $vehicleContract['cars_info'] = json_decode($vehicleContract['cars_info'],true); - } - //判断申请状态 - if($vehicleContract['status'] == -1){ - $vehicleRentCars = VehicleRent::where('company_id',$vehicleContract['company_a_id'])->where('status',0)->select()->toArray(); - }else{ - $vehicleRentCars = []; - } + $vehicleRentCars = VehicleRent::where('company_id',$vehicleContract['company_a_id'])->select()->toArray(); $data = [ 'vehicleContract' => $vehicleContract->toArray(), 'vehicleRentCars' => $vehicleRentCars