From 39ddbe0dd6c4848b5c74ec66bbdee7898d4c0ded Mon Sep 17 00:00:00 2001 From: unknown <736250432@qq.com> Date: Thu, 12 Oct 2023 17:45:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=BB=84=E5=85=AC=E5=8F=B8=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E9=A1=B5=E9=80=BB=E8=BE=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/VehicleController.php | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) 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()); } //车辆详情