| | |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import jakarta.validation.Valid; |
| | |
| | | private final InfoStageHandleService infoStageHandleService; |
| | | |
| | | @PostMapping("/save") |
| | | @PreAuthorize("(#saveInfoVo.info.id == null && @ss.hasPermi('project:info:add')) || " + |
| | | "(#saveInfoVo.info.id != null && @ss.hasPermi('project:info:edit'))") |
| | | @Operation(summary = "保存") |
| | | public AjaxResult save(@RequestBody @Valid SaveInfoVo saveInfoVo) { |
| | | infoService.save(saveInfoVo); |
| | |
| | | } |
| | | |
| | | @PostMapping("/updateStatus") |
| | | @PreAuthorize("@ss.hasPermi('project:legacy:maintain')") |
| | | @Operation(summary = "修改状态") |
| | | public AjaxResult updateStatus(@RequestBody @Valid UpdateStateInfo updateStateInfo){ |
| | | infoService.updateStatus(updateStateInfo); |
| | |
| | | } |
| | | |
| | | @PostMapping("/delete/{id}") |
| | | @PreAuthorize("@ss.hasPermi('project:info:remove')") |
| | | @Operation(summary = "删除") |
| | | public AjaxResult delete(@PathVariable Long id) { |
| | | infoService.deleteInfo(id); |
| | |
| | | } |
| | | |
| | | @PostMapping("/listPage") |
| | | @PreAuthorize("@ss.hasPermi('project:info:list')") |
| | | @Operation(summary = "分页列表") |
| | | public AjaxResult listPage(@RequestBody @Valid SearchInfoVo vo) { |
| | | return AjaxResult.success(infoService.searchListInfo(vo)); |
| | |
| | | |
| | | |
| | | @PostMapping("/{id}") |
| | | @PreAuthorize("@ss.hasPermi('project:info:query')") |
| | | @Operation(summary = "详情") |
| | | public AjaxResult getInfoById(@PathVariable Long id) { |
| | | return AjaxResult.success(infoService.getInfoById(id)); |
| | | } |
| | | |
| | | @PostMapping("/saveStage") |
| | | @PreAuthorize("denyAll()") |
| | | @Operation(summary = "保存阶段") |
| | | public AjaxResult saveStage(@RequestBody @Valid SaveInfoStageVo dto) { |
| | | infoStageHandleService.save(dto); |
| | |
| | | } |
| | | |
| | | @PostMapping("/listStage/{id}") |
| | | @PreAuthorize("denyAll()") |
| | | @Operation(summary = "列表阶段") |
| | | public AjaxResult listStage(@PathVariable Long id) { |
| | | return AjaxResult.success(infoStageHandleService.getListVoByInfoId(id)); |
| | | } |
| | | |
| | | @PostMapping("/deleteStage/{id}") |
| | | @PreAuthorize("denyAll()") |
| | | @Operation(summary = "删除阶段") |
| | | public AjaxResult deleteStage(@PathVariable Long id) { |
| | | infoStageHandleService.deleteById(id); |