mirror of
https://github.com/kuaifan/dootask.git
synced 2026-02-25 02:40:28 +00:00
perf 优化发给抄送人信息
This commit is contained in:
parent
b860a749f3
commit
9203046d97
@ -994,29 +994,17 @@ class WorkflowController extends AbstractController
|
|||||||
{
|
{
|
||||||
// 获取流程节点
|
// 获取流程节点
|
||||||
$process_node = $process['node_infos'];
|
$process_node = $process['node_infos'];
|
||||||
// 如果流程开始就直接审核结束,则循环往上找所有推送人
|
$notifier = [];
|
||||||
if ($process['is_finished'] == true && $step == 0) {
|
foreach ($process_node as $key => $val) {
|
||||||
$notifier = [];
|
if ($val['type'] == 'notifier') {
|
||||||
foreach ($process_node as $key => $val) {
|
$notifier = array_merge($notifier, $val['node_user_list']);
|
||||||
if ($val['type'] == 'notifier') {
|
}
|
||||||
$notifier = array_merge($notifier, $val['node_user_list']);
|
// 判断到达的节点
|
||||||
}
|
if ($process['node_id'] == $val['node_id']) {
|
||||||
// 节点到最后时,跳出循环
|
break;
|
||||||
if ($key == count($process_node) - 1) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return array_unique($notifier, SORT_REGULAR) ?? [];
|
|
||||||
}
|
}
|
||||||
//判断下一步是否有抄送人
|
return array_unique($notifier, SORT_REGULAR) ?? [];
|
||||||
$step = $step + 1;
|
|
||||||
$next_node = $process_node[$step] ?? [];
|
|
||||||
if ($next_node) {
|
|
||||||
if ($next_node['type'] == 'notifier'){
|
|
||||||
return $next_node['node_user_list'] ?? [];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return [];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 根据ID查询流程实例的参与者(所有)
|
// 根据ID查询流程实例的参与者(所有)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user