['cost_subject_id', 'cost_budget_id'], ]; } /** * @notes 获取列表 * @return array * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author likeadmin * @date 2023/12/18 11:22 */ public function lists(): array { return CostBudgetDetail::where($this->searchWhere) ->field(['id', 'cost_subject_id', 'cost_budget_id', 'dept_id', 'month1', 'month2', 'month3', 'month4', 'month5', 'month6', 'month7', 'month8', 'month9', 'month10', 'month11', 'month12']) ->limit($this->limitOffset, $this->limitLength) ->order(['id' => 'desc']) ->select() ->toArray(); } /** * @notes 获取数量 * @return int * @author likeadmin * @date 2023/12/18 11:22 */ public function count(): int { return CostBudgetDetail::where($this->searchWhere)->count(); } }