This commit is contained in:
mkm 2023-07-20 16:41:51 +08:00
parent 8adef49360
commit 1cf424c9d7
2 changed files with 7 additions and 6 deletions

View File

@ -23,6 +23,7 @@ use think\exception\ValidateException;
use think\facade\Db;
use think\facade\Request;
use app\api\logic\SmsLogic;
use app\api\controller\JunziqianController;
/**
* 管理员控制器
@ -156,8 +157,8 @@ class AdminController extends BaseAdminController
$result = AdminLogic::detail($params);
if ($result && $result['contract'] && $result['contract']['file'] != '') {
$data = [
'name' => $result['company_name'] . '合同',
'signatories' => [['fullName' => $result['company_name'], 'identityType' => 1, 'identityCard' => $result['id_card'], 'mobile' => $result['account'], 'noNeedVerify' => 1, 'signLevel' => 1]],
'name' => $result['name'] . '的个人合同',
'signatories' => [['fullName' => $result['name'], 'identityType' => 1, 'identityCard' => $result['id_card'], 'mobile' => $result['account'], 'noNeedVerify' => 1, 'signLevel' => 1]],
'url' => $result['contract']['file']
];
$res = app(JunziqianController::class)->Signing($data);
@ -165,7 +166,7 @@ class AdminController extends BaseAdminController
Db::name('contract')->where('admin_id', $params['id'])->update(['contract_no' => $res->data]);
$data = array(
"applyNo" => $res->data, //TODO *
"fullName" => $result['company_name'], //TODO *
"fullName" => $result['name'], //TODO *
"identityCard" => $result['id_card'], //TODO *
"identityType" => 1, //TODO *
);
@ -177,7 +178,7 @@ class AdminController extends BaseAdminController
'mobile' => $result['phone'],
'name' => $result['name'],
'type' => '《' . $result['contract']['contract_type_name'] . '》',
'code' => 'api/Hetong/url?id=' . $$result['contract']['id'],
'code' => 'api/Hetong/url?id=' . $result['contract']['id'],
'scene' => 'WQ'
];
$result = SmsLogic::contractUrl($sms);

View File

@ -222,9 +222,9 @@ class AdminLogic extends BaseLogic
{
$admin = Admin::field([
'id', 'account', 'name', 'disable', 'root',
'multipoint_login', 'avatar', 'sex', 'province', 'city', 'area', 'street', 'address', 'qualification', 'is_contract', 'id_card'
'multipoint_login', 'avatar', 'sex', 'province', 'city', 'area', 'street', 'address', 'qualification', 'is_contract', 'id_card,phone'
])->findOrEmpty($params['id'])->toArray();
$admin['qualification'] = json_decode($admin['qualification'], true);
$admin['qualification'] = $admin['qualification']!=null?json_decode($admin['qualification'], true):[];
$admin['contract']=Db::name('contract')->where('admin_id',$params['id'])
->withAttr('contract_type_name',function($value,$data){
return Db::name('dict_data')->where('id',$data['contract_type'])->value('name');