This commit is contained in:
chenbo 2023-09-06 14:27:11 +08:00
parent fec7a7f2c6
commit 51d4b4c9a2

View File

@ -204,10 +204,10 @@ class ContractLogic extends BaseLogic
public static function Initiate_contract($data)
{
// 校验当前甲方公司是否签过合同
$partyAModel = Contract::where(['party_b' => $data['party_a']])->find();
if (empty($partyAModel)) {
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();
if (empty($model)) {
$model = new Contract();
@ -258,8 +258,8 @@ class ContractLogic extends BaseLogic
$data = [
'name' => $name . '的合同',
'signatories' => [
['fullName' => $name, 'identityType' => 12, 'identityCard' => $result['organization_code'], 'email' => $result['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, '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, 'authLevel'=>[11],'signLevel' => 1]
],
'url' => $result['contract']['file']
];