dataLists(new CostApprovedProjectLists()); } /** * @notes 添加待立项造价项目 * @return \think\response\Json * @author likeadmin * @date 2024/02/20 14:16 */ public function add() { $params = (new CostApprovedProjectValidate())->post()->goCheck('add'); $result = CostApprovedProjectLogic::add($params); if (true === $result) { return $this->success('添加成功', [], 1, 1); } return $this->fail(CostApprovedProjectLogic::getError()); } /** * @notes 编辑待立项造价项目 * @return \think\response\Json * @author likeadmin * @date 2024/02/20 14:16 */ public function edit() { $params = (new CostApprovedProjectValidate())->post()->goCheck('edit'); $result = CostApprovedProjectLogic::edit($params); if (true === $result) { return $this->success('编辑成功', [], 1, 1); } return $this->fail(CostApprovedProjectLogic::getError()); } /** * @notes 删除待立项造价项目 * @return \think\response\Json * @author likeadmin * @date 2024/02/20 14:16 */ public function delete() { $params = (new CostApprovedProjectValidate())->post()->goCheck('delete'); CostApprovedProjectLogic::delete($params); return $this->success('删除成功', [], 1, 1); } /** * @notes 获取待立项造价项目详情 * @return \think\response\Json * @author likeadmin * @date 2024/02/20 14:16 */ public function detail() { $params = (new CostApprovedProjectValidate())->goCheck('detail'); $result = CostApprovedProjectLogic::detail($params); return $this->data($result); } }