update
This commit is contained in:
parent
1b475eeba4
commit
007f0f457b
@ -157,7 +157,7 @@ class IndexController extends BaseApiController
|
||||
]);
|
||||
$party_b = Company::where('id', $contract['company_b_id'])->find();
|
||||
//通知物流系统跟新
|
||||
curl_post(env('project.logistic_domain') . '/api/updateVehicleRent', [], [
|
||||
curl_post(env('project.logistic_domain').'/api/updateVehicleRent', [], [
|
||||
'car_id' => $vehicle['id'],
|
||||
'use_user_id' => $party_b['user_id'],
|
||||
'use_user_name' => $party_b['master_name'],
|
||||
@ -166,7 +166,9 @@ class IndexController extends BaseApiController
|
||||
CompanyProperty::create([
|
||||
'company_id' => $contract['company_b_id'],
|
||||
'object_id' => $vehicle['id'],
|
||||
'type' => 1
|
||||
'type' => 1,
|
||||
'create_time' => time(),
|
||||
'update_time' => time(),
|
||||
]);
|
||||
return json(['success' => true, 'msg' => '成功']);
|
||||
} else {
|
||||
@ -203,7 +205,7 @@ class IndexController extends BaseApiController
|
||||
} else if ($contract['signing_timer'] == 1) {
|
||||
//添加车辆到物流系统
|
||||
$vehicle = json_decode($contract['cars_info'], true);
|
||||
$curl_res = curl_post(env('project.logistic_domain') . '/api/addSelfCar', [], [
|
||||
$curl_res = curl_post(env('project.logistic_domain').'/api/addSelfCar', [], [
|
||||
'license' => $vehicle['license'],
|
||||
'company_id' => $contract['company_a_id'],
|
||||
'company_name' => $contract['company_a_name'],
|
||||
@ -229,7 +231,7 @@ class IndexController extends BaseApiController
|
||||
$car_id = $curl_res['data']['car_id'];
|
||||
$party_b = Company::where('id', $contract['company_b_id'])->find();
|
||||
//通知物流系统跟新
|
||||
curl_post(env('project.logistic_domain') . '/api/updateVehicleRent', [], [
|
||||
curl_post(env('project.logistic_domain').'/api/updateVehicleRent', [], [
|
||||
'car_id' => $car_id,
|
||||
'use_user_id' => $party_b['user_id'],
|
||||
'use_user_name' => $party_b['master_name'],
|
||||
@ -238,7 +240,9 @@ class IndexController extends BaseApiController
|
||||
CompanyProperty::create([
|
||||
'company_id' => $contract['company_b_id'],
|
||||
'object_id' => $car_id,
|
||||
'type' => 1
|
||||
'type' => 1,
|
||||
'create_time' => time(),
|
||||
'update_time' => time(),
|
||||
]);
|
||||
return json(['success' => true, 'msg' => '成功']);
|
||||
} else {
|
||||
@ -284,7 +288,7 @@ class IndexController extends BaseApiController
|
||||
'status' => 3,
|
||||
]);
|
||||
//通知物流系统跟新
|
||||
curl_post(env('project.logistic_domain') . '/api/cancelRent', [], [
|
||||
curl_post(env('project.logistic_domain').'/api/cancelRent', [], [
|
||||
'car_id' => $vehicle['id'],
|
||||
'status' => 1
|
||||
]);
|
||||
@ -318,6 +322,9 @@ class IndexController extends BaseApiController
|
||||
$data[$k]['type'] = 0;
|
||||
$data[$k]['status'] = 0;
|
||||
$data[$k]['company_id'] = $model['company_b_id'];
|
||||
$data[$k]['rent_time'] = 0;
|
||||
$data[$k]['rent_company_id'] = 0;
|
||||
$data[$k]['contract_id'] = 0;
|
||||
$data[$k]['create_time'] = strtotime($model['create_time']);
|
||||
}
|
||||
$vehicleRent = new VehicleRent();
|
||||
|
@ -144,11 +144,11 @@ class VehicleController extends BaseApiController
|
||||
];
|
||||
$notify_url = '';
|
||||
if($contract['type'] == 0){
|
||||
$notify_url = 'https://worker-task.lihaink.cn/api/index/systemCarRent';
|
||||
$notify_url = env('project.website_domain').'/api/index/systemCarRent';
|
||||
}elseif($contract['type'] == 1){
|
||||
$notify_url = 'https://worker-task.lihaink.cn/api/index/selfCarRent';
|
||||
$notify_url = env('project.website_domain').'/api/index/selfCarRent';
|
||||
}elseif($contract['type'] == 2){
|
||||
$notify_url = 'https://worker-task.lihaink.cn/api/index/cancelRent';
|
||||
$notify_url = env('project.website_domain').'/api/index/cancelRent';
|
||||
}
|
||||
$signRes = app(JunziqianController::class)->VehicleRentSigning($signData, $params['id'],$notify_url);
|
||||
if ($signRes->success) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user