dataLists(new ProjectTotalBudgetLists()); } /** * @notes 添加项目总预算 * @return \think\response\Json * @author likeadmin * @date 2024/01/08 14:25 */ public function add() { $params = (new ProjectTotalBudgetValidate())->post()->goCheck('add'); $result = ProjectTotalBudgetLogic::add($params); if (true === $result) { return $this->success('添加成功', [], 1, 1); } return $this->fail(ProjectTotalBudgetLogic::getError()); } /** * @notes 编辑项目总预算 * @return \think\response\Json * @author likeadmin * @date 2024/01/08 14:25 */ public function edit() { $params = (new ProjectTotalBudgetValidate())->post()->goCheck('edit'); $result = ProjectTotalBudgetLogic::edit($params); if (true === $result) { return $this->success('编辑成功', [], 1, 1); } return $this->fail(ProjectTotalBudgetLogic::getError()); } /** * @notes 删除项目总预算 * @return \think\response\Json * @author likeadmin * @date 2024/01/08 14:25 */ public function delete() { $params = (new ProjectTotalBudgetValidate())->post()->goCheck('delete'); ProjectTotalBudgetLogic::delete($params); return $this->success('删除成功', [], 1, 1); } /** * @notes 获取项目总预算详情 * @return \think\response\Json * @author likeadmin * @date 2024/01/08 14:25 */ public function detail() { $params = (new ProjectTotalBudgetValidate())->goCheck('detail'); $result = ProjectTotalBudgetLogic::detail($params); return $this->data($result); } }