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
1859d837
authored
Aug 05, 2021
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
审核隐藏
parent
9b0355fd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
6 deletions
app/Http/Services/DataService.php
app/Http/Services/SupplierShareApplyService.php
app/Http/routes.php
app/Http/Services/DataService.php
View file @
1859d837
...
...
@@ -85,9 +85,9 @@ class DataService
$suppliers
=
$model
->
where
(
function
(
$q
)
{
$q
->
where
(
'channel_uid'
,
'!='
,
''
)
->
orWhere
(
'purchase_uid'
,
'!='
,
''
);
})
->
where
(
'is_type'
,
1
)
->
get
()
->
toArray
();
if
(
count
(
$suppliers
)
>
1709
)
{
dd
(
"数量有问题"
);
}
//
if (count($suppliers) > 1709) {
//
dd("数量有问题");
//
}
$redis
=
new
RedisModel
();
//非正式供应商中存在渠道员/采购员,将供应商改为正式供应商
foreach
(
$suppliers
as
$supplier
)
{
...
...
@@ -102,7 +102,7 @@ class DataService
$model
->
where
(
'supplier_id'
,
$supplier
[
'supplier_id'
])
->
update
([
'update_time'
=>
time
(),
'is_type'
=>
1
,
'is_type'
=>
0
,
'status'
=>
1
]);
}
...
...
app/Http/Services/SupplierShareApplyService.php
View file @
1859d837
...
...
@@ -59,7 +59,7 @@ class SupplierShareApplyService
}
}
}
$allDepartments
=
array_filter
(
$allDepartments
,
function
(
$department
)
{
$allDepartments
=
array_filter
(
$allDepartments
,
function
(
$department
)
{
return
!
empty
(
$department
);
});
return
$allDepartments
;
...
...
@@ -109,7 +109,8 @@ class SupplierShareApplyService
$q
->
where
(
'department_id'
,
$departmentId
)
->
where
(
'audit_uid'
,
0
);
})
->
orWhere
(
function
(
$q
)
use
(
$departmentId
)
{
//当要判断申请者申请的部门的时候,要复审人为空,因为复审这一步是被申请部门的人审核的
$q
->
where
(
'apply_department_id'
,
$departmentId
)
->
where
(
'review_uid'
,
0
)
->
where
(
'audit_uid'
,
'!='
,
0
);
$q
->
where
(
'apply_department_id'
,
$departmentId
)
->
where
(
'review_uid'
,
0
)
->
where
(
'audit_uid'
,
'!='
,
0
)
->
where
(
'status'
,
SupplierShareApplyModel
::
STATUS_NEED_REVIEW
);
})
->
orderBy
(
'id'
,
'desc'
);
$limit
=
request
()
->
get
(
'limit'
,
20
);
$list
=
$query
->
paginate
(
$limit
)
->
toArray
();
...
...
app/Http/routes.php
View file @
1859d837
...
...
@@ -44,6 +44,7 @@ Route::group(['middleware' => ['web'], 'namespace' => 'Api'], function () {
});
Route
::
match
([
'get'
,
'post'
],
'/test'
,
function
()
{
$service
=
new
\App\Http\Services\DataService
();
$service
->
changeSupplierIsTypeByCheckChannelUidOrPurchaseUid
();
// $service->initSystemTag();
// $service->transferFileData();
});
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