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
2fe3ba8c
authored
Jul 12, 2022
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修改数据脚本
parent
82e7d84b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
app/Http/Services/DataService.php
app/Http/routes.php
app/Http/Services/DataService.php
View file @
2fe3ba8c
...
...
@@ -757,9 +757,6 @@ class DataService
->
where
(
'field_name'
,
'quality_assurance_agreement'
)
->
exists
();
if
(
!
$hasQualityAssuranceAgreement
&&
!
in_array
(
$supplier
[
'supplier_name'
],
config
(
'field.SkipChangeSupplierTypeNames'
)))
{
if
(
$supplier
[
'supplier_type'
]
==
SupplierChannelModel
::
SUPPLIER_TYPE_TEMPORARY
)
{
continue
;
}
dump
(
"没有品质保证协议,修改为临时供应商 : "
.
$supplier
[
'supplier_name'
]);
if
(
$isUpdate
)
{
SupplierChannelModel
::
where
(
'supplier_id'
,
$supplier
[
'supplier_id'
])
->
update
([
...
...
@@ -767,6 +764,12 @@ class DataService
'supplier_type'
=>
SupplierChannelModel
::
SUPPLIER_TYPE_TEMPORARY
]);
}
}
else
{
if
(
$isUpdate
)
{
SupplierChannelModel
::
where
(
'supplier_id'
,
$supplier
[
'supplier_id'
])
->
update
([
'level'
=>
''
,
]);
}
}
}
}
...
...
app/Http/routes.php
View file @
2fe3ba8c
...
...
@@ -61,5 +61,5 @@ Route::group(['middleware' => ['external'], 'namespace' => 'Sync'], function ()
});
Route
::
match
([
'get'
,
'post'
],
'/test'
,
function
()
{
(
new
\App\Http\Services\DataService
())
->
repairLevelESupplierData
();
(
new
\App\Http\Services\DataService
())
->
repairLevelESupplierData
(
false
);
});
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