更新统计信息
This commit is contained in:
parent
733c0b0405
commit
3357ee6a79
|
@ -42,7 +42,7 @@ class HomeIndex extends ApiController
|
||||||
$this->uid = JWT_UID;
|
$this->uid = JWT_UID;
|
||||||
$total = [];
|
$total = [];
|
||||||
$noteCount = Db::name('Note')->where('status', '1')->count();
|
$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();
|
$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();
|
$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,
|
'num' => $noteCount,
|
||||||
);
|
);
|
||||||
$total[] = array(
|
$total[] = array(
|
||||||
'name' => '审批',
|
'name' => '待审审批',
|
||||||
'type' => 'approve',
|
'type' => 'approve',
|
||||||
'num' => $approveCount,
|
'num' => $approveCount,
|
||||||
);
|
);
|
||||||
$total[] = array(
|
$total[] = array(
|
||||||
'name' => '报销',
|
'name' => '待审报销',
|
||||||
'type' => 'expense',
|
'type' => 'expense',
|
||||||
'num' => $expenseCount,
|
'num' => $expenseCount,
|
||||||
);
|
);
|
||||||
$total[] = array(
|
$total[] = array(
|
||||||
'name' => '发票',
|
'name' => '待审发票',
|
||||||
'type' => 'invoice',
|
'type' => 'invoice',
|
||||||
'num' => $invoiceCount,
|
'num' => $invoiceCount,
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue