Merge pull request 'update' (#3) from zhangwei into master
Reviewed-on: #3
This commit is contained in:
commit
73c8a70069
@ -157,7 +157,7 @@ class IndexController extends BaseApiController
|
|||||||
]);
|
]);
|
||||||
$party_b = Company::where('id', $contract['company_b_id'])->find();
|
$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'],
|
'car_id' => $vehicle['id'],
|
||||||
'use_user_id' => $party_b['user_id'],
|
'use_user_id' => $party_b['user_id'],
|
||||||
'use_user_name' => $party_b['master_name'],
|
'use_user_name' => $party_b['master_name'],
|
||||||
@ -166,7 +166,9 @@ class IndexController extends BaseApiController
|
|||||||
CompanyProperty::create([
|
CompanyProperty::create([
|
||||||
'company_id' => $contract['company_b_id'],
|
'company_id' => $contract['company_b_id'],
|
||||||
'object_id' => $vehicle['id'],
|
'object_id' => $vehicle['id'],
|
||||||
'type' => 1
|
'type' => 1,
|
||||||
|
'create_time' => time(),
|
||||||
|
'update_time' => time(),
|
||||||
]);
|
]);
|
||||||
return json(['success' => true, 'msg' => '成功']);
|
return json(['success' => true, 'msg' => '成功']);
|
||||||
} else {
|
} else {
|
||||||
@ -203,7 +205,7 @@ class IndexController extends BaseApiController
|
|||||||
} else if ($contract['signing_timer'] == 1) {
|
} else if ($contract['signing_timer'] == 1) {
|
||||||
//添加车辆到物流系统
|
//添加车辆到物流系统
|
||||||
$vehicle = json_decode($contract['cars_info'], true);
|
$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'],
|
'license' => $vehicle['license'],
|
||||||
'company_id' => $contract['company_a_id'],
|
'company_id' => $contract['company_a_id'],
|
||||||
'company_name' => $contract['company_a_name'],
|
'company_name' => $contract['company_a_name'],
|
||||||
@ -229,7 +231,7 @@ class IndexController extends BaseApiController
|
|||||||
$car_id = $curl_res['data']['car_id'];
|
$car_id = $curl_res['data']['car_id'];
|
||||||
$party_b = Company::where('id', $contract['company_b_id'])->find();
|
$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,
|
'car_id' => $car_id,
|
||||||
'use_user_id' => $party_b['user_id'],
|
'use_user_id' => $party_b['user_id'],
|
||||||
'use_user_name' => $party_b['master_name'],
|
'use_user_name' => $party_b['master_name'],
|
||||||
@ -238,7 +240,9 @@ class IndexController extends BaseApiController
|
|||||||
CompanyProperty::create([
|
CompanyProperty::create([
|
||||||
'company_id' => $contract['company_b_id'],
|
'company_id' => $contract['company_b_id'],
|
||||||
'object_id' => $car_id,
|
'object_id' => $car_id,
|
||||||
'type' => 1
|
'type' => 1,
|
||||||
|
'create_time' => time(),
|
||||||
|
'update_time' => time(),
|
||||||
]);
|
]);
|
||||||
return json(['success' => true, 'msg' => '成功']);
|
return json(['success' => true, 'msg' => '成功']);
|
||||||
} else {
|
} else {
|
||||||
@ -284,7 +288,7 @@ class IndexController extends BaseApiController
|
|||||||
'status' => 3,
|
'status' => 3,
|
||||||
]);
|
]);
|
||||||
//通知物流系统跟新
|
//通知物流系统跟新
|
||||||
curl_post(env('project.logistic_domain') . '/api/cancelRent', [], [
|
curl_post(env('project.logistic_domain').'/api/cancelRent', [], [
|
||||||
'car_id' => $vehicle['id'],
|
'car_id' => $vehicle['id'],
|
||||||
'status' => 1
|
'status' => 1
|
||||||
]);
|
]);
|
||||||
@ -318,6 +322,9 @@ class IndexController extends BaseApiController
|
|||||||
$data[$k]['type'] = 0;
|
$data[$k]['type'] = 0;
|
||||||
$data[$k]['status'] = 0;
|
$data[$k]['status'] = 0;
|
||||||
$data[$k]['company_id'] = $model['company_b_id'];
|
$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']);
|
$data[$k]['create_time'] = strtotime($model['create_time']);
|
||||||
}
|
}
|
||||||
$vehicleRent = new VehicleRent();
|
$vehicleRent = new VehicleRent();
|
||||||
|
@ -144,11 +144,11 @@ class VehicleController extends BaseApiController
|
|||||||
];
|
];
|
||||||
$notify_url = '';
|
$notify_url = '';
|
||||||
if($contract['type'] == 0){
|
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){
|
}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){
|
}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);
|
$signRes = app(JunziqianController::class)->VehicleRentSigning($signData, $params['id'],$notify_url);
|
||||||
if ($signRes->success) {
|
if ($signRes->success) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user