更新细节
This commit is contained in:
parent
85fa9c76fd
commit
03433f4a5d
|
@ -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();
|
$flows = Db::name('FlowStep')->where(['action_id'=>$id,'type'=>$type,'delete_time'=>0])->order('sort asc')->select()->toArray();
|
||||||
if ($type == 1) {
|
if ($type == 1) {
|
||||||
$detail = Db::name('Approve')->where('id',$param['id'])->find();
|
$detail = Db::name('Approve')->where('id',$param['id'])->find();
|
||||||
|
if (empty($detail)) {
|
||||||
|
$this->apiError("审批流程不存在");
|
||||||
|
}
|
||||||
$create_user_id = $detail['admin_id'];
|
$create_user_id = $detail['admin_id'];
|
||||||
$create_user= Db::name('Admin')->where('id',$detail['admin_id'])->value('name');
|
$create_user= Db::name('Admin')->where('id',$detail['admin_id'])->value('name');
|
||||||
}
|
}
|
||||||
if ($type == 2) {
|
if ($type == 2) {
|
||||||
$detail = Db::name('Expense')->where('id',$param['id'])->find();
|
$detail = Db::name('Expense')->where('id',$param['id'])->find();
|
||||||
|
if (empty($detail)) {
|
||||||
|
$this->apiError("审批流程不存在");
|
||||||
|
}
|
||||||
$create_user_id = $detail['admin_id'];
|
$create_user_id = $detail['admin_id'];
|
||||||
$create_user = Db::name('Admin')->where('id',$detail['admin_id'])->value('name');
|
$create_user = Db::name('Admin')->where('id',$detail['admin_id'])->value('name');
|
||||||
}
|
}
|
||||||
if ($type == 3) {
|
if ($type == 3) {
|
||||||
$detail = Db::name('Invoice')->where('id',$param['id'])->find();
|
$detail = Db::name('Invoice')->where('id',$param['id'])->find();
|
||||||
|
if (empty($detail)) {
|
||||||
|
$this->apiError("审批流程不存在");
|
||||||
|
}
|
||||||
$create_user_id = $detail['admin_id'];
|
$create_user_id = $detail['admin_id'];
|
||||||
$create_user = Db::name('Admin')->where('id',$detail['admin_id'])->value('name');
|
$create_user = Db::name('Admin')->where('id',$detail['admin_id'])->value('name');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue