diff --git a/app/api/controller/IndexController.php b/app/api/controller/IndexController.php index c05ad92f1..b8bd7afdd 100755 --- a/app/api/controller/IndexController.php +++ b/app/api/controller/IndexController.php @@ -339,7 +339,7 @@ class IndexController extends BaseApiController if (!$curl_res || $curl_res['code'] == 0) { return json(['success' => false, 'msg' => '失败2.6']); } - $cars_info = json_encode(['id' => $curl_res['data']['car_id'], 'license' => $vehicle[0]['license']]); + $cars_info = json_encode([['id' => $curl_res['data']['car_id'], 'license' => $vehicle[0]['license']]]); //获取签约后的合同 $signContractFile = app(JunziqianController::class)->downloadVehicleContractFile($contract['contract_no']); $signContractFile = $signContractFile ?? ''; diff --git a/app/api/controller/VehicleController.php b/app/api/controller/VehicleController.php index bffdff12d..e92847d4c 100644 --- a/app/api/controller/VehicleController.php +++ b/app/api/controller/VehicleController.php @@ -642,7 +642,7 @@ class VehicleController extends BaseApiController $zjRentCars = VehicleRent::field('car_id')->where('company_id',$zjCompany['party_a'])->where('status',0)->select()->toArray(); $zjRentCars = array_column($zjRentCars,'car_id'); //4、获取小组公司自己租赁的车辆 - $xzRentCars = VehicleRent::field('car_id')->where('company_id',$zjCompany['party_a'])->where('rent_company_id',$xzCompany['id'])->where('status',2)->where('type','<>',2)->select()->toArray(); + $xzRentCars = VehicleRent::field('car_id')->where('company_id',$zjCompany['party_a'])->where('rent_company_id',$xzCompany['id'])->where('status',2)->where('type','<>',1)->where('type','<>',2)->select()->toArray(); $xzRentCars = array_column($xzRentCars,'car_id'); //5、获取平台未出租的车辆 $result = curl_post(env('project.logistic_domain').'/api/Vehicle/getFreeCars',[],['ids'=>implode(',',array_merge($zjRentCars,$xzRentCars))]);