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
374f9948
authored
May 10, 2022
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
临时供应商
parent
07b42e59
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
10 deletions
app/Http/Services/DataService.php
app/Http/Services/DataService.php
View file @
374f9948
...
...
@@ -442,9 +442,8 @@ class DataService
创建时间为空,不在上述供应商集内
*/
$time
=
strtotime
(
"2021-06-01"
);
$suppliers
=
SupplierChannelModel
::
where
(
'create_time'
,
'>'
,
$time
)
->
where
(
'is_type'
,
0
)
->
where
(
'create_time'
,
'!='
,
0
)
->
get
();
$suppliers
=
SupplierChannelModel
::
where
(
'create_time'
,
'>'
,
$time
)
->
where
(
'is_type'
,
0
)
->
where
(
'create_time'
,
'!='
,
0
)
->
get
();
foreach
(
$suppliers
as
$supplier
)
{
$supplierId
=
$supplier
[
'supplier_id'
];
//判断是否有上传品质协议
...
...
@@ -463,15 +462,21 @@ class DataService
echo
"供应商编码 ${supplier['supplier_code']} 已经有等级${supplier['level']},但是不为等级E,跳过"
.
PHP_EOL
;
continue
;
}
echo
"供应商编码 ${supplier['supplier_code']}
打上临时供应商标签,等级标记为E
"
.
PHP_EOL
;
echo
"供应商编码 ${supplier['supplier_code']}
转换为临时供应商
"
.
PHP_EOL
;
if
(
$change
)
{
if
(
$tagService
->
saveTags
(
$supplierId
,
14
,
$newTags
,
$oldTags
))
{
SupplierChannelModel
::
where
(
'supplier_id'
,
$supplierId
)
->
update
([
'system_tags'
=>
$newTags
,
'level'
=>
'E'
]);
}
SupplierChannelModel
::
where
(
'supplier_id'
,
$supplierId
)
->
update
([
'supplier_type'
=>
2
]);
}
// echo "供应商编码 ${supplier['supplier_code']} 打上临时供应商标签,等级标记为E" . PHP_EOL;
// if ($change) {
// if ($tagService->saveTags($supplierId, 14, $newTags, $oldTags)) {
// SupplierChannelModel::where('supplier_id', $supplierId)->update([
// 'system_tags' => $newTags,
// 'level' => 'E'
// ]);
// }
// }
}
...
...
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