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
8d0c13e8
authored
May 29, 2026
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
审批流重新生成问题
parent
0ba3f372
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
app/Http/Controllers/Sync/SupplierSyncController.php
app/Http/Services/SupplierAuditService.php
app/Http/Controllers/Sync/SupplierSyncController.php
View file @
8d0c13e8
...
@@ -170,7 +170,7 @@ class SupplierSyncController extends BaseSyncController
...
@@ -170,7 +170,7 @@ class SupplierSyncController extends BaseSyncController
'creator_name'
=>
'required'
,
'creator_name'
=>
'required'
,
'apply_uid'
=>
'required'
,
'apply_uid'
=>
'required'
,
];
];
Log
::
info
(
'[CRM同步]参数'
,
$data
);
$validator
=
Validator
::
make
(
$data
,
$rules
);
$validator
=
Validator
::
make
(
$data
,
$rules
);
if
(
$validator
->
fails
())
{
if
(
$validator
->
fails
())
{
$error
=
$validator
->
errors
()
->
first
();
$error
=
$validator
->
errors
()
->
first
();
...
@@ -193,6 +193,7 @@ class SupplierSyncController extends BaseSyncController
...
@@ -193,6 +193,7 @@ class SupplierSyncController extends BaseSyncController
&&
$existingSupplier
[
'status'
]
==
SupplierChannelModel
::
STATUS_CRM_REJECTED
&&
$existingSupplier
[
'status'
]
==
SupplierChannelModel
::
STATUS_CRM_REJECTED
)
{
)
{
try
{
try
{
DB
::
connection
(
'web'
)
->
transaction
(
function
()
use
(
$existingSupplier
,
$data
)
{
// 先更新状态为待确认
// 先更新状态为待确认
SupplierChannelModel
::
where
(
'supplier_id'
,
$existingSupplier
[
'supplier_id'
])
->
update
([
SupplierChannelModel
::
where
(
'supplier_id'
,
$existingSupplier
[
'supplier_id'
])
->
update
([
'status'
=>
SupplierChannelModel
::
STATUS_CONFIRM
,
'status'
=>
SupplierChannelModel
::
STATUS_CONFIRM
,
...
@@ -203,6 +204,7 @@ class SupplierSyncController extends BaseSyncController
...
@@ -203,6 +204,7 @@ class SupplierSyncController extends BaseSyncController
// 重新发起审核流(addApproveForCustomerConvert 内部已处理幂等:旧单据终态时会创建新单据)
// 重新发起审核流(addApproveForCustomerConvert 内部已处理幂等:旧单据终态时会创建新单据)
$auditService
=
new
SupplierAuditService
();
$auditService
=
new
SupplierAuditService
();
$auditService
->
addApproveForCustomerConvert
(
$existingSupplier
[
'supplier_id'
],
$data
[
'apply_uid'
],
'客户转化供应商审核'
);
$auditService
->
addApproveForCustomerConvert
(
$existingSupplier
[
'supplier_id'
],
$data
[
'apply_uid'
],
'客户转化供应商审核'
);
});
$this
->
syncResponse
(
0
,
'CRM重新同步,状态已恢复为待确认并更新信息,已重新发起审核'
,
[
'supplier_id'
=>
$existingSupplier
[
'supplier_id'
]]);
$this
->
syncResponse
(
0
,
'CRM重新同步,状态已恢复为待确认并更新信息,已重新发起审核'
,
[
'supplier_id'
=>
$existingSupplier
[
'supplier_id'
]]);
LogService
::
AddLog
(
$existingSupplier
[
'supplier_id'
],
LogModel
::
UPDATE_OPERATE
,
'CRM重新同步'
,
'CRM重新同步,状态已恢复为待确认并更新信息,已重新发起审核'
);
LogService
::
AddLog
(
$existingSupplier
[
'supplier_id'
],
LogModel
::
UPDATE_OPERATE
,
'CRM重新同步'
,
'CRM重新同步,状态已恢复为待确认并更新信息,已重新发起审核'
);
}
catch
(
\Exception
$e
)
{
}
catch
(
\Exception
$e
)
{
...
...
app/Http/Services/SupplierAuditService.php
View file @
8d0c13e8
...
@@ -583,9 +583,10 @@ class SupplierAuditService
...
@@ -583,9 +583,10 @@ class SupplierAuditService
// 先获取审核流节点数据
// 先获取审核流节点数据
$flowInfo
=
AuditCenterService
::
getAuditFlowInfo
(
$flowInfo
=
AuditCenterService
::
getAuditFlowInfo
(
AuditCenterService
::
TYPE_CUSTOMER_CONVERT_SUPPLIER_AUDIT
,
AuditCenterService
::
TYPE_CUSTOMER_CONVERT_SUPPLIER_AUDIT
,
array_get
(
request
()
->
user
,
'userId'
,
1000
)
,
$applyUid
,
1
1
);
);
// dd($flowInfo);
// 创建审批单据
// 创建审批单据
$billInfo
=
AuditCenterService
::
addAudit
([
$billInfo
=
AuditCenterService
::
addAudit
([
"flow_id"
=>
$flowInfo
[
'flow_info'
][
'id'
],
"flow_id"
=>
$flowInfo
[
'flow_info'
][
'id'
],
...
...
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