Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
liexin_supplier
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
873ae021
authored
Jul 04, 2024
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
海外上传是上传商业登记证的
parent
1148890e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
0 deletions
app/Http/Controllers/Api/SupplierApiController.php
app/Http/Services/CompanyService.php
app/Http/Services/SupplierService.php
app/Http/Controllers/Api/SupplierApiController.php
View file @
873ae021
...
@@ -160,6 +160,14 @@ class SupplierApiController extends Controller
...
@@ -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
);
$checkCompanyEntity
=
(
new
CompanyService
())
->
checkCompanyEntity
(
$channel
[
'supplier_name'
],
$channel
[
'supplier_name_en'
],
$channel
[
'supplier_address'
],
$businessLicense
);
...
...
app/Http/Services/CompanyService.php
View file @
873ae021
...
@@ -119,9 +119,17 @@ class CompanyService
...
@@ -119,9 +119,17 @@ class CompanyService
'supplier_address'
,
'supplier_address'
,
'create_uid'
,
'create_uid'
,
'create_name'
,
'create_name'
,
'region'
])
->
first
()
->
toArray
();
])
->
first
()
->
toArray
();
$supplierAddressList
=
SupplierAddressModel
::
where
(
'supplier_id'
,
$supplierId
)
->
get
()
->
toArray
();
$supplierAddressList
=
SupplierAddressModel
::
where
(
'supplier_id'
,
$supplierId
)
->
get
()
->
toArray
();
$businessLicense
=
SupplierAttachmentsModel
::
where
(
'supplier_id'
,
$supplierId
)
->
where
(
'field_name'
,
'business_license'
)
->
value
(
'file_url'
);
$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
=
[];
$addressData
[]
=
[
$addressData
[]
=
[
'source_id'
=>
$supplierId
,
'source_id'
=>
$supplierId
,
...
...
app/Http/Services/SupplierService.php
View file @
873ae021
...
@@ -883,6 +883,14 @@ class SupplierService
...
@@ -883,6 +883,14 @@ class SupplierService
//修改名称,只有驳回状态下才可以修改,修改后要重新提交数据给一体化那边进行审核
//修改名称,只有驳回状态下才可以修改,修改后要重新提交数据给一体化那边进行审核
$businessLicense
=
SupplierAttachmentsModel
::
where
(
'supplier_id'
,
$supplierId
)
$businessLicense
=
SupplierAttachmentsModel
::
where
(
'supplier_id'
,
$supplierId
)
->
where
(
'field_name'
,
'business_license'
)
->
value
(
'file_url'
);
->
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
);
$checkCompanyEntity
=
(
new
CompanyService
())
->
checkCompanyEntity
(
$supplierName
,
$supplier
[
'supplier_name_en'
],
$supplier
[
'supplier_address'
],
$businessLicense
);
//还要去检测是否是一体化黑名单
//还要去检测是否是一体化黑名单
//新增的时候要先去检验下一体化的数据,如果是实体黑名单用户,那么就不允许新增
//新增的时候要先去检验下一体化的数据,如果是实体黑名单用户,那么就不允许新增
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment