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
7efbfafc
authored
Jul 01, 2022
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修改更新限制
parent
d6b743a9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletions
app/Http/Services/DataService.php
app/Http/Validators/SupplierValidator.php
app/Http/Services/DataService.php
View file @
7efbfafc
...
...
@@ -557,7 +557,7 @@ class DataService
public
function
checkCompanyName
()
{
$suppliers
=
SupplierChannelModel
::
where
(
'group_code'
,
''
)
->
where
(
'is_type'
,
0
)
->
where
(
'create_time'
,
'
<'
,
1655778780
)
->
where
(
'update_time'
,
'<
'
,
1655778780
)
->
get
();
->
where
(
'create_time'
,
'
>'
,
1655778780
)
->
where
(
'update_time'
,
'>
'
,
1655778780
)
->
get
();
foreach
(
$suppliers
as
$supplier
)
{
$company
=
(
new
CompanyService
())
->
getCompanyInfo
(
$supplier
[
'supplier_name'
],
''
,
1
);
if
(
$company
)
{
...
...
app/Http/Validators/SupplierValidator.php
View file @
7efbfafc
...
...
@@ -22,6 +22,20 @@ class SupplierValidator
//这个要优先判断
if
(
!
checkPerm
(
'IgnoreCompanyCheck'
))
{
$needCheckFlag
=
false
;
//新增的,都要去校验,然后修改的话,如果没有集团编码,并且是标准添加(非标准添加,即是特殊权限添加,不需要校验),也要去校验
if
(
empty
(
$validateData
[
'supplier_id'
]))
{
$needCheckFlag
=
true
;
}
if
(
!
empty
(
$validateData
[
'supplier_id'
]))
{
$supplier
=
SupplierChannelModel
::
where
(
'supplier_id'
,
$validateData
[
'supplier_id'
])
->
first
()
->
toArray
();
if
(
empty
(
$supplier
[
'group_code'
])
&&
$supplier
[
'is_standard_add'
]
==
1
)
{
$needCheckFlag
=
true
;
}
}
if
(
$needCheckFlag
)
{
$regionType
=
$validateData
[
'region'
]
==
2
?
1
:
2
;
//还要校验提交上来的公司是否有合法信息
$companyInfo
=
(
new
CompanyService
())
->
getCompanyInfo
(
$validateData
[
'supplier_name'
],
...
...
@@ -31,6 +45,7 @@ class SupplierValidator
return
'公司未进行工商注册,请修改后重新提交'
;
}
}
}
//这个supplierId是用来判断是新增还是修改的
$supplierId
=
array_get
(
$validateData
,
'supplier_id'
);
...
...
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