更新type

This commit is contained in:
yaooo 2023-11-18 19:09:37 +08:00
parent f5d4164334
commit b3503bc375
1 changed files with 20 additions and 1 deletions

View File

@ -617,6 +617,22 @@ class Common extends ApiController
$id = $param['id'];
$type = $param['type'];
$flows = Db::name('FlowStep')->where(['action_id'=>$id,'type'=>$type,'delete_time'=>0])->order('sort asc')->select()->toArray();
if ($type == 1) {
$detail = Db::name('Approve')->where('id',$param['id'])->find();
$create_user_id = $detail['admin_id'];
$create_user= Db::name('Admin')->where('id',$detail['admin_id'])->value('name');
}
if ($type == 2) {
$detail = Db::name('Expense')->where('id',$param['id'])->find();
$create_user_id = $detail['admin_id'];
$create_user = Db::name('Admin')->where('id',$detail['admin_id'])->value('name');
}
if ($type == 3) {
$detail = Db::name('Invoice')->where('id',$param['id'])->find();
$create_user_id = $detail['admin_id'];
$create_user = Db::name('Admin')->where('id',$detail['admin_id'])->value('name');
}
foreach ($flows as $key => &$val) {
$user_id_info = Db::name('Admin')->field('id,name,thumb')->where('id','in',$val['flow_uids'])->select()->toArray();
foreach ($user_id_info as $k => &$v) {
@ -644,6 +660,9 @@ class Common extends ApiController
$val['user_id_info'] = $user_id_info;
$val['check_list'] = $check_list;
}
$this->apiSuccess('获取成功', $flows);
$data['create_user'] = $create_user;
$data['create_user_id'] = $create_user_id;
$data['flows'] = $flows;
$this->apiSuccess('获取成功', $data);
}
}