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
3f126e3e
authored
Jan 04, 2026
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
补充数据
parent
e1c83451
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
1 deletions
app/Http/Services/DataService.php
app/Http/routes.php
app/Http/Services/DataService.php
View file @
3f126e3e
...
...
@@ -1602,4 +1602,62 @@ class DataService
return
;
}
}
public
static
function
fix
(
$updateData
=
false
)
{
$supplierCodeList
=
[
'L0015311'
,
'L0014902'
,
'L0007892'
,
'L0015391'
,
'L0004594'
,
'L0014414'
,
'L0013216'
,
'L0014052'
,
'L0014991'
,
'L0015322'
,
'L0014105'
,
'L0014984'
,
'L0016275'
,
'L0017038'
,
'L0014268'
,
'L0015126'
,
'L0012353'
,
'L0013837'
,
'L0014588'
,
'L0014671'
,
'L0012496'
,
'L0015328'
,
'L0011949'
,
'L0013003'
,
'L0014165'
,
'L0013219'
,
'L0014807'
,
'L0007738'
,
'L0018362'
,
'L0017297'
,
'L0018108'
,
'L0006485'
,
'L0015690'
,
'L0014859'
];
foreach
(
$supplierCodeList
as
$key
=>
$value
)
{
$supplierId
=
SupplierChannelModel
::
where
(
'supplier_code'
,
$value
)
->
value
(
'supplier_id'
);
//去找出对应的跟单员
$contact
=
SupplierChannelModel
::
where
(
'supplier_id'
,
$supplierId
)
->
where
(
'channel_user_type'
,
4
)
->
first
();
if
(
empty
(
$contact
))
{
\dump
(
"供应商
{
$value
}
没有找到跟单员"
);
continue
;
}
$contact
[
'can_check_uids'
]
=
10326
;
$contact
[
'channel_user_type'
]
=
1
;
unset
(
$contact
[
'contact_id'
]);
if
(
$updateData
)
{
SupplierContactModel
::
insert
(
$contact
);
}
\dump
(
"供应商
{
$value
}
新增跟单员记录"
);
}
}
}
app/Http/routes.php
View file @
3f126e3e
...
...
@@ -97,7 +97,7 @@ Route::group(['middleware' => ['external'], 'namespace' => 'Sync'], function ()
});
Route
::
match
([
'get'
,
'post'
],
'/test'
,
function
()
{
DataService
::
replaceInventoryUser
(
false
,
10
);
DataService
::
fix
(
false
);
// DataService::fixSupplierContacts(false,10);
// DataService::initInventoryNotInXsl(true);
if
(
request
()
->
get
(
'delete'
))
{
...
...
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