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
e7760d72
authored
Nov 02, 2023
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
邮件内容修改
parent
73082306
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
app/Http/Services/SyncSupplierService.php
app/Http/routes.php
app/Http/Services/SyncSupplierService.php
View file @
e7760d72
...
...
@@ -176,17 +176,16 @@ class SyncSupplierService
$groupCode
=
array_get
(
$syncResult
,
'group_code'
);
$sourceSn
=
array_get
(
$syncResult
,
'source_sn'
);
$companyCategory
=
array_get
(
$syncResult
,
'company_category'
,
''
);
$isEntity
=
$companyCategory
==
"实体名单供应商"
;
$supplier
=
SupplierChannelModel
::
where
(
'supplier_id'
,
$sourceSn
)
->
orWhere
(
'group_code'
,
$groupCode
)
->
first
();
$supplier
=
!
empty
(
$supplier
)
?
$supplier
->
toArray
()
:
[];
$supplierId
=
$supplier
[
'supplier_id'
];
$supplier
=
SupplierChannelModel
::
where
(
'supplier_id'
,
$supplierId
)
->
first
()
->
toArray
();
if
(
$companyCategory
!=
''
)
{
//实体名单和黑名单都要拉黑,如果不属于黑名单,那么就要将状态改成审核中
if
(
$companyCategory
!=
'普通
供应商'
)
{
if
(
$companyCategory
==
'黑名单
供应商'
)
{
$data
[
'status'
]
=
SupplierChannelModel
::
STATUS_BLOCK
;
$data
[
'block_reason'
]
=
'一体化系统黑名单供应商'
;
}
elseif
(
$isEntity
)
{
}
else
if
(
$companyCategory
==
'实体名单供应商'
)
{
$status
=
$supplier
[
'status'
];
//加入实体化之前,要先记录原来的状态
if
(
!
$redis
->
hget
(
'supplier_status_before_disable'
,
$supplierId
))
{
...
...
@@ -194,6 +193,7 @@ class SyncSupplierService
}
$data
[
'status'
]
=
SupplierChannelModel
::
STATUS_DISABLE
;
$data
[
'is_entity'
]
=
SupplierChannelModel
::
IS_ENTITY_TRUE
;
$data
[
'block_reason'
]
=
''
;
$data
[
'disable_reason'
]
=
'一体化系统实体名单供应商'
;
}
else
{
$preIsEntity
=
$supplier
[
'is_entity'
];
...
...
@@ -311,6 +311,8 @@ class SyncSupplierService
$data
[
'data'
][
'supplier_name'
]
=
$supplier
[
'supplier_name'
];
$data
[
'data'
][
'supplier_group_name'
]
=
array_get
(
config
(
'fixed.SupplierGroup'
),
$supplier
[
'supplier_group'
]);
$data
[
'data'
][
'operation'
]
=
$isEntity
?
'确认'
:
'移除'
;
$data
[
'data'
][
'content'
]
=
$isEntity
?
' 注意:实体名单的供应商已自动拉入禁止交易,无法使用!'
:
'注意:已移除实体名单的供应商,状态自动返回到前一个状态!'
;
$data
[
'data'
][
'ps_content'
]
=
$isEntity
?
'PS:如果该供应商为芯链商家,该供应商的芯链账号无法登录芯链系统!'
:
'PS:如果该供应商为芯链商家,该供应商的芯链账号可正常登录芯链系统!'
;
if
(
$isYunxinSupplier
)
{
$data
[
'data'
][
'supplier_name'
]
.=
' (芯链商家) '
;
}
...
...
app/Http/routes.php
View file @
e7760d72
...
...
@@ -82,5 +82,5 @@ Route::group(['middleware' => ['external'], 'namespace' => 'Sync'], function ()
});
Route
::
match
([
'get'
,
'post'
],
'/test'
,
function
()
{
(
new
\App\Http\Services\SyncSupplierService
())
->
receiveEntityResult
(
'沛县懒洋洋服装店'
,
-
1
);
(
new
\App\Http\Services\SyncSupplierService
())
->
receiveEntityResult
(
'沛县懒洋洋服装店'
,
1
);
});
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