This commit is contained in:
unknown 2023-10-18 14:41:46 +08:00
parent 32d0c15469
commit 00dc9c1c0a
2 changed files with 4 additions and 12 deletions

View File

@ -329,8 +329,8 @@ class IndexController extends BaseApiController
//添加车辆到物流系统
$vehicle = json_decode($contract['cars_info'], true);
$curl_res = curl_post(env('project.logistic_domain').'/api/addSelfCar', [], [
'license' => $vehicle['license'],
'pic' => $vehicle['pic'],
'license' => $vehicle[0]['license'],
'pic' => $vehicle[0]['pic'],
'company_id' => $contract['company_a_id'],
'company_name' => $contract['company_a_name'],
'company_user' => $contract['company_a_user'],
@ -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['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 ?? '';
@ -357,7 +357,7 @@ class IndexController extends BaseApiController
'car_id' => $curl_res['data']['car_id'],
'contract_id' => $contract['id'],
'company_id' => $contract['company_a_id'],
'car_license' => $vehicle['license'],
'car_license' => $vehicle[0]['license'],
'status' => 2,
'rent_time' => time(),
'rent_contract_id' => $contract['id'],
@ -374,13 +374,6 @@ class IndexController extends BaseApiController
'use_user_name' => $party_b['master_name'],
'use_user_phone' => $party_b['master_phone']
]);
CompanyProperty::create([
'company_id' => $contract['company_b_id'],
'object_id' => $car_id,
'type' => 1,
'create_time' => time(),
'update_time' => time(),
]);
return json(['success' => true, 'msg' => '成功']);
} else {
return json(['success' => true, 'msg' => '成功']);

View File

@ -9,7 +9,6 @@ use app\common\model\contract\VehicleContract;
use app\common\model\vehicle\VehicleBuyRecord;
use app\common\model\vehicle\VehicleRent;
use think\facade\Db;
use function Symfony\Component\Translation\t;
class VehicleController extends BaseApiController
{