This commit is contained in:
unknown 2023-09-01 14:24:55 +08:00
parent e717215da1
commit 02c40437c7
2 changed files with 8 additions and 2 deletions

View File

@ -45,7 +45,7 @@ class VehicleContractController extends BaseAdminController
//发送短信 //发送短信
$sms = [ $sms = [
'mobile' => $vehicle_contract['company_a_phone'], 'mobile' => $vehicle_contract['company_a_phone'],
'name' => $vehicle_contract['company_a_name'], 'name' => $vehicle_contract['company_user'],
'scene' => 'WQTZ' 'scene' => 'WQTZ'
]; ];
$this->rentNoticeSms($sms); $this->rentNoticeSms($sms);

View File

@ -463,6 +463,11 @@ class VehicleController extends BaseApiController
if($carInfo['rent_company_id'] != $this->userInfo['company_id']){ if($carInfo['rent_company_id'] != $this->userInfo['company_id']){
return $this->fail('当前公司与车辆信息不匹配'); return $this->fail('当前公司与车辆信息不匹配');
} }
//获取原签约信息
$contract = Contract::where('id',$carInfo['contract_id'])->where('status',3)->find();
if(empty($contract)){
return $this->fail('原签约信息错误');
}
//获取甲方公司信息 //获取甲方公司信息
$party_a = Company::where('id',$carInfo['company_id'])->find(); $party_a = Company::where('id',$carInfo['company_id'])->find();
if(empty($party_a)){ if(empty($party_a)){
@ -499,7 +504,8 @@ class VehicleController extends BaseApiController
'type' => 2, 'type' => 2,
'status' => -1, 'status' => -1,
'create_time' => time(), 'create_time' => time(),
'update_time' => time() 'update_time' => time(),
'old_file' => $contract['file'],
]; ];
//写入数据 //写入数据
$result = VehicleContract::create($data); $result = VehicleContract::create($data);