更新统计信息
This commit is contained in:
parent
733c0b0405
commit
3357ee6a79
|
@ -42,7 +42,7 @@ class HomeIndex extends ApiController
|
|||
$this->uid = JWT_UID;
|
||||
$total = [];
|
||||
$noteCount = Db::name('Note')->where('status', '1')->count();
|
||||
$approveCount = Db::name('Approve')->where([['', 'exp', Db::raw("FIND_IN_SET('{$this->uid}',check_admin_ids)")]])->count();
|
||||
$approveCount = Db::name('Approve')->where([['', 'exp', Db::raw("FIND_IN_SET('{$this->uid}',check_admin_ids)")]])->fetchSql(false)->count();
|
||||
$expenseCount = Db::name('Expense')->where([['', 'exp', Db::raw("FIND_IN_SET('{$this->uid}',check_admin_ids)")],['delete_time', '=', 0]])->count();
|
||||
$invoiceCount = Db::name('Invoice')->where([['', 'exp', Db::raw("FIND_IN_SET('{$this->uid}',check_admin_ids)")],['delete_time', '=', 0]])->count();
|
||||
|
||||
|
@ -52,17 +52,17 @@ class HomeIndex extends ApiController
|
|||
'num' => $noteCount,
|
||||
);
|
||||
$total[] = array(
|
||||
'name' => '审批',
|
||||
'name' => '待审审批',
|
||||
'type' => 'approve',
|
||||
'num' => $approveCount,
|
||||
);
|
||||
$total[] = array(
|
||||
'name' => '报销',
|
||||
'name' => '待审报销',
|
||||
'type' => 'expense',
|
||||
'num' => $expenseCount,
|
||||
);
|
||||
$total[] = array(
|
||||
'name' => '发票',
|
||||
'name' => '待审发票',
|
||||
'type' => 'invoice',
|
||||
'num' => $invoiceCount,
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue