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
32ed29b3
authored
May 27, 2026
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修改格式
parent
8b0669db
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
15 deletions
app/Http/Services/CrmService.php
app/Http/Services/SupplierAuditService.php
app/Http/Services/CrmService.php
View file @
32ed29b3
...
@@ -45,32 +45,34 @@ class CrmService
...
@@ -45,32 +45,34 @@ class CrmService
}
}
/**
/**
* 回传CRM供应商转化确认结果(队列推送)
* 回传CRM供应商审核结果(队列推送)
* @param int $supplierId 供应商ID
* @param string $supplierName 供应商名称
* @param string $supplierName 供应商名称
* @param string $approverName 审批人姓名
* @param string $approverName 审批人姓名
* @param
string $approveResult 审批结果:completed(通过)/purchase_rejected(采购驳回)
* @param
int $auditStatus 审核状态:1通过 -1拒绝驳回
* @param string $remark
附加说明
* @param string $remark
审核备注
* @return bool
* @return bool
*/
*/
public
static
function
confirmCrmSupplier
(
$supplier
Name
,
$approverName
,
$approveResult
,
$remark
=
''
)
public
static
function
confirmCrmSupplier
(
$supplier
Id
,
$supplierName
,
$approverName
,
$auditStatus
,
$remark
=
''
)
{
{
try
{
try
{
$data
=
[
$data
=
[
'supplier_id'
=>
(
string
)
$supplierId
,
'audit_status'
=>
(
string
)
$auditStatus
,
'remark'
=>
$remark
,
'customer_name'
=>
$supplierName
,
'customer_name'
=>
$supplierName
,
'approver'
=>
$approverName
,
'approver'
=>
$approverName
,
'approve_result'
=>
$approveResult
,
'remark'
=>
$remark
,
];
];
(
new
QueueDeliveryService
())
->
setQueueName
(
'lie_queue_crm'
)
->
push
(
(
new
QueueDeliveryService
())
->
setQueueName
(
'lie_queue_crm'
)
->
push
(
QueueDeliveryService
::
PUSH_TYPE_
QUEUE
,
QueueDeliveryService
::
PUSH_TYPE_
SYNC_HTTP
,
'/sync/s
ynSupp
AuditResultToCrm'
,
'/sync/s
upplier/updateSupplier
AuditResultToCrm'
,
$data
,
$data
,
(
string
)
$supplier
Name
(
string
)
$supplier
Id
);
);
\Illuminate\Support\Facades\Log
::
info
(
'[CRM回传]回传审
批结果已推送到队列'
,
[
'supplier_name'
=>
$supplierName
,
'approve_result'
=>
$approveResult
]);
\Illuminate\Support\Facades\Log
::
info
(
'[CRM回传]回传审
核结果已推送到队列'
,
[
'supplier_id'
=>
$supplierId
,
'audit_status'
=>
$auditStatus
]);
return
true
;
return
true
;
}
catch
(
\Exception
$e
)
{
}
catch
(
\Exception
$e
)
{
\Illuminate\Support\Facades\Log
::
error
(
'[CRM回传]回传审
批结果推送队列异常: '
.
$e
->
getMessage
(),
[
'supplier_name'
=>
$supplierName
]);
\Illuminate\Support\Facades\Log
::
error
(
'[CRM回传]回传审
核结果推送队列异常: '
.
$e
->
getMessage
(),
[
'supplier_id'
=>
$supplierId
]);
return
false
;
return
false
;
}
}
}
}
...
@@ -92,8 +94,8 @@ class CrmService
...
@@ -92,8 +94,8 @@ class CrmService
'remark'
=>
$remark
,
'remark'
=>
$remark
,
];
];
(
new
QueueDeliveryService
())
->
setQueueName
(
'lie_queue_crm'
)
->
push
(
(
new
QueueDeliveryService
())
->
setQueueName
(
'lie_queue_crm'
)
->
push
(
QueueDeliveryService
::
PUSH_TYPE_
QUEUE
,
QueueDeliveryService
::
PUSH_TYPE_
SYNC_HTTP
,
'/sync/s
ynSupp
AuditResultToCrm'
,
'/sync/s
upplier/updateSupplier
AuditResultToCrm'
,
$data
,
$data
,
(
string
)
$supplierName
(
string
)
$supplierName
);
);
...
...
app/Http/Services/SupplierAuditService.php
View file @
32ed29b3
...
@@ -666,7 +666,7 @@ class SupplierAuditService
...
@@ -666,7 +666,7 @@ class SupplierAuditService
]);
]);
// 回传CRM系统:转化供应商状态更新为完成
// 回传CRM系统:转化供应商状态更新为完成
$supplierName
=
SupplierChannelModel
::
where
(
'supplier_id'
,
$supplierId
)
->
value
(
'supplier_name'
);
$supplierName
=
SupplierChannelModel
::
where
(
'supplier_id'
,
$supplierId
)
->
value
(
'supplier_name'
);
CrmService
::
confirmCrmSupplier
(
$supplier
Name
,
$approverName
,
'completed'
,
$remark
);
CrmService
::
confirmCrmSupplier
(
$supplier
Id
,
$supplierName
,
$approverName
,
1
,
$remark
);
// 记录审批日志
// 记录审批日志
$logContent
=
"确认客户转化供应商:审核通过"
;
$logContent
=
"确认客户转化供应商:审核通过"
;
...
@@ -694,7 +694,7 @@ class SupplierAuditService
...
@@ -694,7 +694,7 @@ class SupplierAuditService
// 回传CRM系统:转化供应商状态更新为采购驳回
// 回传CRM系统:转化供应商状态更新为采购驳回
$supplierName
=
SupplierChannelModel
::
where
(
'supplier_id'
,
$supplierId
)
->
value
(
'supplier_name'
);
$supplierName
=
SupplierChannelModel
::
where
(
'supplier_id'
,
$supplierId
)
->
value
(
'supplier_name'
);
CrmService
::
confirmCrmSupplier
(
$supplier
Name
,
$approverName
,
'purchase_rejected'
,
$remark
);
CrmService
::
confirmCrmSupplier
(
$supplier
Id
,
$supplierName
,
$approverName
,
-
1
,
$remark
);
// 记录审批日志
// 记录审批日志
$logContent
=
"确认客户转化供应商:审核未通过"
;
$logContent
=
"确认客户转化供应商:审核未通过"
;
...
...
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