From 350d4f04546bfaf867231d13aeb7c65097090f11 Mon Sep 17 00:00:00 2001 From: weiz <736250432@qq.com> Date: Thu, 1 Feb 2024 09:57:28 +0800 Subject: [PATCH] update --- app/adminapi/logic/oa/FlowLogic.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/app/adminapi/logic/oa/FlowLogic.php b/app/adminapi/logic/oa/FlowLogic.php index 86ac184c8..5fe26e160 100644 --- a/app/adminapi/logic/oa/FlowLogic.php +++ b/app/adminapi/logic/oa/FlowLogic.php @@ -15,6 +15,7 @@ namespace app\adminapi\logic\oa; +use app\common\model\auth\Admin; use app\common\model\dept\Dept; use app\common\model\dept\Orgs; use app\common\model\oa\Flow; @@ -123,6 +124,24 @@ class FlowLogic extends BaseLogic $data['flow_type'] = (string)$flow_cate['type']; $data['org_name'] = $org['name']; $data['dept_name'] = implode(',',$dept); + $flow_list = $data['flow_list']; + if(!empty($flow_list)){ + foreach($flow_list as &$v){ + if(!empty($v['flow_user'])){ + $flow_user = Admin::field('id,name')->where('id','in',$v['flow_user'])->select()->toArray(); + foreach ($flow_user as &$v2) { + unset($v2['role_id']); + } + $v['flow_user'] = $flow_user; + } + } + } + $data['flow_list'] = json_encode($flow_list); + $copy_user = Admin::field('id,name')->where('id','in',$data['copy_uids'])->select()->toArray(); + foreach ($copy_user as &$v) { + unset($v['role_id']); + } + $data['copy_uids'] = $copy_user; return $data->toArray(); } } \ No newline at end of file