['material_budget_id', 'material_id', 'budget_type'], ]; } /** * @notes 获取材料预算明细列表 * @return array * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author likeadmin * @date 2024/01/08 21:52 */ public function lists(): array { return ProjectMaterialBudgetDetail::where($this->searchWhere) ->field(['id', 'material_budget_id', 'material_id', 'budget_type', 'price', 'num', 'amount', 'remark']) ->limit($this->limitOffset, $this->limitLength) ->order(['id' => 'desc']) ->select() ->toArray(); } /** * @notes 获取材料预算明细数量 * @return int * @author likeadmin * @date 2024/01/08 21:52 */ public function count(): int { return ProjectMaterialBudgetDetail::where($this->searchWhere)->count(); } }