| | |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.oA.pojo.OaProjectPhase; |
| | | import com.ruoyi.oA.service.OaProjectPhaseService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @Api(tags = "oA项目阶段管理") |
| | | @Tag(name = "oA项目阶段管理") |
| | | @RestController |
| | | @RequestMapping("/oA/projectPhase") |
| | | @AllArgsConstructor |
| | | public class OaProjectPhaseController { |
| | | private final OaProjectPhaseService oaProjectPhaseService; |
| | | |
| | | @ApiOperation("新增项目阶段") |
| | | @Operation(summary = "新增项目阶段") |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody OaProjectPhase oaProjectPhase) { |
| | | return AjaxResult.success(oaProjectPhaseService.save(oaProjectPhase)); |
| | | } |
| | | |
| | | @ApiOperation("删除项目阶段") |
| | | @Operation(summary = "删除项目阶段") |
| | | @DeleteMapping("/delete/{phaseId}") |
| | | public AjaxResult delete(@PathVariable Integer phaseId) { |
| | | return AjaxResult.success(oaProjectPhaseService.deleteById(phaseId)); |
| | | } |
| | | |
| | | @ApiOperation("更新项目阶段") |
| | | @Operation(summary = "更新项目阶段") |
| | | @PostMapping("/update") |
| | | public AjaxResult update(@RequestBody OaProjectPhase oaProjectPhase) { |
| | | return AjaxResult.success(oaProjectPhaseService.updateById(oaProjectPhase)); |
| | | } |
| | | |
| | | @ApiOperation("根据项目id查询项目阶段列表") |
| | | @Operation(summary = "根据项目id查询项目阶段列表") |
| | | @GetMapping("/listByProjectId/{projectId}") |
| | | public AjaxResult listByProjectId(@PathVariable Integer projectId) { |
| | | return AjaxResult.success(oaProjectPhaseService.listByProjectId(projectId)); |