Merge pull request 'update' (#94) from zhangwei into master

Reviewed-on: http://git.excellentkk.cn/mkm/TaskSystem/pulls/94
This commit is contained in:
wei1990 2023-09-01 14:25:27 +08:00
commit 9686ba8c60
2 changed files with 8 additions and 2 deletions

View File

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

View File

@ -463,6 +463,11 @@ class VehicleController extends BaseApiController
if($carInfo['rent_company_id'] != $this->userInfo['company_id']){
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();
if(empty($party_a)){
@ -499,7 +504,8 @@ class VehicleController extends BaseApiController
'type' => 2,
'status' => -1,
'create_time' => time(),
'update_time' => time()
'update_time' => time(),
'old_file' => $contract['file'],
];
//写入数据
$result = VehicleContract::create($data);