被冲掉代码

This commit is contained in:
chenbo 2023-10-18 10:26:34 +08:00
parent a028545068
commit 52b4ea0d4d

View File

@ -430,4 +430,17 @@ class CompanyLogic extends BaseLogic
{
return Company::field(['id', 'company_name', 'province', 'city', 'area', 'street', 'village', 'brigade'])->select()->toArray();
}
public static function getPartyA($companyId)
{
$company = Company::where(['id' => $companyId])->find();
$contract = Contract::where(['party_b'=>$company['id']])->find();
if ($contract) {
$partyA = Company::where(['id'=>$contract['party_a']])->find()->toArray();
return $partyA;
} else {
self::setError("该公司未与上级公司签约,无法充值押金");
return false;
}
}
}