| | |
| | | package com.ruoyi.projectManagement.controller; |
| | | |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.projectManagement.dto.InfoStageDto; |
| | | import com.ruoyi.projectManagement.dto.UpdateStateInfo; |
| | | import com.ruoyi.projectManagement.service.InfoService; |
| | | import com.ruoyi.projectManagement.service.impl.handle.InfoStageHandleService; |
| | | import com.ruoyi.projectManagement.vo.SaveInfoStageVo; |
| | | import com.ruoyi.projectManagement.vo.SaveInfoVo; |
| | | import com.ruoyi.projectManagement.vo.SearchInfoVo; |
| | | 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.RequiredArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | | import jakarta.validation.Valid; |
| | | |
| | | /** |
| | | * @author buhuazhen |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/projectManagement/info") |
| | | @Api(value = "InfoController", tags = "项目管理信息表(项目管理类型)") |
| | | @Tag(name = "项目管理信息表(项目管理类型)") |
| | | @RequiredArgsConstructor |
| | | public class InfoController { |
| | | |
| | | private final InfoService infoService; |
| | | private final InfoStageHandleService infoStageHandleService; |
| | | |
| | | @PostMapping("/save") |
| | | @ApiOperation("保存") |
| | | @Operation(summary = "保存") |
| | | public AjaxResult save(@RequestBody @Valid SaveInfoVo saveInfoVo) { |
| | | infoService.save(saveInfoVo); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @PostMapping("/updateStatus") |
| | | @ApiOperation("修改状态") |
| | | @Operation(summary = "修改状态") |
| | | public AjaxResult updateStatus(@RequestBody @Valid UpdateStateInfo updateStateInfo){ |
| | | infoService.updateStatus(updateStateInfo); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @PostMapping("/delete/{id}") |
| | | @ApiOperation("删除") |
| | | @Operation(summary = "删除") |
| | | public AjaxResult delete(@PathVariable Long id) { |
| | | infoService.deleteInfo(id); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @PostMapping("/listPage") |
| | | @ApiOperation("分页列表") |
| | | @Operation(summary = "分页列表") |
| | | public AjaxResult listPage(@RequestBody @Valid SearchInfoVo vo) { |
| | | return AjaxResult.success(infoService.searchListInfo(vo)); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/{id}") |
| | | @ApiOperation("详情") |
| | | @Operation(summary = "详情") |
| | | public AjaxResult getInfoById(@PathVariable Long id) { |
| | | return AjaxResult.success(infoService.getInfoById(id)); |
| | | } |
| | | |
| | | @PostMapping("/saveStage") |
| | | @Operation(summary = "保存阶段") |
| | | public AjaxResult saveStage(@RequestBody @Valid SaveInfoStageVo dto) { |
| | | infoStageHandleService.save(dto); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @PostMapping("/listStage/{id}") |
| | | @Operation(summary = "列表阶段") |
| | | public AjaxResult listStage(@PathVariable Long id) { |
| | | return AjaxResult.success(infoStageHandleService.getListVoByInfoId(id)); |
| | | } |
| | | |
| | | @PostMapping("/deleteStage/{id}") |
| | | @Operation(summary = "删除阶段") |
| | | public AjaxResult deleteStage(@PathVariable Long id) { |
| | | infoStageHandleService.deleteById(id); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | |
| | | } |