add:合同详情接口新增字段:已签约合同地址
This commit is contained in:
parent
96d2cd23be
commit
47d5802d89
@ -177,9 +177,29 @@ class ContractLogic extends BaseLogic
|
||||
return $data['status'] == 1 ? '已签约' : '未签约';
|
||||
})
|
||||
->find();
|
||||
$data['signed_contract_url'] = self::getSignedContract($data);
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取已签约盖章的合同
|
||||
*/
|
||||
public static function getSignedContract($contract)
|
||||
{
|
||||
$signedContractUrl = '';
|
||||
if($contract['status'] == 1){
|
||||
if ($contract['contract_url'] == '') {
|
||||
$res = app(JunziqianController::class)->download_file($contract['contract_no']);
|
||||
if ($res['code'] == 1) {
|
||||
$signedContractUrl = $res['data']['url'];
|
||||
}
|
||||
}else {
|
||||
$signedContractUrl = env('url.url_prefix').$contract['contract_url'];
|
||||
}
|
||||
}
|
||||
return $signedContractUrl;
|
||||
}
|
||||
|
||||
//生成合同
|
||||
public static function Initiate_contract($data)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user