This commit is contained in:
unknown 2023-08-24 17:10:24 +08:00
parent cc7e7943e0
commit 806323689d
2 changed files with 13 additions and 13 deletions

View File

@ -140,11 +140,11 @@ class CompanyController extends BaseAdminController
}
//判断是否是租赁合同
//如果是租赁合同则必须传递租赁数量参数
if($params['contract_type'] == 29) {
if(empty($params['num'])){
return $this->fail('缺少必要参数');
}
}
// if($params['contract_type'] == 29) {
// if(empty($params['num'])){
// return $this->fail('缺少必要参数');
// }
// }
$params['type'] = 1;
$params['party_b'] = $params['id'];
unset($params['id']);

View File

@ -214,14 +214,14 @@ class ContractLogic extends BaseLogic
$model->setAttrs($data);
$res = $model->save($data);
//如果是租赁合同,调用接口通知物流系统
if($data['contract_type'] == 29){
curl_post('http://logistics.lihaink.cn/api/setContract',[],[
'party_a' => $data['party_a'],
'party_b' => $data['party_b'],
'num' => $data['num'],
'rent_type' => 1
]);
}
// if($data['contract_type'] == 29){
// curl_post('http://logistics.lihaink.cn/api/setContract',[],[
// 'party_a' => $data['party_a'],
// 'party_b' => $data['party_b'],
// 'num' => $data['num'],
// 'rent_type' => 1
// ]);
// }
if($res){
return ['code'=>1,'msg'=>'发起成功,等待平台风控部上传合同','data'=>['id'=>$model->id]];
}else{