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
907b326a
authored
Mar 04, 2026
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修复
parent
92367b19
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
2 deletions
app/Http/Services/SupplierService.php
app/Http/Services/SupplierService.php
View file @
907b326a
...
@@ -1177,10 +1177,33 @@ class SupplierService
...
@@ -1177,10 +1177,33 @@ class SupplierService
->
first
();
->
first
();
if
(
$existingLiexin
)
{
if
(
$existingLiexin
)
{
// 有猎芯采购但没有数据跟单员,用已有的猎芯采购员分配数据跟单员
// 检查这个猎芯采购是否是四个人中的一个
$existingLiexinCodeId
=
$existingLiexin
->
can_check_uids
;
$isInDataFollowerGroup
=
false
;
foreach
(
$dataFollowerGroup
as
$followerName
)
{
$codeId
=
$adminUserService
->
getCodeIdByUserName
(
$followerName
);
if
(
$codeId
&&
$codeId
==
$existingLiexinCodeId
)
{
$isInDataFollowerGroup
=
true
;
break
;
}
}
if
(
$isInDataFollowerGroup
)
{
// 猎芯采购是四个人中的一个,用已有的猎芯采购员分配数据跟单员
$assignCodeIds
[]
=
$existingLiexin
->
can_check_uids
;
$assignCodeIds
[]
=
$existingLiexin
->
can_check_uids
;
$result
[
'debug_info'
][
'assign_type'
]
=
'代理商/原厂-使用已有猎芯采购分配数据跟单员'
;
$result
[
'debug_info'
][
'assign_type'
]
=
'代理商/原厂-使用已有猎芯采购(四人组)分配数据跟单员'
;
$result
[
'debug_info'
][
'existing_liexin_code_id'
]
=
$existingLiexin
->
can_check_uids
;
}
else
{
// 猎芯采购不是四个人中的一个,随机选商品供应链部数据跟单采购组的其中1人
$randomFollower
=
$dataFollowerGroup
[
array_rand
(
$dataFollowerGroup
)];
$codeId
=
$adminUserService
->
getCodeIdByUserName
(
$randomFollower
);
if
(
$codeId
)
{
$assignCodeIds
[]
=
$codeId
;
}
$result
[
'debug_info'
][
'assign_type'
]
=
'代理商/原厂-猎芯采购非四人组,随机分配1人'
;
$result
[
'debug_info'
][
'random_follower'
]
=
$randomFollower
;
$result
[
'debug_info'
][
'existing_liexin_code_id'
]
=
$existingLiexin
->
can_check_uids
;
$result
[
'debug_info'
][
'existing_liexin_code_id'
]
=
$existingLiexin
->
can_check_uids
;
}
}
else
{
}
else
{
// 都没有,随机选商品供应链部数据跟单采购组的其中1人
// 都没有,随机选商品供应链部数据跟单采购组的其中1人
$randomFollower
=
$dataFollowerGroup
[
array_rand
(
$dataFollowerGroup
)];
$randomFollower
=
$dataFollowerGroup
[
array_rand
(
$dataFollowerGroup
)];
...
...
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