diff --git a/app/api/controller/NotifyController.php b/app/api/controller/NotifyController.php index 58240b67..69348e89 100644 --- a/app/api/controller/NotifyController.php +++ b/app/api/controller/NotifyController.php @@ -33,12 +33,12 @@ //更新本地合同状态 $updateLocalRes = VehicleContract::where('id',$contract['id'])->update(['signing_timer'=>1]); //更新远程 - $updateSverRes =curl_post(env('project.logistic_domain').'/api/contractUpdate',[],[ + $updateSverRes =curl_post(env('project.logistic_domain').'/api/contractUpdate',[ 'id' => $contract['contract_logistic_id'], 'signing_timer' => 1, ]); if(!$updateLocalRes || $updateSverRes['code']==0){ - return json(['success' => false, 'msg' => '更新失败']); + return json(['success' => false, 'msg' => '更新失败11']); } return json(['success' => true, 'msg' => '成功']); }else if($contract['signing_timer'] == 1){ @@ -77,7 +77,7 @@ $vehicleRent = new VehicleRent(); $vehicleRent->saveAll($data); //更新远程 - $updateSverRes = curl_post(env('project.logistic_domain').'/api/contractUpdate',[],[ + $updateSverRes = curl_post(env('project.logistic_domain').'/api/contractUpdate',[ 'id' => $contract['contract_logistic_id'], 'signing_timer' => 2, 'status' => 3, @@ -85,7 +85,7 @@ 'contract_evidence'=>$contractEvidence ]); if(!$updateLocalRes || $updateSverRes['code']==0){ - return json(['success' => false, 'msg' => '更新失败']); + return json(['success' => false, 'msg' => '更新失败22']); }else{ return json(['success' => true, 'msg' => '更新成功']); } @@ -145,7 +145,7 @@ ]); $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[0]['id'], 'use_user_id' => $party_b['user_id'], 'use_user_name' => $party_b['master_name'], @@ -186,7 +186,7 @@ } 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[0]['license'], 'pic' => $vehicle[0]['pic'], 'company_id' => $contract['company_a_id'], @@ -226,7 +226,7 @@ $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'], @@ -281,7 +281,7 @@ //更改合同状态 VehicleContract::where('id', $id)->update(['signing_timer'=>2,'status'=>3,'contract_url'=>$signContractFile,'contract_evidence'=>$contractEvidence]); if(!empty($contract['contract_logistic_id'])){ - curl_post(env('project.logistic_domain').'/api/contractUpdate',[],[ + curl_post(env('project.logistic_domain').'/api/contractUpdate',[ 'id' => $contract['contract_logistic_id'], 'signing_timer' => 2, 'status' => 3, @@ -307,11 +307,11 @@ //删除原合同 VehicleContract::where('id',$rentCarsInfo['rent_contract_id'])->delete(); //修改物流系统车辆租赁信息 - curl_post(env('project.logistic_domain').'/api/Vehicle/delRentUseInfo', [], [ + curl_post(env('project.logistic_domain').'/api/Vehicle/delRentUseInfo', [ 'car_id' => $cars_ids[0] ]); //发送购买合同给物流系统 - $curl_result = curl_post(env('project.logistic_domain').'/api/signContract',[],[ + $curl_result = curl_post(env('project.logistic_domain').'/api/signContract',[ 'num' => $vehicleBuyRecord['num'], 'company_id' => $vehicleBuyRecord['company_id'], 'company_name' => $vehicleBuyRecord['company_name'], @@ -348,7 +348,7 @@ //删除原合同 VehicleContract::where('id',$rentCarsInfo['rent_contract_id'])->delete(); //修改物流系统车辆租赁信息 - curl_post(env('project.logistic_domain').'/api/Vehicle/delRentUseInfo', [], [ + curl_post(env('project.logistic_domain').'/api/Vehicle/delRentUseInfo', [ 'car_id' => $cars_ids[0] ]); //获取镇街公司信息 @@ -357,7 +357,7 @@ $car_ids = array_column(json_decode($vehicleBuyRecord['cars_info'],true),'id'); $zjRentCars = VehicleRent::field('car_id as id,car_license as license')->where('company_id',$zjCompany['id'])->where('car_id','in',$car_ids)->where('status',0)->where('type',0)->select(); //发送镇公司与平台公司的解约合同 - $curl_result = curl_post(env('project.logistic_domain').'/api/signContract',[],[ + $curl_result = curl_post(env('project.logistic_domain').'/api/signContract',[ 'num' => count($zjRentCars), 'company_id' => $zjCompany['id'], 'company_name' => $zjCompany['company_name'], @@ -384,11 +384,11 @@ //删除本地租赁信息 VehicleRent::where('car_id','in',$cars_ids)->delete(); //删除物流系统租赁信息 - curl_post(env('project.logistic_domain').'/api/cancelRent', [], [ + curl_post(env('project.logistic_domain').'/api/cancelRent', [ 'car_ids' => implode(',',$cars_ids) ]); //发送购买合同给物流系统 - $curl_result = curl_post(env('project.logistic_domain').'/api/signContract',[],[ + $curl_result = curl_post(env('project.logistic_domain').'/api/signContract',[ 'num' => $vehicleBuyRecord['num'], 'company_id' => $vehicleBuyRecord['company_id'], 'company_name' => $vehicleBuyRecord['company_name'], @@ -419,7 +419,7 @@ VehicleContract::where('id', $vehicleRentInfo['rent_contract_id'])->delete(); VehicleRent::where('car_id', $vehicle[0]['id'])->delete(); //通知物流系统跟新 - curl_post(env('project.logistic_domain').'/api/Vehicle/delRentUseInfo', [], [ + curl_post(env('project.logistic_domain').'/api/Vehicle/delRentUseInfo', [ 'car_id' => $vehicle[0]['id'] ]); return json(['success' => true, 'msg' => '成功']); @@ -494,7 +494,7 @@ //获取签约公司信息 $compay = Company::where('id',$contract['company_b_id'])->findOrEmpty(); //更新远程 - $updateSverRes = curl_post(env('project.logistic_domain').'/api/contractUpdate',[],[ + $updateSverRes = curl_post(env('project.logistic_domain').'/api/contractUpdate',[ 'id' => $contract['contract_logistic_id'], 'signing_timer' => 2, 'status' => 3,