Commit 873ae021 by 杨树贤

海外上传是上传商业登记证的

parent 1148890e
......@@ -160,6 +160,14 @@ class SupplierApiController extends Controller
}
}
}
//如果是非大陆的供应商,那么商业登记证的优先级大于营业执照
if ($channel['region'] != SupplierChannelModel::REGION_CN) {
foreach ($channel['field_name'] as $key => $item) {
if ($item == 'registration_certificate' && !empty($channel['file_url'][$key])) {
$businessLicense = $channel['file_url'][$key];
}
}
}
}
//校验一体化实体名单
$checkCompanyEntity = (new CompanyService())->checkCompanyEntity($channel['supplier_name'], $channel['supplier_name_en'], $channel['supplier_address'], $businessLicense);
......
......@@ -119,9 +119,17 @@ class CompanyService
'supplier_address',
'create_uid',
'create_name',
'region'
])->first()->toArray();
$supplierAddressList = SupplierAddressModel::where('supplier_id', $supplierId)->get()->toArray();
$businessLicense = SupplierAttachmentsModel::where('supplier_id', $supplierId)->where('field_name', 'business_license')->value('file_url');
if ($supplier['region'] != SupplierChannelModel::REGION_CN) {
$registrationCertificate = SupplierAttachmentsModel::where('supplier_id', $supplierId)
->where('field_name', 'registration_certificate')->value('file_url');
if ($registrationCertificate) {
$businessLicense = $registrationCertificate;
}
}
$addressData = [];
$addressData[] = [
'source_id' => $supplierId,
......
......@@ -883,6 +883,14 @@ class SupplierService
//修改名称,只有驳回状态下才可以修改,修改后要重新提交数据给一体化那边进行审核
$businessLicense = SupplierAttachmentsModel::where('supplier_id', $supplierId)
->where('field_name', 'business_license')->value('file_url');
//如果是非大陆的供应商,那么商业登记证的优先级大于营业执照
if ($supplier['region'] != SupplierChannelModel::REGION_CN) {
$registrationCertificate = SupplierAttachmentsModel::where('supplier_id', $supplierId)
->where('field_name', 'registration_certificate')->value('file_url');
if ($registrationCertificate) {
$businessLicense = $registrationCertificate;
}
}
$checkCompanyEntity = (new CompanyService())->checkCompanyEntity($supplierName, $supplier['supplier_name_en'], $supplier['supplier_address'], $businessLicense);
//还要去检测是否是一体化黑名单
//新增的时候要先去检验下一体化的数据,如果是实体黑名单用户,那么就不允许新增
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment