更新
This commit is contained in:
parent
6b9912b2d8
commit
21b3362946
@ -25,6 +25,7 @@ use think\facade\Request;
|
||||
use think\facade\Db;
|
||||
use app\api\logic\SmsLogic;
|
||||
use app\api\controller\JunziqianController;
|
||||
use app\common\model\Company;
|
||||
|
||||
/**
|
||||
* 合同控制器
|
||||
@ -114,6 +115,27 @@ class ContractController extends BaseAdminController
|
||||
$file = $params['file'];
|
||||
$res = Contract::where('id', $params['id'])->update(['file' => $file,'check_status'=>2]);
|
||||
if ($res) {
|
||||
$find=Contract::where('id', $params['id'])->with('party_a_info')->field('type,party_b')
|
||||
->withAttr('user_b_info', function ($value, $data) {
|
||||
if($data['type']==1){
|
||||
return Company::where('id', $data['party_b'])->field('company_name name,master_phone phone')->find();
|
||||
}else{
|
||||
return Db::name('user')->where('id', $data['party_b'])->field('nickname name,mobile phone')->find();
|
||||
}
|
||||
})
|
||||
->find();
|
||||
$a = [
|
||||
'mobile' => $find['party_a_info']['phone'],
|
||||
'name' => $find['party_a_info']['company_name'],
|
||||
'scene' => 'WQTZ'
|
||||
];
|
||||
SmsLogic::contractUrl($a);
|
||||
$b = [
|
||||
'mobile' => $find['party_b_info']['phone'],
|
||||
'name' => $find['party_b_info']['name'],
|
||||
'scene' => 'WQTZ'
|
||||
];
|
||||
SmsLogic::contractUrl($b);
|
||||
return $this->success('上传成功', [], 1, 1);
|
||||
} else {
|
||||
if($res==0){
|
||||
|
@ -38,6 +38,7 @@ class NoticeEnum
|
||||
const FIND_LOGIN_PASSWORD_CAPTCHA = 104;
|
||||
const WQ = 105;
|
||||
const FCHT = 106;
|
||||
const WQTZ = 107;
|
||||
|
||||
|
||||
/**
|
||||
@ -93,6 +94,7 @@ class NoticeEnum
|
||||
self::FIND_LOGIN_PASSWORD_CAPTCHA => '找回登录密码验证码',
|
||||
self::WQ => '网签短信',
|
||||
self::FCHT => '废除合同',
|
||||
self::WQTZ => '网签通知',
|
||||
];
|
||||
|
||||
if ($flag) {
|
||||
@ -125,6 +127,8 @@ class NoticeEnum
|
||||
'WQ'=>self::WQ,
|
||||
|
||||
'FCHT'=>self::FCHT,
|
||||
|
||||
'WQTZ'=>self::WQTZ,
|
||||
];
|
||||
return $scene[$tag] ?? '';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user