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
d5b8cbec
authored
Sep 16, 2025
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
同步逻辑
parent
f8d5505d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
10 deletions
app/Http/Services/SupplierAuditService.php
app/Http/Services/SyncSupplierService.php
app/Http/Services/SupplierAuditService.php
View file @
d5b8cbec
...
...
@@ -112,6 +112,12 @@ class SupplierAuditService
}
}
}
if
(
!
empty
(
$supplier
[
'group_code'
]))
{
//同步到一体化
(
new
SyncSupplierService
())
->
syncSupplierToErp
(
$supplierId
);
}
return
$result
;
}
...
...
app/Http/Services/SyncSupplierService.php
View file @
d5b8cbec
...
...
@@ -33,7 +33,7 @@ class SyncSupplierService
return
false
;
}
if
(
!
$supplier
[
'group_code'
])
{
if
(
!
$supplier
[
'group_code'
]
&&
$supplier
[
'status'
]
!=
SupplierChannelModel
::
STATUS_PASSED
)
{
return
true
;
}
...
...
@@ -124,7 +124,7 @@ class SyncSupplierService
'recid'
=>
$receipt
[
'receipt_id'
],
'intermediaryBank'
=>
$receipt
[
'intermediary_bank'
],
'remark'
=>
$receipt
[
'remark'
],
'country_isocode'
=>
!
empty
(
$receipt
[
'nation'
][
'international_code'
])
?
$receipt
[
'nation'
][
'international_code'
]
:
""
,
'country_isocode'
=>
!
empty
(
$receipt
[
'nation'
][
'international_code'
])
?
$receipt
[
'nation'
][
'international_code'
]
:
""
,
];
}
}
...
...
@@ -365,14 +365,14 @@ class SyncSupplierService
}
//修改供应商的状态
SupplierChannelModel
::
where
(
'supplier_id'
,
$supplierId
)
->
update
([
'is_entity'
=>
$isEntityResult
,
'update_time'
=>
time
(),
//这里的逻辑是,因为取消实体名单以后,如果之前的状态是黑名单的话,直接变成待提审
'status'
=>
$isEntity
?
SupplierChannelModel
::
STATUS_DISABLE
:
(
$preStatus
==
SupplierChannelModel
::
STATUS_BLOCK
?
SupplierChannelModel
::
STATUS_IN_REVIEW
:
$preStatus
),
'disable_reason'
=>
$reason
,
'united_tags'
=>
!
empty
(
$tagList
)
?
implode
(
','
,
$tagList
)
:
''
,
]);
->
update
([
'is_entity'
=>
$isEntityResult
,
'update_time'
=>
time
(),
//这里的逻辑是,因为取消实体名单以后,如果之前的状态是黑名单的话,直接变成待提审
'status'
=>
$isEntity
?
SupplierChannelModel
::
STATUS_DISABLE
:
(
$preStatus
==
SupplierChannelModel
::
STATUS_BLOCK
?
SupplierChannelModel
::
STATUS_IN_REVIEW
:
$preStatus
),
'disable_reason'
=>
$reason
,
'united_tags'
=>
!
empty
(
$tagList
)
?
implode
(
','
,
$tagList
)
:
''
,
]);
$isYunxinSupplier
=
false
;
//还要去修改对应的供应商账号,也是要记录禁用前的状态
$supplierAccount
=
SupplierAccountModel
::
where
(
'supplier_id'
,
$supplierId
)
->
first
();
...
...
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