buhuazhen
3 天以前 446d4aa8d8beeeb0a9607f07a38008a2cd5e4747
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
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 lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
 
import javax.validation.Valid;
 
/**
 * @author buhuazhen
 * @date 2026/3/9
 * @email 3038525872@qq.com
 */
@RestController
@RequestMapping("/projectManagement/info")
@Api(value = "InfoController", tags = "项目管理信息表(项目管理类型)")
@RequiredArgsConstructor
public class InfoController {
 
    private final InfoService infoService;
    private final InfoStageHandleService infoStageHandleService;
 
    @PostMapping("/save")
    @ApiOperation("保存")
    public AjaxResult save(@RequestBody @Valid SaveInfoVo saveInfoVo) {
        infoService.save(saveInfoVo);
        return AjaxResult.success();
    }
 
    @PostMapping("/updateStatus")
    @ApiOperation("修改状态")
    public AjaxResult updateStatus(@RequestBody @Valid UpdateStateInfo updateStateInfo){
        infoService.updateStatus(updateStateInfo);
        return AjaxResult.success();
    }
 
    @PostMapping("/delete/{id}")
    @ApiOperation("删除")
    public AjaxResult delete(@PathVariable Long id) {
        infoService.deleteInfo(id);
        return AjaxResult.success();
    }
 
    @PostMapping("/listPage")
    @ApiOperation("分页列表")
    public AjaxResult listPage(@RequestBody @Valid SearchInfoVo vo) {
        return AjaxResult.success(infoService.searchListInfo(vo));
    }
 
 
    @PostMapping("/{id}")
    @ApiOperation("详情")
    public AjaxResult getInfoById(@PathVariable Long id) {
        return AjaxResult.success(infoService.getInfoById(id));
    }
 
    @PostMapping("/saveStage")
    @ApiOperation("保存阶段")
    public AjaxResult saveStage(@RequestBody @Valid SaveInfoStageVo dto) {
        infoStageHandleService.save(dto);
        return AjaxResult.success();
    }
 
    @PostMapping("/listStage/{id}")
    @ApiOperation("列表阶段")
    public AjaxResult listStage(@PathVariable Long id) {
        return AjaxResult.success(infoStageHandleService.getListVoByInfoId(id));
    }
 
    @PostMapping("/deleteStage/{id}")
    @ApiOperation("删除阶段")
    public AjaxResult deleteStage(@PathVariable Long id) {
        infoStageHandleService.deleteById(id);
        return AjaxResult.success();
    }
 
 
}