add:1.生成合同,甲方公司不是平台公司时,需要满足与平台公司或上级公司签过合同才能签约。2.带上签约时的验证方式为人脸识别及其阈值。3.添加或编辑公司时,主联系人手机号不能重复使用
This commit is contained in:
parent
becb8c8386
commit
ce3c0ce52f
@ -143,6 +143,7 @@ class JunziqianController extends BaseApiController
|
|||||||
$request = new ApplySignReq();
|
$request = new ApplySignReq();
|
||||||
$request->contractName = $data['name'];
|
$request->contractName = $data['name'];
|
||||||
$request->signatories = $data['signatories']; //签约方
|
$request->signatories = $data['signatories']; //签约方
|
||||||
|
$request->faceThreshold = 79; // 人脸识别阀值:默认等级(1-100之间整数),建议范围(60-79)
|
||||||
$request->serverCa = 1; //是否需要服务端云证书
|
$request->serverCa = 1; //是否需要服务端云证书
|
||||||
$request->fileType = 1; //合同上传方式 url
|
$request->fileType = 1; //合同上传方式 url
|
||||||
$request->url = $data['url'];
|
$request->url = $data['url'];
|
||||||
|
@ -20,6 +20,7 @@ use app\common\logic\BaseLogic;
|
|||||||
use app\common\model\auth\Admin;
|
use app\common\model\auth\Admin;
|
||||||
use app\common\model\contract\Contract;
|
use app\common\model\contract\Contract;
|
||||||
use app\common\model\user\User;
|
use app\common\model\user\User;
|
||||||
|
use think\Exception;
|
||||||
use think\exception\ValidateException;
|
use think\exception\ValidateException;
|
||||||
use think\facade\Db;
|
use think\facade\Db;
|
||||||
use app\adminapi\validate\CompanyValidate;
|
use app\adminapi\validate\CompanyValidate;
|
||||||
@ -54,6 +55,13 @@ class CompanyLogic extends BaseLogic
|
|||||||
// if (!empty($exist)) {
|
// if (!empty($exist)) {
|
||||||
// throw new ValidateException('该账号已经注册过企业');
|
// throw new ValidateException('该账号已经注册过企业');
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
// 手机号不能重复
|
||||||
|
$companyInfo = Company::where(['master_phone'=>$params['master_phone']])->find();
|
||||||
|
if (!empty($companyInfo)) {
|
||||||
|
Db::rollback();
|
||||||
|
throw new Exception('手机号已存在');
|
||||||
|
}
|
||||||
$arr=[
|
$arr=[
|
||||||
'company_name' => $params['company_name'],
|
'company_name' => $params['company_name'],
|
||||||
'organization_code' => $params['organization_code'],
|
'organization_code' => $params['organization_code'],
|
||||||
@ -145,6 +153,12 @@ class CompanyLogic extends BaseLogic
|
|||||||
{
|
{
|
||||||
Db::startTrans();
|
Db::startTrans();
|
||||||
try {
|
try {
|
||||||
|
// 手机号不能重复
|
||||||
|
$companyInfo = Company::where(['master_phone'=>$params['master_phone']])->find();
|
||||||
|
if (!empty($companyInfo)) {
|
||||||
|
Db::rollback();
|
||||||
|
throw new Exception('手机号已存在');
|
||||||
|
}
|
||||||
$arr=[
|
$arr=[
|
||||||
'company_name' => $params['company_name'],
|
'company_name' => $params['company_name'],
|
||||||
'organization_code' => $params['organization_code'],
|
'organization_code' => $params['organization_code'],
|
||||||
|
@ -203,11 +203,14 @@ class ContractLogic extends BaseLogic
|
|||||||
//生成合同
|
//生成合同
|
||||||
public static function Initiate_contract($data)
|
public static function Initiate_contract($data)
|
||||||
{
|
{
|
||||||
// 校验当前甲方公司是否签过合同
|
// 平台公司可以直接签合同,其他类型的公司需要做过合同乙方才能签合同
|
||||||
// $partyAModel = Contract::where(['party_b' => $data['party_a']])->find();
|
$partyACompamyInfo = Company::where(['id'=>$data['party_a']])->find();
|
||||||
// if (empty($partyAModel)) {
|
if ($partyACompamyInfo['company_type'] != 30) {
|
||||||
// return self::setError('当前甲方暂无和平台或上级公司签约,请先进行签约');
|
$partyAModel = Contract::where(['party_b' => $data['party_a']])->find();
|
||||||
// }
|
if (empty($partyAModel)) {
|
||||||
|
return self::setError('当前甲方暂无和平台或上级公司签约,请先进行签约');
|
||||||
|
}
|
||||||
|
}
|
||||||
$model = Contract::where(['party_b' => $data['party_b'],'contract_type'=>$data['contract_type']])->find();
|
$model = Contract::where(['party_b' => $data['party_b'],'contract_type'=>$data['contract_type']])->find();
|
||||||
if (empty($model)) {
|
if (empty($model)) {
|
||||||
$model = new Contract();
|
$model = new Contract();
|
||||||
@ -258,10 +261,10 @@ class ContractLogic extends BaseLogic
|
|||||||
$data = [
|
$data = [
|
||||||
'name' => $name . '的合同',
|
'name' => $name . '的合同',
|
||||||
'signatories' => [
|
'signatories' => [
|
||||||
['fullName' => $name, 'identityType' => 12, 'identityCard' => $result['organization_code'], 'email' => $result['master_email'], 'noNeedVerify' => 1, 'signLevel' => 1],
|
['fullName' => $name, 'identityType' => 12, 'identityCard' => $result['organization_code'], 'email' => $result['master_email'], 'noNeedVerify' => 1, 'authLevel'=>[11],'signLevel' => 1],
|
||||||
['fullName' => $result['contract']['party_a_info']['company_name'], 'identityType' => 12, 'identityCard' => $result['contract']['party_a_info']['organization_code'], 'email' => $result['contract']['party_a_info']['master_email'], 'noNeedVerify' => 1, 'signLevel' => 1]
|
['fullName' => $result['contract']['party_a_info']['company_name'], 'identityType' => 12, 'identityCard' => $result['contract']['party_a_info']['organization_code'], 'email' => $result['contract']['party_a_info']['master_email'], 'noNeedVerify' => 1, 'authLevel'=>[11],'signLevel' => 1]
|
||||||
],
|
],
|
||||||
'url' => $result['contract']['file']
|
'url' => $result['contract']['file'],
|
||||||
];
|
];
|
||||||
}else{
|
}else{
|
||||||
$name=$result['nickname'];
|
$name=$result['nickname'];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user