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
f31abdef
authored
Jan 04, 2026
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix
parent
6c4a0616
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
1 deletions
app/Http/Services/DataService.php
app/Http/Services/SkuService.php
app/Http/Services/DataService.php
View file @
f31abdef
...
...
@@ -1424,4 +1424,34 @@ class DataService
}
}
}
//找出没有yunxin_sku_id但是有采购跟单员的,然后把采购跟单员给去掉
public
function
fixSupplierContacts
()
{
// 查询没有yunxin_sku_id但有采购跟单员的供应商
$suppliers
=
SupplierChannelModel
::
whereNull
(
'yunxin_sku_id'
)
->
whereNotNull
(
'channel_uid'
)
->
get
();
foreach
(
$suppliers
as
$supplier
)
{
// 获取该供应商的所有采购跟单员
$contacts
=
SupplierContactModel
::
where
(
'supplier_id'
,
$supplier
->
supplier_id
)
->
where
(
'channel_user_type'
,
4
)
->
get
();
// 如果有采购跟单员,就删除它们
foreach
(
$contacts
as
$contact
)
{
//如果can_check_uids不在 10009
//判断创建时间是不是2025年1月3日的时间戳之前创建的
//如果是的话,那么就改成普通采购员
if
(
$contact
->
add_time
<
strtotime
(
'2025-01-03'
))
{
$contact
->
channel_user_type
=
1
;
$contact
->
save
();
}
else
{
// 如果是之后创建的,就删除
$contact
->
delete
();
}
}
}
}
}
app/Http/Services/SkuService.php
View file @
f31abdef
...
...
@@ -339,7 +339,7 @@ class SkuService extends BaseService
'sku_id'
=>
$skuId
,
'cp_time'
=>
$data
[
'cp_time'
],
];
ManualPutawaySkuLog
::
addManualPutawaySkuLog
(
$skuId
,
$supplierCodes
[
$key
],
1
);
ManualPutawaySkuLog
::
addManualPutawaySkuLog
(
$skuId
,
$supplierCodes
[
$key
],
1
);
}
}
else
{
foreach
(
$skuIds
as
$key
=>
$skuId
)
{
...
...
@@ -349,6 +349,8 @@ class SkuService extends BaseService
$queueData
[
'down_type'
]
=
2
;
$queueData
[
'data'
]
=
$skuIds
;
}
$queueData
[
'source'
]
=
'supplier'
;
$queueData
[
'user_id'
]
=
request
()
->
user
->
userId
;
QueueService
::
publishQueueSecond
(
$queueName
,
$queueData
);
}
catch
(
\Exception
$exception
)
{
return
$exception
;
...
...
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