From 8a9f8110dcba4dad2bb88d271321e271badb2b80 Mon Sep 17 00:00:00 2001 From: unknown <736250432@qq.com> Date: Fri, 1 Sep 2023 13:57:54 +0800 Subject: [PATCH] update --- app/api/controller/VehicleController.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/api/controller/VehicleController.php b/app/api/controller/VehicleController.php index d74c70a47..0d1f8caf4 100644 --- a/app/api/controller/VehicleController.php +++ b/app/api/controller/VehicleController.php @@ -12,7 +12,6 @@ use think\facade\Db; class VehicleController extends BaseApiController { public string $url = 'https://logistics.lihaink.cn'; -// public string $url = 'http://www.lst.local'; //镇街公司想物流平台申请租赁车辆 public function setContractByTownCompany() { @@ -25,11 +24,11 @@ class VehicleController extends BaseApiController //获取该公司已签约的小组服务公司数量 $villageCompany = Contract::field('id')->where('party_a',$this->userInfo['company_id'])->where('signing_timer',2)->count(); //系统车辆数量 - $rentCar = VehicleRent::field('id')->where('company_id',$this->userInfo['company_id'])->where('type',0)->count(); + $rentCar = VehicleRent::field('id')->where('company_id',$this->userInfo['company_id'])->where('status','<>',3)->where('type',0)->count(); //申请中的车辆 $applyCar = VehicleContract::field('num')->where('company_b_id',$this->userInfo['company_id'])->where('status','in','-1,0,1,2')->sum('num'); //自有车辆数量 - $selfCar = VehicleRent::field('id')->where('company_id',$this->userInfo['company_id'])->where('type',1)->count(); + $selfCar = VehicleRent::field('id')->where('company_id',$this->userInfo['company_id'])->where('status','<>',3)->where('type',1)->count(); //可在租车辆 $doubleRentCar = $villageCompany - $rentCar - $applyCar - $selfCar; if($params['num'] > $doubleRentCar ){