更新细节

This commit is contained in:
yaooo 2023-11-20 11:47:01 +08:00
parent 85fa9c76fd
commit 03433f4a5d
1 changed files with 9 additions and 0 deletions

View File

@ -619,16 +619,25 @@ class Common extends ApiController
$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();
if (empty($detail)) {
$this->apiError("审批流程不存在");
}
$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();
if (empty($detail)) {
$this->apiError("审批流程不存在");
}
$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();
if (empty($detail)) {
$this->apiError("审批流程不存在");
}
$create_user_id = $detail['admin_id'];
$create_user = Db::name('Admin')->where('id',$detail['admin_id'])->value('name');
}