package com.ruoyi.projectManagement.controller; import com.ruoyi.framework.web.domain.AjaxResult; import com.ruoyi.projectManagement.service.PlanService; import com.ruoyi.projectManagement.vo.SavePlanNodeVo; import com.ruoyi.projectManagement.vo.SavePlanVo; import com.ruoyi.projectManagement.vo.SearchPlanVo; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.Operation; import lombok.AllArgsConstructor; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.*; import jakarta.validation.Valid; /** * @author buhuazhen * @date 2026/3/7 * @email 3038525872@qq.com */ @RestController @RequestMapping("/projectManagement/plan") @Tag(name = "项目管理计划表(项目管理类型)") @RequiredArgsConstructor public class PlanController { private final PlanService planService; @PostMapping("/save") @Operation(summary = "保存") public AjaxResult save(@RequestBody @Valid SavePlanVo savePlanVo) { planService.savePlan(savePlanVo); return AjaxResult.success(); } @PostMapping("/delete/{id}") @Operation(summary = "删除") public AjaxResult delete(@PathVariable Long id) { planService.deletePlan(id); return AjaxResult.success(); } @PostMapping("/listPage") @Operation(summary = "分页列表") public AjaxResult listPage(@RequestBody SearchPlanVo searchPlanVo) { return AjaxResult.success(planService.searchPlan(searchPlanVo)); } }